diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2005-05-17 14:21:54 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2005-05-17 14:21:54 +0000 |
commit | 67e221481c804149aba4c7d222f606803c559170 (patch) | |
tree | c050c8f6e66080a4487e0313290a7f21696570eb /net/ipw-firmware | |
parent | ced1449194af8791bdb239b4ec4c39b8d6f7e6f8 (diff) | |
download | ports-67e221481c804149aba4c7d222f606803c559170.tar.gz ports-67e221481c804149aba4c7d222f606803c559170.zip |
Notes
Diffstat (limited to 'net/ipw-firmware')
-rw-r--r-- | net/ipw-firmware/Makefile | 49 | ||||
-rw-r--r-- | net/ipw-firmware/files/ipw.sh.in | 42 | ||||
-rw-r--r-- | net/ipw-firmware/files/pkg-message.in | 22 | ||||
-rw-r--r-- | net/ipw-firmware/pkg-plist | 12 |
4 files changed, 67 insertions, 58 deletions
diff --git a/net/ipw-firmware/Makefile b/net/ipw-firmware/Makefile index 36700b675852..69bf48ac80da 100644 --- a/net/ipw-firmware/Makefile +++ b/net/ipw-firmware/Makefile @@ -6,34 +6,43 @@ # PORTNAME= ipw-firmware +RELNAME= ipw2100 PORTVERSION= 1.3 +PORTREVISION= 1 CATEGORIES= net sysutils MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= flz/ipw -DISTFILES= ipw2100-fw-${PORTVERSION}.tgz +DISTFILES= ${RELNAME}-fw-${PORTVERSION}.tgz MAINTAINER= flz@FreeBSD.org COMMENT= Intel PRO/Wireless 2100 Driver Firmware -IPW_VERSION= 1.6.4 -DISTFILES+= ipw-freebsd-${IPW_VERSION}.tgz +DRIVERNAME= ipw +DRIVERVERSION= 1.6.4 +DRIVERDISTNAME= ${DRIVERNAME}-freebsd-${DRIVERVERSION} +DISTFILES+= ${DRIVERDISTNAME}.tgz -OPTIONS= MODULE "Install ipw(4) kernel module" off +OPTIONS= MODULE "Install ${DRIVERNAME}(4) kernel module" off WRKSRC= ${WRKDIR} +KMODDIR= /boot/modules SUB_FILES= pkg-message -SUB_LIST= PORTVERSION="${PORTVERSION}" +SUB_LIST= DRIVERNAME="${DRIVERNAME}" \ + RELNAME="${RELNAME}" \ + PORTVERSION="${PORTVERSION}" \ + KMODDIR="${KMODDIR}" +PLIST_SUB:= ${SUB_LIST} MAKE_ENV= BINDIR="${PREFIX}/sbin" \ MANDIR="${PREFIX}/man/man" \ - KMODDIR="/boot/modules" -USE_RC_SUBR= ipw.sh + KMODDIR="${KMODDIR}" +USE_RC_SUBR= ${DRIVERNAME}.sh -MAN8= ipwcontrol.8 +MAN8= ${DRIVERNAME}control.8 MANCOMPRESSED= yes .include <bsd.port.pre.mk> -# That's a bit arbitrary since I have no idea if ipw(4) can be compiled on FreeBSD +# That's a bit arbitrary since I have no idea if ${DRIVERNAME}(4) can be compiled on FreeBSD # previous to 5.3-RELEASE. This is just too old, people should move on. # I may change this if I get successful reports though. # Comment this if you want to test it anyway. @@ -43,18 +52,18 @@ IGNORE= Need a fresh version of RELENG_5 .if defined(WITH_MODULE) . if ${OSVERSION} > 600023 -IGNORE= ipw(4) support is already included in your tree +IGNORE= ${DRIVERNAME}(4) support is already included in your tree . else -PLIST_SUB+= IF_IPW_KO="" -MAN4+= ipw.4 +PLIST_SUB+= WITH_MODULE="" +MAN4+= ${DRIVERNAME}.4 . endif .else -PLIST_SUB+= IF_IPW_KO="@comment " +PLIST_SUB+= WITH_MODULE="@comment " .endif -# "Might" because people still can include ipw(4) support in kernel by extracting +# "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(/boot/modules/if_ipw.ko) && !defined(WITH_MODULE) +.if ${OSVERSION} <= 600023 && !exists(${KMODDIR}/if_${DRIVERNAME}.ko) && !defined(WITH_MODULE) SUB_LIST+= MIGHT_NEED_MODULE="" .else SUB_LIST+= MIGHT_NEED_MODULE="@comment " @@ -62,9 +71,9 @@ SUB_LIST+= MIGHT_NEED_MODULE="@comment " do-build: .if defined(WITH_MODULE) - cd ${WRKSRC}/ipw-freebsd-${IPW_VERSION}/src/; make all + cd ${WRKSRC}/${DRIVERDISTNAME}/src/; make all .else - cd ${WRKSRC}/ipw-freebsd-${IPW_VERSION}/src/usr.sbin/ipwcontrol/; make all + cd ${WRKSRC}/${DRIVERDISTNAME}/src/usr.sbin/${DRIVERNAME}control/; make all .endif do-install: @@ -75,11 +84,11 @@ do-install: .endif ${MKDIR} ${DATADIR} .if defined(WITH_MODULE) - cd ${WRKSRC}/ipw-freebsd-${IPW_VERSION}/src/; make install ${MAKE_ENV} + cd ${WRKSRC}/${DRIVERDISTNAME}/src/; make install ${MAKE_ENV} .else - cd ${WRKSRC}/ipw-freebsd-${IPW_VERSION}/src/usr.sbin/ipwcontrol/; make install ${MAKE_ENV} + cd ${WRKSRC}/${DRIVERDISTNAME}/src/usr.sbin/${DRIVERNAME}control/; make install ${MAKE_ENV} .endif -.for i in LICENSE ipw2100-1.3-i.fw ipw2100-1.3-p.fw ipw2100-1.3.fw +.for i in LICENSE ${RELNAME}-${PORTVERSION}-i.fw ${RELNAME}-${PORTVERSION}-p.fw ${RELNAME}-${PORTVERSION}.fw ${INSTALL_DATA} ${WRKSRC}/$i ${DATADIR}/ .endfor diff --git a/net/ipw-firmware/files/ipw.sh.in b/net/ipw-firmware/files/ipw.sh.in index c208e6477688..87ab2f4f4d37 100644 --- a/net/ipw-firmware/files/ipw.sh.in +++ b/net/ipw-firmware/files/ipw.sh.in @@ -3,62 +3,62 @@ # $FreeBSD$ # -# PROVIDE: ipw +# PROVIDE: %%DRIVERNAME%% # REQUIRE: LOGIN abi # BEFORE: securelevel # KEYWORD: FreeBSD shutdown -# Add the following line to /etc/rc.conf to enable `ipw': +# Add the following line to /etc/rc.conf to enable `%%DRIVERNAME%%': # -# ipw_enable="YES" +# %%DRIVERNAME%%_enable="YES" # . "%%RC_SUBR%%" -name="ipw" +name="%%DRIVERNAME%%" rcvar=`set_rcvar` -start_cmd="ipw_start_cmd" -stop_cmd="ipw_stop_cmd" +start_cmd="%%DRIVERNAME%%_start_cmd" +stop_cmd="%%DRIVERNAME%%_stop_cmd" load_rc_config "$name" -: ${ipw_enable="NO"} -: ${ipw_interfaces="ipw0"} +: ${%%DRIVERNAME%%_enable="NO"} +: ${%%DRIVERNAME%%_interfaces="%%DRIVERNAME%%0"} -command="/usr/sbin/ipwcontrol" +command="/usr/local/sbin/%%DRIVERNAME%%control" -ipw_start_cmd() +%%DRIVERNAME%%_start_cmd() { - echo -n "Starting ipw" - for i in ${ipw_interfaces}; do - eval _mode=\$ipw_mode_${i} + echo -n "Starting %%DRIVERNAME%%" + for i in ${%%DRIVERNAME%%_interfaces}; do + eval _mode=\$%%DRIVERNAME%%_mode_${i} case ${_mode} in ""|bss) - eval _ipw_file_${i}="ipw2100-%%PORTVERSION%%.fw" + eval _%%DRIVERNAME%%_file_${i}="%%RELNAME%%-%%PORTVERSION%%.fw" ;; ibss) - eval _ipw_file_${i}="ipw2100-%%PORTVERSION%%-i.fw" + eval _%%DRIVERNAME%%_file_${i}="%%RELNAME%%-%%PORTVERSION%%-i.fw" ;; monitor) - eval _ipw_file_${i}="ipw2100-%%PORTVERSION%%-p.fw" + eval _%%DRIVERNAME%%_file_${i}="%%RELNAME%%-%%PORTVERSION%%-p.fw" ;; *) - echo "${_mode} - Possible values for ipw_mode_${i} are bss|ibss|monitor." + echo "${_mode} - Possible values for %%DRIVERNAME%%_mode_${i} are bss|ibss|monitor." exit 1 ;; esac - eval _file=\$_ipw_file_${i} + eval _file=\$_%%DRIVERNAME%%_file_${i} echo -n " [${i}:${_mode:=bss}]" ${command} -i ${i} -f %%DATADIR%%/${_file} done echo "." } -ipw_stop_cmd() +%%DRIVERNAME%%_stop_cmd() { - echo "Stopping ipw." - for i in ${ipw_interfaces}; do + echo "Stopping %%DRIVERNAME%%." + for i in ${%%DRIVERNAME%%_interfaces}; do ${command} -i ${i} -k done } diff --git a/net/ipw-firmware/files/pkg-message.in b/net/ipw-firmware/files/pkg-message.in index b5a4223fe4e0..b300d56ca2cb 100644 --- a/net/ipw-firmware/files/pkg-message.in +++ b/net/ipw-firmware/files/pkg-message.in @@ -2,9 +2,9 @@ This port has installed following files in %%DATADIR%%: - LICENSE : License terms, - - ipw2100-1.3-i.fw : IBSS mode (aka ad-hoc mode) firmware, - - ipw2100-1.3-p.fw : Monitor mode firmware, - - ipw2100-1.3.fw : BSS mode (aka infrastructure mode) firmware. + - %%RELNAME%%-%%PORTVERSION%%-i.fw : IBSS mode (aka ad-hoc mode) firmware, + - %%RELNAME%%-%%PORTVERSION%%-p.fw : Monitor mode firmware, + - %%RELNAME%%-%%PORTVERSION%%.fw : BSS mode (aka infrastructure mode) firmware. Ensure you've read license terms carefully before you use this firmware. @@ -14,23 +14,23 @@ use your adapter. For instance, to download firmware for BSS mode: - # ipwcontrol -i ipw0 \ - -f %%DATADIR%%/ipw2100-1.3.fw + # %%DRIVERNAME%%control -i %%DRIVERNAME%%0 \ + -f %%DATADIR%%/%%RELNAME%%-%%PORTVERSION%%.fw -The port has installed a startup script (ipw.sh). Add these lines +The port has installed a startup script (%%DRIVERNAME%%.sh). Add these lines to /etc/rc.conf to use it : - - ipw_enable (bool) : defaults to "NO", set it to "YES" to + - %%DRIVERNAME%%_enable (bool) : defaults to "NO", set it to "YES" to use the startup script. - - ipw_interfaces (str) : defaults to "ipw0", override it to + - %%DRIVERNAME%%_interfaces (str) : defaults to "%%DRIVERNAME%%0", override it to change to interface names list (optional). - - ipw_mode_<iface> (str) : defaults to "bss", possible values + - %%DRIVERNAME%%_mode_<iface> (str) : defaults to "bss", possible values are bss, ibss and monitor (optional). %%MIGHT_NEED_MODULE%% %%MIGHT_NEED_MODULE%%Note: %%MIGHT_NEED_MODULE%% -%%MIGHT_NEED_MODULE%%This port requires ipw(4) driver which has not been MFC'ed to -%%MIGHT_NEED_MODULE%%RELENG_5 yet. Point your web browser at [1] and install it by hand +%%MIGHT_NEED_MODULE%%This port requires %%DRIVERNAME%%(4) driver which has not been MFC'ed to +%%MIGHT_NEED_MODULE%%RELENG_5. Point your web browser at [1] and install it by hand %%MIGHT_NEED_MODULE%%if not already done or rebuild the port with WITH_MODULE=yes. %%MIGHT_NEED_MODULE%% %%MIGHT_NEED_MODULE%%[1] http://damien.bergamini.free.fr/ipw/ diff --git a/net/ipw-firmware/pkg-plist b/net/ipw-firmware/pkg-plist index c982ba96098e..10901beca8bd 100644 --- a/net/ipw-firmware/pkg-plist +++ b/net/ipw-firmware/pkg-plist @@ -1,8 +1,8 @@ -sbin/ipwcontrol +sbin/%%DRIVERNAME%%control %%DATADIR%%/LICENSE -%%DATADIR%%/ipw2100-1.3-i.fw -%%DATADIR%%/ipw2100-1.3-p.fw -%%DATADIR%%/ipw2100-1.3.fw +%%DATADIR%%/%%RELNAME%%-%%PORTVERSION%%-i.fw +%%DATADIR%%/%%RELNAME%%-%%PORTVERSION%%-p.fw +%%DATADIR%%/%%RELNAME%%-%%PORTVERSION%%.fw @dirrm %%DATADIR%% -%%IF_IPW_KO%%@cwd /boot/modules -%%IF_IPW_KO%%if_ipw.ko +%%WITH_MODULE%%@cwd %%KMODDIR%% +%%WITH_MODULE%%if_%%DRIVERNAME%%.ko |