aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorbsam <bsam@FreeBSD.org>2010-11-30 15:25:00 +0800
committerbsam <bsam@FreeBSD.org>2010-11-30 15:25:00 +0800
commit6db0fe6e42ec1eab5ab683bc48f733b0b81cef9f (patch)
treeed0b14f5a79d3407f3e815a6d15ccfa2b76edab7 /net
parentfcde2918fa537746df52cb03442e77246c4032b8 (diff)
downloadfreebsd-ports-graphics-6db0fe6e42ec1eab5ab683bc48f733b0b81cef9f.tar.gz
freebsd-ports-graphics-6db0fe6e42ec1eab5ab683bc48f733b0b81cef9f.tar.zst
freebsd-ports-graphics-6db0fe6e42ec1eab5ab683bc48f733b0b81cef9f.zip
A userland driver for wimax modems:
. Samsung SWC-U200; . Samsung SWC-E100.
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/lvwimax/Makefile40
-rw-r--r--net/lvwimax/distinfo2
-rw-r--r--net/lvwimax/files/lvwimax.conf.in8
-rw-r--r--net/lvwimax/files/lvwimax.in51
-rw-r--r--net/lvwimax/pkg-descr3
-rw-r--r--net/lvwimax/pkg-message8
7 files changed, 113 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 871a2de0798..4241782a0cc 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -364,6 +364,7 @@
SUBDIR += ltm
SUBDIR += lua50-luasocket
SUBDIR += luasocket
+ SUBDIR += lvwimax
SUBDIR += lyntin
SUBDIR += mDNSResponder
SUBDIR += mad_fcl
diff --git a/net/lvwimax/Makefile b/net/lvwimax/Makefile
new file mode 100644
index 00000000000..66950c962e3
--- /dev/null
+++ b/net/lvwimax/Makefile
@@ -0,0 +1,40 @@
+# New ports collection makefile for: net/lvwimax
+# Date created: 2010-06-04
+# Whom: bsam
+#
+# $FreeBSD$
+#
+
+PORTNAME= lvwimax
+PORTVERSION= 0.1
+CATEGORIES= net
+MASTER_SITES= ftp://ftp.ipt.ru/pub/download/ \
+ ${MASTER_SITE_LOCAL}
+
+MAINTAINER= bsam@FreeBSD.org
+COMMENT= A userland driver for Samsung WiMAX modems
+
+LICENSE= GPLv2
+
+USE_RC_SUBR= lvwimax
+
+PLIST_DIRSTRY= etc/devd
+PLIST_FILES= etc/devd/lvwimax.conf sbin/lvwimax
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 800069
+IGNORE= requires FreeBSD 8.0-RELEASE or later for libusb-1.0 support
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/Makefile
+
+post-install:
+ @${MKDIR} ${PREFIX}/etc/devd
+ @${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
+ < ${FILESDIR}/lvwimax.conf.in > ${WRKDIR}/lvwimax.conf
+ ${INSTALL_DATA} "${WRKDIR}/lvwimax.conf" ${PREFIX}/etc/devd
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/net/lvwimax/distinfo b/net/lvwimax/distinfo
new file mode 100644
index 00000000000..2ffd80e4e46
--- /dev/null
+++ b/net/lvwimax/distinfo
@@ -0,0 +1,2 @@
+SHA256 (lvwimax-0.1.tar.gz) = 9414ff03386c0fe4bcea9d65b1cc81e7a8021799e1a06adf25c92324689ee236
+SIZE (lvwimax-0.1.tar.gz) = 15768
diff --git a/net/lvwimax/files/lvwimax.conf.in b/net/lvwimax/files/lvwimax.conf.in
new file mode 100644
index 00000000000..7a8be12a6eb
--- /dev/null
+++ b/net/lvwimax/files/lvwimax.conf.in
@@ -0,0 +1,8 @@
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x04e8";
+ match "product" "0x6761";
+ action "%%PREFIX%%/etc/rc.d/lvwimax start";
+};
diff --git a/net/lvwimax/files/lvwimax.in b/net/lvwimax/files/lvwimax.in
new file mode 100644
index 00000000000..be612c2fec7
--- /dev/null
+++ b/net/lvwimax/files/lvwimax.in
@@ -0,0 +1,51 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: lvwimax
+# REQUIRE: DAEMON
+#
+# Add the following line to /etc/rc.conf[.local] to enable lvwimax:
+#
+# lvwimax_enable="YES"
+# lvwimax_mac_address="XX:XX:XX:XX:XX:XX", default is "00:00:00:00:00:00"
+#
+
+# XXX: tap0 interface is hardcoded at the driver
+lvwimax_tap_dev="tap0"
+
+. /etc/rc.subr
+
+name=lvwimax
+rcvar=${name}_enable
+
+load_rc_config $name
+
+lvwimax_enable=${lvwimax_enable-"NO"}
+lvwimax_mac_address=${lvwimax_mac_address-"00:00:00:00:00:00"}
+
+command=%%PREFIX%%/sbin/${name}
+command_args=""
+
+start_precmd="lvwimax_prestart"
+start_postcmd="lvwimax_poststart"
+stop_postcmd="lvwimax_poststop"
+
+lvwimax_prestart()
+{
+ ifconfig ${lvwimax_tap_dev} create
+ ifconfig ${lvwimax_tap_dev} mtu 1386
+ ifconfig ${lvwimax_tap_dev} ether ${lvwimax_mac_address}
+ ifconfig ${lvwimax_tap_dev} up
+}
+
+lvwimax_poststart()
+{
+ dhclient ${lvwimax_tap_dev}
+}
+
+lvwimax_poststop()
+{
+ ifconfig ${lvwimax_tap_dev} destroy
+}
+
+run_rc_command $1
diff --git a/net/lvwimax/pkg-descr b/net/lvwimax/pkg-descr
new file mode 100644
index 00000000000..cb0f8f3677f
--- /dev/null
+++ b/net/lvwimax/pkg-descr
@@ -0,0 +1,3 @@
+A userland driver for wimax modems:
+. Samsung SWC-U200;
+. Samsung SWC-E100.
diff --git a/net/lvwimax/pkg-message b/net/lvwimax/pkg-message
new file mode 100644
index 00000000000..a1268e0336d
--- /dev/null
+++ b/net/lvwimax/pkg-message
@@ -0,0 +1,8 @@
+*********************************************************************
+1) Please define MAC address (lvwimax_mac_address) at /etc/rc.conf[.local]
+
+2) Please restart devd as the configuration has changed
+
+ # /etc/rc.d/devd restart
+
+*********************************************************************