blob: 60aa1127a1b7fb86c5ea69c6e9601a20d2a59d84 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# 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>
|