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 | |
parent | c878ced5b2297044e19cbd57f6c6619986d09737 (diff) | |
download | freebsd-ports-gnome-ce04c1cf5198733dc614a80108a67f4aafd74573.tar.gz freebsd-ports-gnome-ce04c1cf5198733dc614a80108a67f4aafd74573.tar.zst freebsd-ports-gnome-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')
-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 | ||||
-rw-r--r-- | net/iwi-firmware/Makefile | 4 | ||||
-rw-r--r-- | net/iwi-firmware/files/iwi.sh.in | 6 | ||||
-rw-r--r-- | net/iwi-firmware/files/pkg-message.in | 42 | ||||
-rw-r--r-- | net/iwi-firmware/pkg-plist | 22 |
8 files changed, 130 insertions, 69 deletions
diff --git a/net/ipw-firmware/Makefile b/net/ipw-firmware/Makefile index 0c80647ecf38..0ca7a0b8e4cd 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 f92d01d6b420..59b735034e15 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 5fb6f43982c9..0ecfc52367af 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 71ffef5ff7ed..39f354d37020 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 diff --git a/net/iwi-firmware/Makefile b/net/iwi-firmware/Makefile index 093b2d107680..dce224592abe 100644 --- a/net/iwi-firmware/Makefile +++ b/net/iwi-firmware/Makefile @@ -8,7 +8,7 @@ PORTNAME= iwi-firmware RELNAME= ipw2200 PORTVERSION= 2.4 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= net sysutils MAINTAINER= flz@FreeBSD.org @@ -30,4 +30,6 @@ FIRMWARES= ipw-${PORTVERSION}-boot.fw:${DRIVERNAME}-boot.fw \ ipw-${PORTVERSION}-sniffer.fw:${DRIVERNAME}-sniffer.fw \ ipw-${PORTVERSION}-sniffer_ucode.fw:${DRIVERNAME}-ucode-sniffer.fw +MIN7OSVERSION= 700006 + .include "${MASTERDIR}/Makefile" diff --git a/net/iwi-firmware/files/iwi.sh.in b/net/iwi-firmware/files/iwi.sh.in index 602dd8efd3df..c19accaabae9 100644 --- a/net/iwi-firmware/files/iwi.sh.in +++ b/net/iwi-firmware/files/iwi.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%%': @@ -43,7 +43,7 @@ command="/usr/local/sbin/%%DRIVERNAME%%control" eval _mode=\$_%%DRIVERNAME%%_file_${i} echo -n " [${i}:${_mode:=bss}]" - ${command} -i ${i} -d %%DATADIR%% -m ${_mode:=bss} + ${command} -i ${i} -d %%FWDIR%% -m ${_mode:=bss} ifconfig ${i} up done echo "." diff --git a/net/iwi-firmware/files/pkg-message.in b/net/iwi-firmware/files/pkg-message.in index e38843d9d53e..5d9473418a93 100644 --- a/net/iwi-firmware/files/pkg-message.in +++ b/net/iwi-firmware/files/pkg-message.in @@ -1,20 +1,34 @@ ------------------------------------------------------------------ -You must choose the correct mode depending on how you want to -use your adapter. +This port has installed following files in %%FWDIR%%: -For instance, to download firmware for BSS mode: + - LICENSE.%%DRIVERNAME%% : License terms, + - %%DRIVERNAME%%-boot.fw : Boot mode firmware, + - %%DRIVERNAME%%-bss.fw : BSS mode firmware, + - %%DRIVERNAME%%-ucode-bss.fw : BSS mode micro-code, + - %%DRIVERNAME%%-ibss.fw : IBSS mode firmware, + - %%DRIVERNAME%%-ucode-ibss.fw : IBSS mode micro-code, + - %%DRIVERNAME%%-sniffer.fw : Sniffer mode firmware, + - %%DRIVERNAME%%-ucode-sniffer.fw : Sniffer mode micro-code. - # %%DRIVERNAME%%control -i %%DRIVERNAME%%0 -d %%DATADIR%% -m bss - -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 sniffer (optional). +Ensure you've read license terms carefully before you use this +firmware. +%%DONT_NEED_CONTROL%% +%%DONT_NEED_CONTROL%%You must choose the correct mode 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 -d %%DATADIR%% -m bss +%%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 sniffer (optional). %%MIGHT_NEED_MODULE%% %%MIGHT_NEED_MODULE%%Note: %%MIGHT_NEED_MODULE%% diff --git a/net/iwi-firmware/pkg-plist b/net/iwi-firmware/pkg-plist index af65766a487c..88df01e2791b 100644 --- a/net/iwi-firmware/pkg-plist +++ b/net/iwi-firmware/pkg-plist @@ -1,12 +1,14 @@ -sbin/%%DRIVERNAME%%control -%%DATADIR%%/LICENSE -%%DATADIR%%/%%DRIVERNAME%%-boot.fw -%%DATADIR%%/%%DRIVERNAME%%-bss.fw -%%DATADIR%%/%%DRIVERNAME%%-ucode-bss.fw -%%DATADIR%%/%%DRIVERNAME%%-ibss.fw -%%DATADIR%%/%%DRIVERNAME%%-ucode-ibss.fw -%%DATADIR%%/%%DRIVERNAME%%-sniffer.fw -%%DATADIR%%/%%DRIVERNAME%%-ucode-sniffer.fw -@dirrm %%DATADIR%% +@cwd / +%%WITH_CONTROL%%usr/sbin/%%DRIVERNAME%%control +@exec mkdir -p %%FWDIR%% +@cwd %%FWDIR%% +LICENSE.%%DRIVERNAME%% +%%DRIVERNAME%%-boot.fw +%%DRIVERNAME%%-bss.fw +%%DRIVERNAME%%-ucode-bss.fw +%%DRIVERNAME%%-ibss.fw +%%DRIVERNAME%%-ucode-ibss.fw +%%DRIVERNAME%%-sniffer.fw +%%DRIVERNAME%%-ucode-sniffer.fw %%WITH_MODULE%%@cwd / %%WITH_MODULE%%%%KMODDIR%%/if_%%DRIVERNAME%%.ko |