aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2008-08-19 08:37:54 +0800
committeredwin <edwin@FreeBSD.org>2008-08-19 08:37:54 +0800
commitbcbe756c79c6fc24f55a0e64a26ce70067293ef5 (patch)
tree0bd89e9085adaf3b483e950ca2c394c64c94c5d8
parent761bd0094e705aeaa36a54aeba2d80300e6c48da (diff)
downloadfreebsd-ports-gnome-bcbe756c79c6fc24f55a0e64a26ce70067293ef5.tar.gz
freebsd-ports-gnome-bcbe756c79c6fc24f55a0e64a26ce70067293ef5.tar.zst
freebsd-ports-gnome-bcbe756c79c6fc24f55a0e64a26ce70067293ef5.zip
New Port: misc/wanpipe drivers for various sangoma cards
This package contains the latest Sangoma drivers that supports following Sangoma cards under FreeBSD OS: o AFT Series PCI/PCI Express cards o S51x PCI cards: The current version wanpipe-3.3.1 supports following protocols: o Asterisk/Zaptel interface o Cisco HDLC, Frame Relay and Point-to-Point o PPPoE and PPPoA (for S518 ADSL card) Release date: Tue Jul 15 14:27:03 UTC 2008 I have added a patch to configure_port.sh to accept a new parameter: the WRKSRC and to not enable TDM_VOICE and WANPIPE by default. Remove the pkg-deinstall script, that was just naughty. Added "kldxref" to the pkg-plist (just in case). Please note that: - The Makefile contains KMODDIR, but it is not used in the pkg-plist and in the softwares Makefiles. - Please add kldxref to the post-install target. PR: ports/125939 Submitted by: Josh Paetzel <josh@tcbug.org>
-rw-r--r--misc/Makefile1
-rw-r--r--misc/wanpipe/Makefile67
-rw-r--r--misc/wanpipe/distinfo3
-rw-r--r--misc/wanpipe/files/patch-configure_port.sh53
-rw-r--r--misc/wanpipe/pkg-descr10
-rw-r--r--misc/wanpipe/pkg-message4
-rw-r--r--misc/wanpipe/pkg-plist24
7 files changed, 162 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 857b9e890a5d..e7ebc99be4c7 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -534,6 +534,7 @@
SUBDIR += vifm
SUBDIR += viz
SUBDIR += voltcraft304
+ SUBDIR += wanpipe
SUBDIR += whichman
SUBDIR += wmScoreBoard
SUBDIR += wmcalendar
diff --git a/misc/wanpipe/Makefile b/misc/wanpipe/Makefile
new file mode 100644
index 000000000000..3851aaeb022d
--- /dev/null
+++ b/misc/wanpipe/Makefile
@@ -0,0 +1,67 @@
+#
+# Ports collection makefile for: wanpipe
+# Date created: Tue Jul 15 14:27:31 UTC 2008
+# Whom: Alex Feldman <al.feldman@sangoma.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= wanpipe
+PORTVERSION= 3.3.1
+CATEGORIES= misc net
+MASTER_SITES= ftp://ftp.sangoma.com/FreeBSD/wanpipe/ports/
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= josh@tcbug.org
+COMMENT= A FreeBSD Driver for Sangoma AFT/S51x Series Cards
+
+ONLY_FOR_ARCHS= i386 amd64
+NO_PACKAGE= Should be in sync with the kernel to work correctly
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \
+ LDFLAGS="-L${LOCALBASE}/lib"
+CPPFLAGS= -I${LOCALBASE}/include
+
+KMODDIR= /boot/modules
+MAKE_ENV= KMODDIR="${KMODDIR}" \
+ MKDIR="${MKDIR}" \
+ OSVERSION=${OSVERSION} \
+ CXX="${CXX}"
+
+PKGCONFIG= ${WRKSRC}/configure_port.sh
+PKGPOSTINSTALL= ${WRKSRC}/postinstall_port.sh
+PKGPOSTDEINSTALL=${WRKSRC}/post-deinstall
+OPTIONS= TDM_VOICE "Enable TDM Voice support" off \
+ WAN_PROTOCOL "Enable Wanpipe Protocol support" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_TDM_VOICE)
+EXTRACT_DEPENDS=${PORTSDIR}/misc/zaptel/work:${PORTSDIR}/misc/zaptel
+RUN_DEPENDS= pidof:${PORTSDIR}/sysutils/pidof
+.endif
+
+EXTRA_ARGS= ${PREFIX}
+
+.if defined(WITH_TDM_VOICE)
+EXTRA_ARGS+= WITH_TDM_VOICE
+.endif
+.if defined(WITH_WAN_PROTOCOL)
+EXTRA_ARGS+= WITH_WAN_PROTOCOL
+.endif
+
+pre-everything::
+ @if [ ! -f /usr/src/sys/Makefile ]; then \
+ ${ECHO_MSG} ">> The wanpipe port needs FreeBSD kernel source code to compile."; \
+ ${ECHO_MSG} ">> Please install FreeBSD kernel source code in /usr/src/sys."; \
+ ${FALSE}; \
+ fi
+
+do-configure:
+ @${SH} ${PKGCONFIG} ${DISTNAME} do-configure ${WRKSRC} ${EXTRA_ARGS}
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/misc/wanpipe/distinfo b/misc/wanpipe/distinfo
new file mode 100644
index 000000000000..d33b74e06aca
--- /dev/null
+++ b/misc/wanpipe/distinfo
@@ -0,0 +1,3 @@
+MD5 (wanpipe-3.3.1.tar.gz) = ffea176480cd19355feb4145f692a9a0
+SHA256 (wanpipe-3.3.1.tar.gz) = 45e434d836f02f90eb1358a7be7f7f94492de1dbe095297f74e195f8c7389cae
+SIZE (wanpipe-3.3.1.tar.gz) = 2822953
diff --git a/misc/wanpipe/files/patch-configure_port.sh b/misc/wanpipe/files/patch-configure_port.sh
new file mode 100644
index 000000000000..d954b7e7d38c
--- /dev/null
+++ b/misc/wanpipe/files/patch-configure_port.sh
@@ -0,0 +1,53 @@
+--- configure_port.sh 2008-07-15 14:27:24.000000000 +0000
++++ /tmp/configure_port.sh 2008-08-19 00:14:36.000000000 +0000
+@@ -1286,7 +1286,9 @@
+ {
+ local dir
+
++ echo dir: $dir
+ path=`find $1 -name 'zaptel.h'`
++ echo path: $path
+ if [ -z $path ]; then
+ print
+ print -e "\tZaptel sources are not found!"
+@@ -1337,9 +1339,10 @@
+ OSYSTEM_VER=`uname -r`
+ PKG_NAME=$1
+ PKG_ACTION=$2
+-WAN_BASE=$3
+-PKG_ARG1=$4
+-PKG_ARG2=$5
++WRKDIR=$3
++WAN_BASE=$4
++PKG_ARG1=$5
++PKG_ARG2=$6
+ SYSDIR=/usr/src/sys
+ WAN_BUILDDIR=/
+ WAN_BIN_DIR=${WAN_BASE}/sbin
+@@ -1348,8 +1351,6 @@
+ YACC=yacc
+ LEX=lex
+
+-WRKDIR=`pwd`/work/$1
+-
+ OUTPUT_TYPE=NORMAL
+
+ ZAPTEL_PORT=/usr/ports/misc/zaptel
+@@ -1362,11 +1363,12 @@
+
+ init_global_params
+
+-if [ -z "$PKG_ARG1" ]; then
+- # No options are selected, compile both TDM and WAN
+- PKG_ARG1="WITH_TDM_VOICE"
+- PKG_ARG2="WITH_WAN_PROTOCOL"
+-fi
++# This conflicts with the default settings of OPTIONS
++#if [ -z "$PKG_ARG1" ]; then
++# # No options are selected, compile both TDM and WAN
++# PKG_ARG1="WITH_TDM_VOICE"
++# PKG_ARG2="WITH_WAN_PROTOCOL"
++#fi
+ if [ "$PKG_ARG1" = "WITH_TDM_VOICE" ]; then
+ MODES="${MODES}-${TDM_MODES}"
+ get_zaptel_path $ZAPTEL_PORT
diff --git a/misc/wanpipe/pkg-descr b/misc/wanpipe/pkg-descr
new file mode 100644
index 000000000000..24e5534151c4
--- /dev/null
+++ b/misc/wanpipe/pkg-descr
@@ -0,0 +1,10 @@
+This package contains the latest Sangoma drivers that supports following
+Sangoma cards under FreeBSD OS:
+o AFT Series PCI/PCI Express cards
+o S51x PCI cards:
+The current version wanpipe-3.3.1 supports following protocols:
+o Asterisk/Zaptel interface
+o Cisco HDLC, Frame Relay and Point-to-Point
+o PPPoE and PPPoA (for S518 ADSL card)
+
+Release date: Tue Jul 15 14:27:03 UTC 2008
diff --git a/misc/wanpipe/pkg-message b/misc/wanpipe/pkg-message
new file mode 100644
index 000000000000..47a9bee88a73
--- /dev/null
+++ b/misc/wanpipe/pkg-message
@@ -0,0 +1,4 @@
+
+-------------------------------------------------------------------------------
+IMPORTANT! MAKE SURE TO READ THE FOLLOWING!
+
diff --git a/misc/wanpipe/pkg-plist b/misc/wanpipe/pkg-plist
new file mode 100644
index 000000000000..d4042e109af8
--- /dev/null
+++ b/misc/wanpipe/pkg-plist
@@ -0,0 +1,24 @@
+etc/rc.d/wanpipe
+sbin/sdladump
+sbin/wan_aftup
+sbin/wan_ec_client
+sbin/wan_plxup
+sbin/wancfg
+sbin/wancfg_legacy
+sbin/wancfg_zaptel
+sbin/wanconfig
+sbin/wanpipe_ft1exec
+sbin/wanpipe_cfgft1
+sbin/wanpipe_lxdialog
+sbin/wanpipemon
+sbin/wanpipemon_legacy
+sbin/wanrouter
+@cwd /boot/modules
+sdladrv.ko
+wan_aften.ko
+wanec.ko
+wanpipe.ko
+wanpipe_lip.ko
+wanrouter.ko
+@unexec kldxref %D
+@exec kldxref %D