diff --git a/net/wifi-firmware-kmod/Makefile.inc b/net/wifi-firmware-kmod/Makefile.inc --- a/net/wifi-firmware-kmod/Makefile.inc +++ b/net/wifi-firmware-kmod/Makefile.inc @@ -33,26 +33,30 @@ FILESDIR= ${BASEDIR}/files LICENSE_COMB= multi -LICENSE= primary whence +LICENSE= wifi_fw_${FWDRV} WHENCE_${FWDRV} -# Port primary license. -LICENSE_FILE_primary= ${WRKSRC}/${LICENSE_FILE} -LICENSE_NAME_primary= ${LICENSE_NAME} -LICENSE_PERMS_primary= ${LICENSE_PERMS} +# Port's main license. +LICENSE_FILE_wifi_fw_${FWDRV}= ${WRKSRC}/${LICENSE_FILE} +LICENSE_NAME_wifi_fw_${FWDRV}= ${LICENSE_NAME} +LICENSE_PERMS_wifi_fw_${FWDRV}= ${LICENSE_PERMS} # Add WHENCE file next to license where it makes sense despite not being a license. -LICENSE_NAME_whence= Origin and licensing information for linux-firmware files -LICENSE_FILE_whence= ${WRKSRC}/WHENCE -LICENSE_PERMS_whence= ${LICENSE_PERMS} +LICENSE_NAME_WHENCE_${FWDRV}= Origin and licensing information for linux-firmware files +LICENSE_FILE_WHENCE_${FWDRV}= ${WRKSRC}/WHENCE +LICENSE_PERMS_WHENCE_${FWDRV}= ${LICENSE_PERMS} #PLIST_FILES+= ${_LICENSE_DIR}/WHENCE +# If we build any wifi-firmware-FOO-kmod port without a flavor +# we need to make sure the flavor is set. +FLAVOR?= ${FWDRV} + # Add extra license files. .if "${DISTFILES_${FLAVOR}_lic}" .for _n in ${DISTFILES_${FLAVOR}_lic:range} -LICENSE+= extra${_n} -LICENSE_FILE_extra${_n}= ${WRKSRC}/lic/${DISTFILES_${FLAVOR}_lic:[${_n}]:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g} -LICENSE_NAME_extra${_n}= ${LICENSE_NAME} (extra fw license) -LICENSE_PERMS_extra${_n}= ${LICENSE_PERMS} +LICENSE+= wifi_fw_${FWDRV}_extra${_n} +LICENSE_FILE_wifi_fw_${FWDRV}_extra${_n}= ${WRKSRC}/lic/${DISTFILES_${FLAVOR}_lic:[${_n}]:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g} +LICENSE_NAME_wifi_fw_${FWDRV}_extra${_n}= ${LICENSE_NAME} (extra fw license) +LICENSE_PERMS_wifi_fw_${FWDRV}_extra${_n}= ${LICENSE_PERMS} .endfor .endif