aboutsummaryrefslogtreecommitdiff
path: root/net/ipw-firmware
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2005-05-17 09:33:50 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2005-05-17 09:33:50 +0000
commit51f1ef097bc6df7ff00819a2f53bb072888495a1 (patch)
tree04647f854feb3c49eb01da9fc9abe83cdefa6104 /net/ipw-firmware
parent0695fe3817183af73b23f0e6f3d94cc59267f2fb (diff)
downloadports-51f1ef097bc6df7ff00819a2f53bb072888495a1.tar.gz
ports-51f1ef097bc6df7ff00819a2f53bb072888495a1.zip
Notes
Diffstat (limited to 'net/ipw-firmware')
-rw-r--r--net/ipw-firmware/Makefile41
-rw-r--r--net/ipw-firmware/files/pkg-message.in17
-rw-r--r--net/ipw-firmware/pkg-plist2
3 files changed, 50 insertions, 10 deletions
diff --git a/net/ipw-firmware/Makefile b/net/ipw-firmware/Makefile
index f0c9dac8ef11..36700b675852 100644
--- a/net/ipw-firmware/Makefile
+++ b/net/ipw-firmware/Makefile
@@ -18,10 +18,14 @@ COMMENT= Intel PRO/Wireless 2100 Driver Firmware
IPW_VERSION= 1.6.4
DISTFILES+= ipw-freebsd-${IPW_VERSION}.tgz
+OPTIONS= MODULE "Install ipw(4) kernel module" off
+
WRKSRC= ${WRKDIR}
SUB_FILES= pkg-message
SUB_LIST= PORTVERSION="${PORTVERSION}"
-MAKE_ENV= BINDIR="${PREFIX}/sbin" MANDIR="${PREFIX}/man/man"
+MAKE_ENV= BINDIR="${PREFIX}/sbin" \
+ MANDIR="${PREFIX}/man/man" \
+ KMODDIR="/boot/modules"
USE_RC_SUBR= ipw.sh
MAN8= ipwcontrol.8
@@ -29,8 +33,39 @@ 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
+# 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.
+.if ${OSVERSION} < 503000
+IGNORE= Need a fresh version of RELENG_5
+.endif
+
+.if defined(WITH_MODULE)
+. if ${OSVERSION} > 600023
+IGNORE= ipw(4) support is already included in your tree
+. else
+PLIST_SUB+= IF_IPW_KO=""
+MAN4+= ipw.4
+. endif
+.else
+PLIST_SUB+= IF_IPW_KO="@comment "
+.endif
+
+# "Might" because people still can include ipw(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)
+SUB_LIST+= MIGHT_NEED_MODULE=""
+.else
+SUB_LIST+= MIGHT_NEED_MODULE="@comment "
+.endif
+
do-build:
+.if defined(WITH_MODULE)
+ cd ${WRKSRC}/ipw-freebsd-${IPW_VERSION}/src/; make all
+.else
cd ${WRKSRC}/ipw-freebsd-${IPW_VERSION}/src/usr.sbin/ipwcontrol/; make all
+.endif
do-install:
.if !defined(PACKAGE_BUILDING)
@@ -39,7 +74,11 @@ do-install:
${SH} ${PKGREQ} ${PORTNAME} INSTALL
.endif
${MKDIR} ${DATADIR}
+.if defined(WITH_MODULE)
+ cd ${WRKSRC}/ipw-freebsd-${IPW_VERSION}/src/; make install ${MAKE_ENV}
+.else
cd ${WRKSRC}/ipw-freebsd-${IPW_VERSION}/src/usr.sbin/ipwcontrol/; make install ${MAKE_ENV}
+.endif
.for i in LICENSE ipw2100-1.3-i.fw ipw2100-1.3-p.fw ipw2100-1.3.fw
${INSTALL_DATA} ${WRKSRC}/$i ${DATADIR}/
.endfor
diff --git a/net/ipw-firmware/files/pkg-message.in b/net/ipw-firmware/files/pkg-message.in
index 1fd56452065f..b5a4223fe4e0 100644
--- a/net/ipw-firmware/files/pkg-message.in
+++ b/net/ipw-firmware/files/pkg-message.in
@@ -26,13 +26,12 @@ to /etc/rc.conf to use it :
change to interface names list (optional).
- ipw_mode_<iface> (str) : defaults to "bss", possible values
are bss, ibss and monitor (optional).
-
-Note:
-
-This port requires ipw(4) driver which has not been MFC'ed to
-RELENG_5 yet. Point your web browser at [1] and install it by hand
-if not already done.
-
-[1] http://damien.bergamini.free.fr/ipw/
-
+%%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%%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 0a6f68ea8133..c982ba96098e 100644
--- a/net/ipw-firmware/pkg-plist
+++ b/net/ipw-firmware/pkg-plist
@@ -4,3 +4,5 @@ sbin/ipwcontrol
%%DATADIR%%/ipw2100-1.3-p.fw
%%DATADIR%%/ipw2100-1.3.fw
@dirrm %%DATADIR%%
+%%IF_IPW_KO%%@cwd /boot/modules
+%%IF_IPW_KO%%if_ipw.ko