1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00
freebsd-ports/net/ipw-firmware-kmod/Makefile
2007-06-29 09:16:42 +00:00

74 lines
2.0 KiB
Makefile

# New ports collection makefile for: ipw-firmware-kmod
# Date created: Mar 16 2006
# Whom: Florent Thoumie <flz@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME?= ipw-firmware
PORTVERSION= ${FWVERSION}
PORTREVISION?= 3
CATEGORIES= net kld
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= flz/ipw
PKGNAMESUFFIX= -kmod
FWNAME?= ipw2100-fw-${FWVERSION}
FWVERSION?= 1.3
DISTFILES= ${FWNAME}.tgz
MAINTAINER= flz@FreeBSD.org
COMMENT?= Intel PRO/Wireless 2100 Firmware Kernel Module
DRIVERNAME?= ipw
FIRMWARES?= ${FWNAME:C/fw-//}-i.fw:${DRIVERNAME}_ibss \
${FWNAME:C/fw-//}-p.fw:${DRIVERNAME}_monitor \
${FWNAME:C/fw-//}.fw:${DRIVERNAME}_bss
WRKSRC= ${WRKDIR}
KMODDIR= /boot/modules
KMODVERSION= ${FWVERSION:C/^(...)$/\1.0/:S/.//g}
PLIST_SUB= DRIVERNAME="${DRIVERNAME}" \
KMODDIR="${KMODDIR}"
CFLAGS+= -D_KERNEL
NO_PACKAGE= "this is a modified version of a restricted firmware"
MIN6OSVERSION?= 999999
MAX6OSVERSION= 999999
MIN7OSVERSION?= 700015
MAX7OSVERSION= 700032
.include <bsd.port.pre.mk>
.if ( ${OSVERSION} >= ${MAX7OSVERSION} || \
( ${OSVERSION} < 700000 && ${OSVERSION} >= ${MAX6OSVERSION} ) )
IGNORE= is already included in base system
.endif
.if !( ${OSVERSION} > ${MIN7OSVERSION} || \
( ${OSVERSION} < 700000 && ${OSVERSION} >= ${MIN6OSVERSION} ) )
IGNORE= needs fresh ${DRIVERNAME}(4), install net/${DRIVERNAME}-firmware instead
.endif
post-patch:
.for i in ${FIRMWARES}
@${MKDIR} ${WRKSRC}/${i:C/.*://}
@${MV} ${WRKSRC}/${i:C/:.*//} ${WRKSRC}/${i:C/.*://}/${i:C/.*://:S/$/.fw/}
@${ECHO_CMD} "KMOD= ${i:C/.*://}" > ${WRKSRC}/${i:C/.*://}/Makefile
@${ECHO_CMD} "FIRMWS= ${i:C/.*://:S/$/.fw/}:${i:C/.*://}:${KMODVERSION}" >> \
${WRKSRC}/${i:C/.*://}/Makefile
@${ECHO_CMD} ".include <bsd.kmod.mk>" >> ${WRKSRC}/${i:C/.*://}/Makefile
.endfor
do-build:
.for i in ${FIRMWARES}
@cd ${WRKSRC}/${i:C/.*://}; ${SETENV} KMODDIR="${KMODDIR}" make all
.endfor
do-install:
.for i in ${FIRMWARES}
@cd ${WRKSRC}/${i:C/.*://}; ${SETENV} KMODDIR="${KMODDIR}" make install
.endfor
.include <bsd.port.post.mk>