summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-01-29 23:47:47 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-01-29 23:47:47 +0000
commit5882969f9399786d38d41f6ff77f008d0f4315c6 (patch)
treea715c95b015e9b54023eacbb6dd602762126eb36 /comms
parentUpgrade to 1.3.2. (diff)
CDC Ethernet driver (driver for USB Linux-based PDAs: Sharp Zaurus, YOPY, etc).
Currently the driver is maintained out-of-tree as a set of files to be downloaded and built manually. PR: ports/76802 Submitted by: Craig Boston <craig@yekse.gank.org>
Notes
Notes: svn path=/head/; revision=127672
Diffstat (limited to 'comms')
-rw-r--r--comms/Makefile1
-rw-r--r--comms/cdce/Makefile39
-rw-r--r--comms/cdce/distinfo2
-rw-r--r--comms/cdce/pkg-deinstall23
-rw-r--r--comms/cdce/pkg-descr10
-rw-r--r--comms/cdce/pkg-install18
-rw-r--r--comms/cdce/pkg-message11
-rw-r--r--comms/cdce/pkg-plist2
8 files changed, 106 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index 80b6dd9f11dc..fe9a5cf6330f 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -11,6 +11,7 @@
SUBDIR += bforce-kst
SUBDIR += birda
SUBDIR += bpl+
+ SUBDIR += cdce
SUBDIR += cdr_read
SUBDIR += comserv
SUBDIR += conserver
diff --git a/comms/cdce/Makefile b/comms/cdce/Makefile
new file mode 100644
index 000000000000..b1d61a8be0a8
--- /dev/null
+++ b/comms/cdce/Makefile
@@ -0,0 +1,39 @@
+# New ports collection makefile for: cdce
+# Date Created: Jan 25, 2005
+# Whom: Craig Boston <craig@yekse.gank.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= cdce
+PORTVERSION= 1.0
+CATEGORIES= comms
+MASTER_SITES= http://www.gank.org/freebsd/cdce/
+
+MAINTAINER= craig@yekse.gank.org
+COMMENT= Driver for point-to-point CDC Ethernet interfaces
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 503000
+IGNORE= "FreeBSD versions prior to 5.3 are not supported"
+.endif
+NO_PACKAGE= Depends on kernel
+
+pre-fetch:
+.if !exists(${SRC_BASE}/sys/Makefile)
+ @${ECHO} "*************************************************"; \
+ ${ECHO} "This port requires the kernel source be available"; \
+ ${ECHO} "*************************************************"; \
+ exit 1
+.endif
+
+do-install:
+ ${MKDIR} ${PREFIX}/lib/cdce
+ ${INSTALL_SCRIPT} ${WRKSRC}/if_cdce.ko ${PREFIX}/lib/cdce
+
+post-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/comms/cdce/distinfo b/comms/cdce/distinfo
new file mode 100644
index 000000000000..44d138da06e1
--- /dev/null
+++ b/comms/cdce/distinfo
@@ -0,0 +1,2 @@
+MD5 (cdce-1.0.tar.gz) = 15d57b1d0d10256e7b88f6f7e237213b
+SIZE (cdce-1.0.tar.gz) = 6540
diff --git a/comms/cdce/pkg-deinstall b/comms/cdce/pkg-deinstall
new file mode 100644
index 000000000000..efa2236ae7fc
--- /dev/null
+++ b/comms/cdce/pkg-deinstall
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Unload cdce kernel module if necessary
+#
+# $FreeBSD$
+#
+
+if [ "x$2" != "xDEINSTALL" ]; then
+ exit 0
+fi
+
+echo "Disabling if_cdce."
+
+# Unload if_cdce kernel module
+kldstat -n if_cdce 2>/dev/null >/dev/null && kldunload if_cdce
+
+# Remove kernel module
+if [ `sysctl -n kern.osreldate` -ge 500000 ]; then
+ KMODDIR="/boot/modules"
+else
+ KMODDIR="/modules"
+fi
+[ -f ${KMODDIR}/if_cdce.ko ] && rm -f ${KMODDIR}/if_cdce.ko
diff --git a/comms/cdce/pkg-descr b/comms/cdce/pkg-descr
new file mode 100644
index 000000000000..a46245fa832f
--- /dev/null
+++ b/comms/cdce/pkg-descr
@@ -0,0 +1,10 @@
+This port builds a driver for several devices which communicate using Ethernet
+over USB (CDC Ethernet specification). It does not yet include support for
+more advanced devices such as cable modems, but is sufficient to talk to
+several Linux-based PDAs.
+
+This driver has been confirmed to work with Sharp Zaurus and YOPY handhelds.
+
+It currently only works on FreeBSD 5.3 or later.
+
+WWW: http://www.gank.org/freebsd/cdce/
diff --git a/comms/cdce/pkg-install b/comms/cdce/pkg-install
new file mode 100644
index 000000000000..b9c2c1f9a34a
--- /dev/null
+++ b/comms/cdce/pkg-install
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+PREFIX=${PKG_PREFIX:-/usr/local}
+
+[ "x$1" = "x" ] && exit 1
+if [ "x$2" = "xPOST-INSTALL" ]; then
+ if [ `sysctl -n kern.osreldate` -ge 500000 ]; then
+ KMODDIR="/boot/modules"
+ else
+ KMODDIR="/modules"
+ fi
+
+ install -C -o root -g wheel -m 555 ${PREFIX}/lib/cdce/if_cdce.ko \
+ ${KMODDIR}
+ kldxref ${KMODDIR}
+fi
diff --git a/comms/cdce/pkg-message b/comms/cdce/pkg-message
new file mode 100644
index 000000000000..dc0b6fdabfb4
--- /dev/null
+++ b/comms/cdce/pkg-message
@@ -0,0 +1,11 @@
+*******************************************************************************
+* Please add the line *
+* *
+* if_cdce_load="YES" *
+* *
+* to /boot/loader.conf if you wish the driver to be loaded at system startup. *
+*******************************************************************************
+* This port contains a prebuilt kernel module. Due to the ever changing *
+* nature of FreeBSD it may be necessary to rebuild the module after a kernel *
+* source update. To do this, reinstall the port. *
+*******************************************************************************
diff --git a/comms/cdce/pkg-plist b/comms/cdce/pkg-plist
new file mode 100644
index 000000000000..f2cc88bdb1d9
--- /dev/null
+++ b/comms/cdce/pkg-plist
@@ -0,0 +1,2 @@
+lib/cdce/if_cdce.ko
+@dirrm lib/cdce