aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorosa <osa@FreeBSD.org>2008-04-22 15:57:02 +0800
committerosa <osa@FreeBSD.org>2008-04-22 15:57:02 +0800
commitd82a117cbe9b55a1ac50da7f2913fd41cfdb9aa2 (patch)
treee48c1ec12d19701a31fb4a5eab56711d97015024
parent32ae636da7ae4732aa642f278383d6ec5390115a (diff)
downloadfreebsd-ports-graphics-d82a117cbe9b55a1ac50da7f2913fd41cfdb9aa2.tar.gz
freebsd-ports-graphics-d82a117cbe9b55a1ac50da7f2913fd41cfdb9aa2.tar.zst
freebsd-ports-graphics-d82a117cbe9b55a1ac50da7f2913fd41cfdb9aa2.zip
Add new port ib-kmod - Kyocera UTU Iburst modem driver.
Submitted by: Tofig Suleymanov < tofig at freebsd dot az > Rewrite by: osa PR: 121153
-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 b0ab6dad945..1625ec305b0 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 00000000000..cf344f75b37
--- /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 00000000000..f895fc5239a
--- /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 00000000000..1056f4e8181
--- /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 00000000000..375d226c46e
--- /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 00000000000..91a6ee3fd77
--- /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 00000000000..ed09487c7b3
--- /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