aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorSergey A. Osokin <osa@FreeBSD.org>2008-04-22 07:57:02 +0000
committerSergey A. Osokin <osa@FreeBSD.org>2008-04-22 07:57:02 +0000
commita789cc8cf644f5ff1c9a3605baa215f63050ab29 (patch)
tree7ab81ad1e44def74f577c611f468d93e18261b74 /comms
parent3ebc67db6d4474b90da4368689db2c5f21622c3e (diff)
Add new port ib-kmod - Kyocera UTU Iburst modem driver.
Submitted by: Tofig Suleymanov < tofig at freebsd dot az > Rewrite by: osa PR: 121153
Notes
Notes: svn path=/head/; revision=211749
Diffstat (limited to 'comms')
-rw-r--r--comms/Makefile1
-rw-r--r--comms/ib-kmod/Makefile42
-rw-r--r--comms/ib-kmod/distinfo3
-rw-r--r--comms/ib-kmod/files/pkg-deinstall.in20
-rw-r--r--comms/ib-kmod/files/pkg-install.in12
-rw-r--r--comms/ib-kmod/files/pkg-message.in2
-rw-r--r--comms/ib-kmod/pkg-descr4
7 files changed, 84 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index b0ab6dad9458..1625ec305b03 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -46,6 +46,7 @@
SUBDIR += hcidump
SUBDIR += hf
SUBDIR += hylafax
+ SUBDIR += ib-kmod
SUBDIR += java-commapi
SUBDIR += java-commapi-freebsd
SUBDIR += jerm
diff --git a/comms/ib-kmod/Makefile b/comms/ib-kmod/Makefile
new file mode 100644
index 000000000000..cf344f75b375
--- /dev/null
+++ b/comms/ib-kmod/Makefile
@@ -0,0 +1,42 @@
+# New ports collection makefile for: ib
+# Date created: 27 February 2008
+# Whom: Tofig Suleymanov <tofig@freebsd.az>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ib
+PORTVERSION= 1.0.1
+CATEGORIES= comms kld
+MASTER_SITES= http://www.freebsd.az/other/
+PKGNAMESUFFIX= -kmod
+
+MAINTAINER= tofig@freebsd.az
+COMMENT= Driver for the Kyocera UTU Iburst modem
+
+MODULES_WITH_WORLD?= yes
+ONLY_FOR_ARCHS= i386
+SUB_FILES= pkg-install pkg-deinstall pkg-message
+SUB_LIST+= KMODDIR=${KMODDIR}
+PKGMESSAGE= ${WRKDIR}/pkg-message
+
+KMODDIR?= /boot/modules
+PLIST_FILES= "@cwd ${KMODDIR}" \
+ if_ib.ko
+
+pre-fetch:
+.if !exists(${SRC_BASE}/sys/Makefile)
+ @${ECHO} "*************************************************"; \
+ ${ECHO} "This port requires the kernel source be available"; \
+ ${ECHO} "*************************************************"; \
+ exit 1
+.endif
+
+do-install:
+ @${INSTALL_KLD} ${WRKSRC}/src/sys/modules/ib/if_ib.ko ${KMODDIR}
+
+post-install:
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/comms/ib-kmod/distinfo b/comms/ib-kmod/distinfo
new file mode 100644
index 000000000000..f895fc5239ab
--- /dev/null
+++ b/comms/ib-kmod/distinfo
@@ -0,0 +1,3 @@
+MD5 (ib-1.0.1.tar.gz) = 441a76cd3c4c41bb7757b11eab4c2862
+SHA256 (ib-1.0.1.tar.gz) = e325172bdaf701107d201807c4a162dcb087b8a7f08586ed4b18fade466b1b35
+SIZE (ib-1.0.1.tar.gz) = 7230
diff --git a/comms/ib-kmod/files/pkg-deinstall.in b/comms/ib-kmod/files/pkg-deinstall.in
new file mode 100644
index 000000000000..1056f4e81819
--- /dev/null
+++ b/comms/ib-kmod/files/pkg-deinstall.in
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# Unload if_ib module if necessary
+#
+# $FreeBSD$
+#
+
+KMODDIR="%%KMODDIR%%"
+
+case "$2" in
+DEINSTALL)
+ echo "Unloading if_ib kernel module."
+
+ # Unload the module if it is currently loaded.
+ kldstat -n if_ib 2>/dev/null >/dev/null && kldunload if_ib || true
+ ;;
+POST-DEINSTALL)
+ type kldxref >/dev/null 2>&1 && kldxref ${KMODDIR} || true
+ ;;
+esac
diff --git a/comms/ib-kmod/files/pkg-install.in b/comms/ib-kmod/files/pkg-install.in
new file mode 100644
index 000000000000..375d226c46e8
--- /dev/null
+++ b/comms/ib-kmod/files/pkg-install.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+KMODDIR="%%KMODDIR%%"
+
+if [ "$2" != "POST-INSTALL" ]; then
+ exit 0
+fi
+
+type kldxref >/dev/null 2>&1 && kldxref ${KMODDIR} || true
diff --git a/comms/ib-kmod/files/pkg-message.in b/comms/ib-kmod/files/pkg-message.in
new file mode 100644
index 000000000000..91a6ee3fd77d
--- /dev/null
+++ b/comms/ib-kmod/files/pkg-message.in
@@ -0,0 +1,2 @@
+For further instructions please visit:
+http://www.freebsd.az/blog/category/usb-driver-development/kyocera-iburst-usb-modem/
diff --git a/comms/ib-kmod/pkg-descr b/comms/ib-kmod/pkg-descr
new file mode 100644
index 000000000000..ed09487c7b32
--- /dev/null
+++ b/comms/ib-kmod/pkg-descr
@@ -0,0 +1,4 @@
+ib is a FreeBSD driver for the Kyocera UTU Iburst modem.
+
+- Tofig Suleymanov
+tofig@freebsd.az