diff --git a/net/Makefile b/net/Makefile index e48e649e2d7f..9ea72dc2cabe 100644 --- a/net/Makefile +++ b/net/Makefile @@ -261,6 +261,7 @@ SUBDIR += isc-dhcp3-devel SUBDIR += isc-dhcp3-relay SUBDIR += isc-dhcp3-server + SUBDIR += iwi-firmware SUBDIR += jabber SUBDIR += jabber-aim SUBDIR += jabber-conference diff --git a/net/iwi-firmware/Makefile b/net/iwi-firmware/Makefile new file mode 100644 index 000000000000..4cbcb18a6d6c --- /dev/null +++ b/net/iwi-firmware/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: iwi-firmware +# Date created: Jun 11 2005 +# Whom: Florent Thoumie +# +# $FreeBSD$ +# + +PORTNAME= iwi-firmware +RELNAME= ipw2200 +PORTVERSION= 2.3 +PORTREVISION= 0 +CATEGORIES= net sysutils + +MAINTAINER= flz@FreeBSD.org +COMMENT= Intel PRO/Wireless 2200 Driver Firmware + +MASTERDIR= ${.CURDIR}/../ipw-firmware +MD5_FILE= ${.CURDIR}/distinfo +PLIST= ${.CURDIR}/pkg-plist +FILESDIR= ${.CURDIR}/files + +DRIVERNAME= iwi +DRIVERVERSION= 1.3.4 +FIRMWARES= ipw-${PORTVERSION}-boot.fw \ + ipw-${PORTVERSION}-bss.fw \ + ipw-${PORTVERSION}-bss_ucode.fw \ + ipw-${PORTVERSION}-ibss.fw \ + ipw-${PORTVERSION}-ibss_ucode.fw \ + ipw-${PORTVERSION}-sniffer.fw \ + ipw-${PORTVERSION}-sniffer_ucode.fw + +.include "${MASTERDIR}/Makefile" diff --git a/net/iwi-firmware/distinfo b/net/iwi-firmware/distinfo new file mode 100644 index 000000000000..089c4a05f304 --- /dev/null +++ b/net/iwi-firmware/distinfo @@ -0,0 +1,4 @@ +MD5 (ipw2200-fw-2.3.tgz) = 487ba63b1bf98bc1e38059b6d3abea44 +SIZE (ipw2200-fw-2.3.tgz) = 267413 +MD5 (iwi-freebsd-1.3.4.tgz) = 037eceec361385cc8e0df42d6b9b9822 +SIZE (iwi-freebsd-1.3.4.tgz) = 22272 diff --git a/net/iwi-firmware/files/iwi.sh.in b/net/iwi-firmware/files/iwi.sh.in new file mode 100644 index 000000000000..f3f2748d1e8a --- /dev/null +++ b/net/iwi-firmware/files/iwi.sh.in @@ -0,0 +1,59 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: %%DRIVERNAME%% +# REQUIRE: LOGIN abi +# BEFORE: securelevel +# KEYWORD: FreeBSD shutdown + +# Add the following line to /etc/rc.conf to enable `%%DRIVERNAME%%': +# +# %%DRIVERNAME%%_enable="YES" +# + +. "%%RC_SUBR%%" + +name="%%DRIVERNAME%%" +rcvar=`set_rcvar` + +start_cmd="%%DRIVERNAME%%_start_cmd" +stop_cmd="%%DRIVERNAME%%_stop_cmd" + +load_rc_config "$name" +: ${%%DRIVERNAME%%_enable="NO"} +: ${%%DRIVERNAME%%_interfaces="%%DRIVERNAME%%0"} + +command="/usr/local/sbin/%%DRIVERNAME%%control" + +%%DRIVERNAME%%_start_cmd() +{ + echo -n "Starting %%DRIVERNAME%%" + for i in ${%%DRIVERNAME%%_interfaces}; do + eval _mode=\$%%DRIVERNAME%%_mode_${i} + case ${_mode} in + ""|bss|ibss|sniffer) + ;; + *) + echo "${_mode} - Possible values for %%DRIVERNAME%%_mode_${i} are bss|ibss|sniffer." + exit 1 + ;; + esac + + eval _mode=\$_%%DRIVERNAME%%_file_${i} + echo -n " [${i}:${_mode:=bss}]" + ${command} -i ${i} -d %%DATADIR%% -m ${_mode:=bss} + done + echo "." +} + +%%DRIVERNAME%%_stop_cmd() +{ + echo "Stopping %%DRIVERNAME%%." + for i in ${%%DRIVERNAME%%_interfaces}; do + ${command} -i ${i} -k + done +} + +run_rc_command "$1" diff --git a/net/iwi-firmware/files/pkg-message.in b/net/iwi-firmware/files/pkg-message.in new file mode 100644 index 000000000000..e38843d9d53e --- /dev/null +++ b/net/iwi-firmware/files/pkg-message.in @@ -0,0 +1,26 @@ +------------------------------------------------------------------ +You must choose the correct mode depending on how you want to +use your adapter. + +For instance, to download firmware for BSS mode: + + # %%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_ (str) : defaults to "bss", possible values + are bss, ibss and sniffer (optional). +%%MIGHT_NEED_MODULE%% +%%MIGHT_NEED_MODULE%%Note: +%%MIGHT_NEED_MODULE%% +%%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/iwi-firmware/pkg-plist b/net/iwi-firmware/pkg-plist new file mode 100644 index 000000000000..cd52dde14656 --- /dev/null +++ b/net/iwi-firmware/pkg-plist @@ -0,0 +1,12 @@ +sbin/%%DRIVERNAME%%control +%%DATADIR%%/LICENSE +%%DATADIR%%/ipw-%%PORTVERSION%%-boot.fw +%%DATADIR%%/ipw-%%PORTVERSION%%-bss.fw +%%DATADIR%%/ipw-%%PORTVERSION%%-bss_ucode.fw +%%DATADIR%%/ipw-%%PORTVERSION%%-ibss.fw +%%DATADIR%%/ipw-%%PORTVERSION%%-ibss_ucode.fw +%%DATADIR%%/ipw-%%PORTVERSION%%-sniffer.fw +%%DATADIR%%/ipw-%%PORTVERSION%%-sniffer_ucode.fw +@dirrm %%DATADIR%% +%%WITH_MODULE%%@cwd / +%%WITH_MODULE%%%%KMODDIR%%/if_%%DRIVERNAME%%.ko