diff options
author | flz <flz@FreeBSD.org> | 2005-12-12 02:00:33 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2005-12-12 02:00:33 +0800 |
commit | ce04c1cf5198733dc614a80108a67f4aafd74573 (patch) | |
tree | 1a9e89784d21d48750e28b3a8624949e8e833ce0 /net/ipw-firmware | |
parent | c878ced5b2297044e19cbd57f6c6619986d09737 (diff) | |
download | freebsd-ports-graphics-ce04c1cf5198733dc614a80108a67f4aafd74573.tar.gz freebsd-ports-graphics-ce04c1cf5198733dc614a80108a67f4aafd74573.tar.zst freebsd-ports-graphics-ce04c1cf5198733dc614a80108a67f4aafd74573.zip |
- Install firmware files in /boot/firmware [1].
- Rename LICENSE to LICENSE.${DRIVERNAME}.
- Don't install ${DRIVERNAME}control(8) on fresh -CURRENT (> 700006).
- Use USE_RCORDER and change REQUIRE/BEFORE lines in startup scripts accordingly.
- Move everything to /usr prefix so that people can mount /usr/local via NFS.
- Add a message saying that kernel module is based on a very old snapshot.
- Reword IGNORE lines.
PR: ports/90022 [1]
Requested by: sem, Thomas Hurst <tom@hur.st> [1]
Diffstat (limited to 'net/ipw-firmware')
-rw-r--r-- | net/ipw-firmware/Makefile | 65 | ||||
-rw-r--r-- | net/ipw-firmware/files/ipw.sh.in | 6 | ||||
-rw-r--r-- | net/ipw-firmware/files/pkg-message.in | 40 | ||||
-rw-r--r-- | net/ipw-firmware/pkg-plist | 14 |
4 files changed, 84 insertions, 41 deletions
diff --git a/net/ipw-firmware/Makefile b/net/ipw-firmware/Makefile index 0c80647ecf3..0ca7a0b8e4c 100644 --- a/net/ipw-firmware/Makefile +++ b/net/ipw-firmware/Makefile @@ -25,24 +25,32 @@ FIRMWARES?= ${RELNAME}-${PORTVERSION}-i.fw:${DRIVERNAME}-i.fw \ ${RELNAME}-${PORTVERSION}-p.fw:${DRIVERNAME}-p.fw \ ${RELNAME}-${PORTVERSION}.fw:${DRIVERNAME}.fw -OPTIONS= MODULE "Install ${DRIVERNAME}(4) kernel module" off +OPTIONS= MODULE "Install ${DRIVERNAME}(4) kernel module (very old snapshot)" off \ + CONTROL "Install ${DRIVERNAME}control(8) utility" on + +# Override PREFIX to install ${DRIVERNAME}control(8) somewhere we hope it'll +# be available soon enough. +PREFIX= /usr WRKSRC= ${WRKDIR} KERNDIR= /boot/kernel KMODDIR= /boot/modules +FWDIR= /boot/firmware SUB_FILES= pkg-message SUB_LIST= DRIVERNAME="${DRIVERNAME}" \ RELNAME="${RELNAME}" \ - KMODDIR="${KMODDIR}" + KMODDIR="${KMODDIR}" \ + FWDIR="${FWDIR}" PLIST_SUB:= ${SUB_LIST} MAKE_ENV= BINDIR="${PREFIX}/sbin" \ MANDIR="${PREFIX}/man/man" \ KMODDIR="${KMODDIR}" -USE_RC_SUBR= ${DRIVERNAME}.sh -MAN8= ${DRIVERNAME}control.8 MANCOMPRESSED= yes +# Dummy OSVERSION for ipw. +MIN7OSVERSION?= 999999 + .if !defined(PACKAGE_BUILDING) IS_INTERACTIVE= yes .endif @@ -54,12 +62,23 @@ IS_INTERACTIVE= yes # should move on. I may change this if I get successful reports though. # Comment this IGNORE line if you want to test it anyway. .if ${OSVERSION} < 503000 -IGNORE= Need a fresh version of RELENG_5 +IGNORE= needs at least FreeBSD 5.3-RELEASE +.endif + +.if ${OSVERSION} > ${MIN7OSVERSION} +SUB_LIST+= DONT_NEED_CONTROL="@comment " +. if !defined(WITHOUT_CONTROL) +IGNORE= is configured with ${DRIVERNAME}control(8) which you don't need +. endif +.else +SUB_LIST+= DONT_NEED_CONTROL="" +MAN8+= ${DRIVERNAME}control.8 +USE_RCORDER= ${DRIVERNAME}.sh .endif .if defined(WITH_MODULE) . if ${OSVERSION} > 600023 -IGNORE= ${DRIVERNAME}(4) support is already included in your tree +IGNORE= is configured with ${DRIVERNAME}(4) support which you don't need . else PLIST_SUB+= WITH_MODULE="" MAN4+= ${DRIVERNAME}.4 @@ -68,6 +87,12 @@ MAN4+= ${DRIVERNAME}.4 PLIST_SUB+= WITH_MODULE="@comment MODULE " .endif +.if !defined(WITHOUT_CONTROL) +PLIST_SUB+= WITH_CONTROL="" +.else +PLIST_SUB+= WITH_CONTROL="@comment CONTROL " +.endif + # "Might" because people still can include ${DRIVERNAME}(4) support in kernel by extracting # its source in src/ and tweaking src/sys/conf/files. .if ${OSVERSION} <= 600023 && !exists(${KERNDIR}/if_${DRIVERNAME}.ko) && !defined(WITH_MODULE) @@ -78,8 +103,11 @@ SUB_LIST+= MIGHT_NEED_MODULE="@comment " do-build: .if defined(WITH_MODULE) - cd ${WRKSRC}/${DRIVERDISTNAME}/src/; make all -.else +. for i in share sys + cd ${WRKSRC}/${DRIVERDISTNAME}/src/${i}; make all +. endfor +.endif +.if !defined(WITHOUT_CONTROL) cd ${WRKSRC}/${DRIVERDISTNAME}/src/usr.sbin/${DRIVERNAME}control/; make all .endif @@ -91,16 +119,29 @@ do-install: .endif ${MKDIR} ${DATADIR} .if defined(WITH_MODULE) - cd ${WRKSRC}/${DRIVERDISTNAME}/src/; make install ${MAKE_ENV} -.else +. for i in share sys + cd ${WRKSRC}/${DRIVERDISTNAME}/src/${i}; make install ${MAKE_ENV} +. endfor +.endif +.if !defined(WITHOUT_CONTROL) cd ${WRKSRC}/${DRIVERDISTNAME}/src/usr.sbin/${DRIVERNAME}control/; make install ${MAKE_ENV} .endif - ${INSTALL_DATA} ${WRKSRC}/LICENSE ${DATADIR}/ + ${MKDIR} ${FWDIR} + ${INSTALL_DATA} ${WRKSRC}/LICENSE ${FWDIR}/LICENSE.${DRIVERNAME} .for i in ${FIRMWARES} - ${INSTALL_DATA} ${WRKSRC}/${i:C/:.*//} ${DATADIR}/${i:C/.*://} + ${INSTALL_DATA} ${WRKSRC}/${i:C/:.*//} ${FWDIR}/${i:C/.*://} .endfor post-install: @${CAT} ${PKGMESSAGE} +.if defined(WITH_MODULE) + @${ECHO_CMD} "You asked for ${DRIVERNAME}(4) module to be installed but" + @${ECHO_CMD} "be aware that this is a *very* *old* snapshot of the code" + @${ECHO_CMD} "and that it probably won't work correctly." + @${ECHO_CMD} "This option will probably go away in a near future." + @${ECHO_CMD} "SLIPPERY WHEN WET ! BEWARE OF THE DOGS !" + @${ECHO_CMD} "You have been warned." +.endif + .include <bsd.port.post.mk> diff --git a/net/ipw-firmware/files/ipw.sh.in b/net/ipw-firmware/files/ipw.sh.in index f92d01d6b42..59b735034e1 100644 --- a/net/ipw-firmware/files/ipw.sh.in +++ b/net/ipw-firmware/files/ipw.sh.in @@ -4,8 +4,8 @@ # # PROVIDE: %%DRIVERNAME%% -# REQUIRE: LOGIN abi -# BEFORE: securelevel +# REQUIRE: mountcritlocal +# BEFORE: ipfilter # KEYWORD: FreeBSD shutdown # Add the following line to /etc/rc.conf to enable `%%DRIVERNAME%%': @@ -50,7 +50,7 @@ command="/usr/local/sbin/%%DRIVERNAME%%control" eval _file=\$_%%DRIVERNAME%%_file_${i} echo -n " [${i}:${_mode:=bss}]" - ${command} -i ${i} -f %%DATADIR%%/${_file} + ${command} -i ${i} -f %%FWDIR%%/${_file} ifconfig ${i} up done echo "." diff --git a/net/ipw-firmware/files/pkg-message.in b/net/ipw-firmware/files/pkg-message.in index 5fb6f43982c..0ecfc52367a 100644 --- a/net/ipw-firmware/files/pkg-message.in +++ b/net/ipw-firmware/files/pkg-message.in @@ -1,31 +1,31 @@ ------------------------------------------------------------------ -This port has installed following files in %%DATADIR%%: +This port has installed following files in %%FWDIR%%: - - LICENSE : License terms, + - LICENSE.%%DRIVERNAME%% : License terms, - %%DRIVERNAME%%-i.fw : IBSS mode (aka ad-hoc mode) firmware, - %%DRIVERNAME%%-p.fw : Monitor mode firmware, - %%DRIVERNAME%%.fw : BSS mode (aka infrastructure mode) firmware. Ensure you've read license terms carefully before you use this firmware. - -You must choose the correct image depending on how you want to -use your adapter. - -For instance, to download firmware for BSS mode: - - # %%DRIVERNAME%%control -i %%DRIVERNAME%%0 \ - -f %%DATADIR%%/%%DRIVERNAME%%.fw - -The port has installed a startup script (%%DRIVERNAME%%.sh). Add these lines -to /etc/rc.conf to use it : - - - %%DRIVERNAME%%_enable (bool) : defaults to "NO", set it to "YES" to - use the startup script. - - %%DRIVERNAME%%_interfaces (str) : defaults to "%%DRIVERNAME%%0", override it to - change to interface names list (optional). - - %%DRIVERNAME%%_mode_<iface> (str) : defaults to "bss", possible values - are bss, ibss and monitor (optional). +%%DONT_NEED_CONTROL%% +%%DONT_NEED_CONTROL%%You must choose the correct image depending on how you want to +%%DONT_NEED_CONTROL%%use your adapter. +%%DONT_NEED_CONTROL%% +%%DONT_NEED_CONTROL%%For instance, to download firmware for BSS mode: +%%DONT_NEED_CONTROL%% +%%DONT_NEED_CONTROL%% # %%DRIVERNAME%%control -i %%DRIVERNAME%%0 \ +%%DONT_NEED_CONTROL%% -f %%DATADIR%%/%%DRIVERNAME%%.fw +%%DONT_NEED_CONTROL%% +%%DONT_NEED_CONTROL%%The port has installed a startup script (%%DRIVERNAME%%.sh). Add these lines +%%DONT_NEED_CONTROL%%to /etc/rc.conf to use it : +%%DONT_NEED_CONTROL%% +%%DONT_NEED_CONTROL%% - %%DRIVERNAME%%_enable (bool) : defaults to "NO", set it to "YES" to +%%DONT_NEED_CONTROL%% use the startup script. +%%DONT_NEED_CONTROL%% - %%DRIVERNAME%%_interfaces (str) : defaults to "%%DRIVERNAME%%0", override it to +%%DONT_NEED_CONTROL%% change to interface names list (optional). +%%DONT_NEED_CONTROL%% - %%DRIVERNAME%%_mode_<iface> (str) : defaults to "bss", possible values +%%DONT_NEED_CONTROL%% are bss, ibss and monitor (optional). %%MIGHT_NEED_MODULE%% %%MIGHT_NEED_MODULE%%Note: %%MIGHT_NEED_MODULE%% diff --git a/net/ipw-firmware/pkg-plist b/net/ipw-firmware/pkg-plist index 71ffef5ff7e..39f354d3702 100644 --- a/net/ipw-firmware/pkg-plist +++ b/net/ipw-firmware/pkg-plist @@ -1,8 +1,10 @@ -sbin/%%DRIVERNAME%%control -%%DATADIR%%/LICENSE -%%DATADIR%%/%%DRIVERNAME%%-i.fw -%%DATADIR%%/%%DRIVERNAME%%-p.fw -%%DATADIR%%/%%DRIVERNAME%%.fw -@dirrm %%DATADIR%% +@cwd / +%%WITH_CONTROL%%usr/sbin/%%DRIVERNAME%%control +@exec mkdir -p %%FWDIR%% +@cwd %%FWDIR%% +LICENSE.%%DRIVERNAME%% +%%DRIVERNAME%%-i.fw +%%DRIVERNAME%%-p.fw +%%DRIVERNAME%%.fw %%WITH_MODULE%%@cwd / %%WITH_MODULE%%%%KMODDIR%%/if_%%DRIVERNAME%%.ko |