diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2005-12-11 18:00:33 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2005-12-11 18:00:33 +0000 |
commit | 3e8a71e6d46db1c48f085f92bb5fb7c99a85f6f0 (patch) | |
tree | fc90c14fce697e4b079afddeccfc39dc8bb48f12 /net/ipw-firmware | |
parent | 591f47d4b56745611f20dafc6b4b844ead7b1055 (diff) | |
download | ports-3e8a71e6d46db1c48f085f92bb5fb7c99a85f6f0.tar.gz ports-3e8a71e6d46db1c48f085f92bb5fb7c99a85f6f0.zip |
Notes
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 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 |