summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Knoblich <stkn@gentoo.org>2006-09-05 19:15:11 +0000
committerStefan Knoblich <stkn@gentoo.org>2006-09-05 19:15:11 +0000
commit1799ae9e344b55024f6ae9018a328da4cef2bf5f (patch)
treecbb59320a84bf40f4351255cba36dededb0f708f /net-misc
parent~arch-ifying :) (diff)
downloadhistorical-1799ae9e344b55024f6ae9018a328da4cef2bf5f.tar.gz
historical-1799ae9e344b55024f6ae9018a328da4cef2bf5f.tar.bz2
historical-1799ae9e344b55024f6ae9018a328da4cef2bf5f.zip
Version bump, bristuff-0.3.0-PRE-1s.
Package-Manager: portage-2.1-r2
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/zaptel/ChangeLog8
-rw-r--r--net-misc/zaptel/Manifest21
-rw-r--r--net-misc/zaptel/files/digest-zaptel-1.2.89
-rw-r--r--net-misc/zaptel/files/zaptel-1.2.7-gentoo.diff102
-rw-r--r--net-misc/zaptel/zaptel-1.2.8.ebuild350
5 files changed, 485 insertions, 5 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog
index 25e8ad025c82..0ac690855102 100644
--- a/net-misc/zaptel/ChangeLog
+++ b/net-misc/zaptel/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/zaptel
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.78 2006/06/12 12:41:36 rajiv Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.79 2006/09/05 19:15:11 stkn Exp $
+
+*zaptel-1.2.8 (06 Sep 2006)
+
+ 06 Sep 2006; Stefan Knoblich <stkn@gentoo.org>
+ +files/zaptel-1.2.7-gentoo.diff, +zaptel-1.2.8.ebuild:
+ Version bump, bristuff-0.3.0-PRE-1s.
12 Jun 2006; Rajiv Aaron Manglani <rajiv@gentoo.org>
zaptel-1.0.10-r1.ebuild:
diff --git a/net-misc/zaptel/Manifest b/net-misc/zaptel/Manifest
index 161efe2f580b..fd0ad648beae 100644
--- a/net-misc/zaptel/Manifest
+++ b/net-misc/zaptel/Manifest
@@ -66,6 +66,10 @@ AUX zaptel-1.2.6-gentoo.diff 4565 RMD160 ed630e59ca0f100c7f69ef918a4a15ddb580a25
MD5 e641eafe0366cfa523df967a7d31241c files/zaptel-1.2.6-gentoo.diff 4565
RMD160 ed630e59ca0f100c7f69ef918a4a15ddb580a256 files/zaptel-1.2.6-gentoo.diff 4565
SHA256 49c3e58b351d9e7ec16d19f9e361a13ee041c5ed4dbdf389dfb34dabb4eaab1e files/zaptel-1.2.6-gentoo.diff 4565
+AUX zaptel-1.2.7-gentoo.diff 5007 RMD160 569c7ad06f1e4c4314109f9e071f6ca935060691 SHA1 391631fdbe69998bb9b886b40d9d28edcda5925d SHA256 5a32fe69d7263e46ec61e456d17bd6e8b427628ceff5638d8a399342c9a5f5a4
+MD5 798e6cbda44bd9af20aea83128f7bb5a files/zaptel-1.2.7-gentoo.diff 5007
+RMD160 569c7ad06f1e4c4314109f9e071f6ca935060691 files/zaptel-1.2.7-gentoo.diff 5007
+SHA256 5a32fe69d7263e46ec61e456d17bd6e8b427628ceff5638d8a399342c9a5f5a4 files/zaptel-1.2.7-gentoo.diff 5007
AUX zaptel-bristuff-0.2.0-RC8g.patch 5551 RMD160 9592e1f860ca0ef8cdb206a3f0379520937766da SHA1 5c6429756616a4a66363e0d62f927e25b0f4980d SHA256 9a637faa2891a7b2773f2a0f8124cb89041b64a1e33bf2b35e9e916ddc62dca2
MD5 cce31b4380f9c62e91293dff1523d5e0 files/zaptel-bristuff-0.2.0-RC8g.patch 5551
RMD160 9592e1f860ca0ef8cdb206a3f0379520937766da files/zaptel-bristuff-0.2.0-RC8g.patch 5551
@@ -105,6 +109,7 @@ DIST bristuff-0.2.0-RC8q.tar.gz 152037 RMD160 aaa9ca23eaeb74abc96dd7240f67e7886d
DIST bristuff-0.3.0-PRE-1n.tar.gz 248488 RMD160 3da3043a88551578b4495ae8e54ffb6a4f3bfd2c SHA1 c4aa937dffa7dec4ffed1c08bc228f6521c52306 SHA256 31b894bdd2741e309dfed23963db1cda3d74a8d616de8df9f1281b5558aa27f1
DIST bristuff-0.3.0-PRE-1o.tar.gz 252770 RMD160 60f1656a815bd1ff7d86ca7cb657c1d850a84804 SHA1 fd215b07533532c04f60212284a4cd1d6f18d5ba SHA256 aec95d12959181b601d7d10f05bb16eff715859dc8ea9fbb10e670296f61b6e9
DIST bristuff-0.3.0-PRE-1p.tar.gz 254003 RMD160 e87c0289bc598b52b962d192bc54008edc9b38a9 SHA1 5372bf13be0f5c7dd36046a8ac1cf5ed0fbb1f0b SHA256 d7dbb352ac68d64458919b94f815c8c97418c54fa8ae5411084370325528c164
+DIST bristuff-0.3.0-PRE-1s.tar.gz 265953 RMD160 8d3abdbbae4c376d52225395c72f4538e1f84a94 SHA1 1d942df9e4fd963755080e011caba88a33601c1b SHA256 30adea4f070ed44d1952163e850c177f976857b96965e18844ccd492ccef968d
DIST zaphfc_0.2.0-RC8a_florz-6.diff.gz 10428 RMD160 59117c086427dc30e10730900952e00063b4c01c SHA1 02724214e592c1b1e0bbb6e7284b7f85aeec3bf5 SHA256 175541f22c725d9b2c32249b44e918e6335bc2c1fe1830a8c76d19c6d5a2ae46
DIST zaphfc_0.2.0-RC8j_florz-8.diff.gz 10559 RMD160 81d490557da7dcb3771022d590b2fa69871d2662 SHA1 48e232dcb1c4f21a13bd8ec11187caae74cbcdaa SHA256 20aa0da6008ac9ebf989db0f1a8c052d1c86b5444ec28c8c1dd7779ba5627309
DIST zaphfc_0.3.0-PRE-1n_florz-11.diff.gz 10647 RMD160 31f1f82a5452bafa191b2023cfa559b8431786c6 SHA1 b34928127b7a2dafbbcc0d2761e76b8ecb6daa1a SHA256 923f6f8fa8a520d14978aab5ff2911234e587bee1fae085f76fb992ed9e1f9b1
@@ -115,6 +120,7 @@ DIST zaptel-1.0.8.tar.gz 326128 RMD160 f55ecfa8a8263b9342e2a0e7625c8e6083165880
DIST zaptel-1.0.9.2.tar.gz 327362 RMD160 22fb125e6a4e93b4d05a01c6ead99a58a4bf3e31 SHA1 c3725086a6fb122f30b77cb59ada2ac872a19ba8 SHA256 2734767ef00d6ddba8dba74801975d56082a48bb5e4c8299aa08210d73d09803
DIST zaptel-1.2.5.tar.gz 673161 RMD160 7de580a8424b436d77504501ef59c47f2498e04d SHA1 ac740850e49daed77683eaffba5732086a88f54f SHA256 8a80ccd9b2852de8a0ccf0036819d8e5cc0f73516f1fdcee3392c813a26ada5c
DIST zaptel-1.2.6.tar.gz 676658 RMD160 599cf3c78bb5b71a921dea9ca4716131224cd872 SHA1 cd61a2e7efdab4c5400af5c44c4009702daf5ea2 SHA256 24cd078469f2a3f131c3d28977f88426a45d9810f5a5d22109d5d57e43320938
+DIST zaptel-1.2.8.tar.gz 1139177 RMD160 89d69ab74b3d460c87ef9b6536a68b453ea59447 SHA1 0c074bda31634825f1290a45780929083431da99 SHA256 e1b41e13e6ff2cfd99ef47ab5a872fca8e19d73ebfde4db6bd7d33c5e452bac3
EBUILD zaptel-1.0.10-r1.ebuild 7197 RMD160 2f60f18488f4b49ac43e4310fe4501939f96b405 SHA1 e919d6ca40ee2efcc2afe1f898c4118207a1cf6b SHA256 e533d31fd85708fec97e0e315ee738ad964aadfeb84f8f9595059a6efca501a3
MD5 33564fe4757a198a8f2a627408c9a9b1 zaptel-1.0.10-r1.ebuild 7197
RMD160 2f60f18488f4b49ac43e4310fe4501939f96b405 zaptel-1.0.10-r1.ebuild 7197
@@ -143,10 +149,14 @@ EBUILD zaptel-1.2.6.ebuild 9205 RMD160 8e08b39c2b1aa7792dc74fa4f9db1188a2430fab
MD5 682c943ca7a293de4b933a3a675e2c40 zaptel-1.2.6.ebuild 9205
RMD160 8e08b39c2b1aa7792dc74fa4f9db1188a2430fab zaptel-1.2.6.ebuild 9205
SHA256 445058b42d6cedb7f2edeb50bdea4b92907e20c3c80cc679654b8d7447c92546 zaptel-1.2.6.ebuild 9205
-MISC ChangeLog 14799 RMD160 30a103cf3a64e4c486f4cd99451d43e49170f81d SHA1 66f8729382a2b31e30bad7dcf6a432dc675fafd8 SHA256 6d1f9c5299903543d5c3917798d6558b40921b556f5cef05ea43373deb5fcad7
-MD5 28ab1bfd2f2a354e6c26c03a88f9ed0e ChangeLog 14799
-RMD160 30a103cf3a64e4c486f4cd99451d43e49170f81d ChangeLog 14799
-SHA256 6d1f9c5299903543d5c3917798d6558b40921b556f5cef05ea43373deb5fcad7 ChangeLog 14799
+EBUILD zaptel-1.2.8.ebuild 8470 RMD160 a0e4e9036e086b825e7f9242325e2472db3338c4 SHA1 c509e136e01d8e72bb2cbeca382356131d81a5dc SHA256 0e1bb6822909be89da6839136a92cdd4c80e6eb8364d3939890ecd2f11105e02
+MD5 a2d6af00e71b4fa772b1a92ea9e7f77e zaptel-1.2.8.ebuild 8470
+RMD160 a0e4e9036e086b825e7f9242325e2472db3338c4 zaptel-1.2.8.ebuild 8470
+SHA256 0e1bb6822909be89da6839136a92cdd4c80e6eb8364d3939890ecd2f11105e02 zaptel-1.2.8.ebuild 8470
+MISC ChangeLog 14973 RMD160 e311a55a0f0640e4642a1aa80f4200ec86e91e17 SHA1 41ad016ddc7a964c51a1302dacc096559dd9d07c SHA256 156267b3708da309ed76deb256b29883b2c5307aad053313f3007a80d120ee21
+MD5 9eef29c0d969617ba458a2dc1238af79 ChangeLog 14973
+RMD160 e311a55a0f0640e4642a1aa80f4200ec86e91e17 ChangeLog 14973
+SHA256 156267b3708da309ed76deb256b29883b2c5307aad053313f3007a80d120ee21 ChangeLog 14973
MISC metadata.xml 382 RMD160 315172442a4bfaa87b855d4c421b22a2527e97b2 SHA1 7b95f41def10946742929592db1d76b7e3bb0a19 SHA256 f79d5cd273e9ecc2181e60ea226a7cb0128011d877fc7531b2df30bd5fd9ae20
MD5 f3d5d5b8a638e7a9a83fe0eb0d94282c metadata.xml 382
RMD160 315172442a4bfaa87b855d4c421b22a2527e97b2 metadata.xml 382
@@ -172,3 +182,6 @@ SHA256 c43892c542017555e81b888881227364230be6fb9fb95a8b0d3331a099ea3b7c files/di
MD5 3708063a489c0d321af32910c0ed7aa8 files/digest-zaptel-1.2.6 789
RMD160 3b5f6a6d32b45ba78ab69b9d8e9d8af4354f40de files/digest-zaptel-1.2.6 789
SHA256 e0c1e502dc6c176d176a5877ce51ece60d7b8e99f20d47f048e0ebcf760fe30c files/digest-zaptel-1.2.6 789
+MD5 a6e1954ca54083eaf0f9079164edc071 files/digest-zaptel-1.2.8 792
+RMD160 51ea672befd612e49938bac1e559706f704f0ec1 files/digest-zaptel-1.2.8 792
+SHA256 b6dfd4fefc934bb72147a6be58d94f058d0ac097d03cd58e2011aedad80d5f13 files/digest-zaptel-1.2.8 792
diff --git a/net-misc/zaptel/files/digest-zaptel-1.2.8 b/net-misc/zaptel/files/digest-zaptel-1.2.8
new file mode 100644
index 000000000000..1d93851cc785
--- /dev/null
+++ b/net-misc/zaptel/files/digest-zaptel-1.2.8
@@ -0,0 +1,9 @@
+MD5 760eba19b03d03cd1dc8648d6239b4af bristuff-0.3.0-PRE-1s.tar.gz 265953
+RMD160 8d3abdbbae4c376d52225395c72f4538e1f84a94 bristuff-0.3.0-PRE-1s.tar.gz 265953
+SHA256 30adea4f070ed44d1952163e850c177f976857b96965e18844ccd492ccef968d bristuff-0.3.0-PRE-1s.tar.gz 265953
+MD5 541b0a5910843d3c0b6a9de9467b9401 zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
+RMD160 b95d2301402e1108bc480ce0e66e87e3062eccf8 zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
+SHA256 04a8dd22d581b5d28d46a589d695f6eb634bf2bf355347a637fe2d560a63528c zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736
+MD5 f79ba7a843f86b1a072d808b712b8d44 zaptel-1.2.8.tar.gz 1139177
+RMD160 89d69ab74b3d460c87ef9b6536a68b453ea59447 zaptel-1.2.8.tar.gz 1139177
+SHA256 e1b41e13e6ff2cfd99ef47ab5a872fca8e19d73ebfde4db6bd7d33c5e452bac3 zaptel-1.2.8.tar.gz 1139177
diff --git a/net-misc/zaptel/files/zaptel-1.2.7-gentoo.diff b/net-misc/zaptel/files/zaptel-1.2.7-gentoo.diff
new file mode 100644
index 000000000000..c3c1d234a8f6
--- /dev/null
+++ b/net-misc/zaptel/files/zaptel-1.2.7-gentoo.diff
@@ -0,0 +1,102 @@
+--- zaptel-1.2.7/Makefile.orig 2006-07-07 20:03:59.000000000 +0200
++++ zaptel-1.2.7/Makefile 2006-07-17 19:52:09.000000000 +0200
+@@ -24,7 +24,7 @@
+ endif
+ KINCLUDES:=$(KSRC)/include
+
+-CFLAGS+=-I. -Iinclude -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
++CFLAGS+=-I. -Iinclude -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER
+ CFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
+ CFLAGS_X86-64:=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi)
+ CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64)
+@@ -308,7 +308,8 @@
+ done
+ else # DYNFS
+ ifdef UDEVRULES
+- build_tools/genudevrules > $(INSTALL_PREFIX)/etc/udev/rules.d/zaptel.rules
++ build_tools/genudevrules > zaptel.rules
++ install -D -m 644 zaptel.rules $(INSTALL_PREFIX)/etc/udev/rules.d/10-zaptel.rules
+ else # !UDEVRULES
+ @echo "**** Dynamic filesystem detected -- not creating device nodes"
+ endif
+@@ -337,24 +338,20 @@
+ fi; \
+ rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxs.o
+ install -D -m 755 $(LIBTONEZONE_SO) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
+- [ `id -u` = 0 ] && /sbin/ldconfig || :
++ [ `id -u` = 0 ] && /sbin/ldconfig -n $(INSTALL_PREFIX)/usr/lib || :
+ rm -f $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
+ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
+ $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER)
+ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
+ $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
+- if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then restorecon -v $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO); fi
+ install -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/linux/zaptel.h
+ install -D -m 644 torisa.h $(INSTALL_PREFIX)/usr/include/linux/torisa.h
+ install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h
+- install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
+- install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
+- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
++ install -D -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
++ install -D -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
+ [ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
+- build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel,$(MODULES))"
+- @if [ -d /etc/modutils ]; then \
+- /sbin/update-modules ; \
+- fi
++ install -d -m 755 $(INSTALL_PREFIX)/etc/modules.d
++ build_tools/genmodconf $(BUILDVER) "$(INSTALL_PREFIX)" "$(filter-out zaptel,$(MODULES))"
+
+ install-udev: devices
+
+--- zaptel-1.2.6/build_tools/genudevrules.orig 2006-06-04 15:57:29.000000000 +0200
++++ zaptel-1.2.6/build_tools/genudevrules 2006-06-04 15:58:11.000000000 +0200
+@@ -22,9 +22,9 @@
+
+ cat <<EOF
+ # zaptel devices with ownership/permissions for running as non-root
+-KERNEL${match}"zapctl", NAME="zap/ctl", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+-KERNEL${match}"zaptimer", NAME="zap/timer", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+-KERNEL${match}"zapchannel", NAME="zap/channel", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+-KERNEL${match}"zappseudo", NAME="zap/pseudo", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+-KERNEL${match}"zap[0-9]*", NAME="zap/%n", OWNER="asterisk", GROUP="asterisk", MODE="0660"
++KERNEL${match}"zapctl", NAME="zap/ctl", OWNER="root", GROUP="dialout", MODE="0660"
++KERNEL${match}"zaptimer", NAME="zap/timer", OWNER="root", GROUP="dialout", MODE="0660"
++KERNEL${match}"zapchannel", NAME="zap/channel", OWNER="root", GROUP="dialout", MODE="0660"
++KERNEL${match}"zappseudo", NAME="zap/pseudo", OWNER="root", GROUP="dialout", MODE="0660"
++KERNEL${match}"zap[0-9]*", NAME="zap/%n", OWNER="root", GROUP="dialout", MODE="0660"
+ EOF
+--- zaptel-1.2.6/build_tools/genmodconf.orig 2006-06-04 15:59:02.000000000 +0200
++++ zaptel-1.2.6/build_tools/genmodconf 2006-06-04 15:59:13.000000000 +0200
+@@ -79,20 +79,6 @@
+
+ echo Building ${target}...
+
+-if [ "${1}" == "linux24" ]; then
+- for mod in ${3}; do
+- if ! grep -q "post-install ${mod} " ${target}; then
+- echo "post-install ${mod} /sbin/ztcfg" >> ${target}
+- fi
+- done
+-elif [ "${1}" == "linux26" ]; then
+- for mod in ${3}; do
+- if ! grep -q "install ${mod} " ${target}; then
+- echo "install ${mod} /sbin/modprobe --ignore-install ${mod} ${cmdopts} && /sbin/ztcfg" >> ${target}
+- fi
+- done
+-fi
+-
+ if ! grep -q "alias wcfxs" ${target}; then
+ echo "alias wcfxs wctdm" >> ${target};
+ fi;
+--- zaptel-1.2.8/Makefile.orig 2006-09-05 23:34:53.000000000 +0000
++++ zaptel-1.2.8/Makefile 2006-09-05 23:35:23.000000000 +0000
+@@ -337,7 +337,7 @@
+ tar -zxf mISDNuser.tar.gz
+ $(MAKE) -C mISDNuser install
+
+-install: all devices firmware
++install: devices firmware
+ install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg
+ if [ -f sethdlc-new ]; then \
+ install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \
diff --git a/net-misc/zaptel/zaptel-1.2.8.ebuild b/net-misc/zaptel/zaptel-1.2.8.ebuild
new file mode 100644
index 000000000000..5615ed7ab468
--- /dev/null
+++ b/net-misc/zaptel/zaptel-1.2.8.ebuild
@@ -0,0 +1,350 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.8.ebuild,v 1.1 2006/09/05 19:15:11 stkn Exp $
+
+inherit toolchain-funcs eutils linux-mod
+
+## NOTE:
+#
+#
+
+BRI_VERSION="0.3.0-PRE-1s"
+FLORZ_VERSION="0.3.0-PRE-1o_florz-12"
+
+IUSE="bri ecmark ecmark2 ecmark3 ecaggressive eckb1 ecmg2 ecsteve ecsteve2 florz rtc ukcid watchdog zapras zapnet"
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="Drivers for Digium and ZapataTelephony cards"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://ftp.digium.com/pub/zaptel/releases/${MY_P}.tar.gz
+ bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )
+ florz? ( http://www.netdomination.org/pub/asterisk/zaphfc_${FLORZ_VERSION}.diff.gz )"
+
+S="${WORKDIR}/${MY_P}"
+
+S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="virtual/libc
+ virtual/linux-sources
+ >=dev-libs/newt-0.50.0"
+
+# list of echo canceller use flags,
+# first active in this list is selected (=order does matter)
+ZAP_EC_FLAGS="ecmark ecmark2 ecmark3 ecsteve ecsteve2 eckb1 ecmg2"
+
+### Begin: Helper functions
+
+select_echo_cancel() {
+ local myEC=""
+
+ for x in ${ZAP_EC_FLAGS}; do
+ if use $x; then
+ myEC=$(echo "$x" | sed -e "s:^ec::" | tr '[:lower:]' '[:upper:]')
+ break;
+ fi
+ done
+
+ echo ${myEC}
+}
+
+zconfig_disable() {
+ if grep -q "${1}" ${S}/zconfig.h; then
+ # match a little more than ${1} so we can use zconfig_disable
+ # to disable all echo cancellers in zconfig.h w/o calling it several times
+ sed -i -e "s:^[ \t]*#define[ \t]\+\(${1}[a-zA-Z0-9_-]*\).*:#undef \1:" \
+ ${S}/zconfig.h
+ fi
+
+ return $?
+}
+
+zconfig_enable() {
+ if grep -q "${1}" ${S}/zconfig.h; then
+ sed -i -e "s:^/\*[ \t]*#define[ \t]\+\(${1}\).*:#define \1:" \
+ -e "s:^[ \t]*#undef[ \t]\+\(${1}\).*:#define \1:" \
+ ${S}/zconfig.h
+ fi
+
+ return $?
+}
+
+### End: Helper functions
+
+pkg_setup() {
+ local result=0 numec=0
+
+ linux-mod_pkg_setup
+
+ einfo "Running pre-flight checks..."
+
+ # basic zaptel checks
+ if ! linux_chkconfig_present CRC_CCITT; then
+ echo
+ eerror "Your kernel lacks CRC_CCIT support!"
+ eerror "Enable CONFIG_CRC_CCIT!"
+ result=$((result+1))
+ fi
+
+ # check if multiple echo cancellers have been selected
+ for x in ${ZAP_EC_FLAGS}; do
+ use $x && numec=$((numec+1))
+ done
+ if [[ $numec -gt 1 ]]; then
+ # multiple flags are active, only the first in the ZAP_EC_FLAGS list
+ # will be used, make sure the user knows about this
+ echo
+ ewarn "Multiple echo canceller flags are active but only one will be used!"
+ ewarn "Selected: $(select_echo_cancel)"
+ fi
+
+ # we need at least HDLC generic support
+ if use zapnet && ! linux_chkconfig_present HDLC; then
+ echo
+ eerror "zapnet: Your kernel lacks HDLC support!"
+ eerror "zapnet: Enable CONFIG_HDLC* to use zaptel network support!"
+ result=$((result+1))
+ fi
+
+ # zapras needs PPP support
+ if use zapras && ! linux_chkconfig_present PPP; then
+ echo
+ eerror "zapras: Your kernel lacks PPP support!"
+ eerror "zapras: Enable CONFIG_PPP* to use zaptel ras support!"
+ result=$((result+1))
+ fi
+
+ # rtc needs linux-2.6 and CONFIG_RTC
+ if use rtc; then
+ if ! kernel_is 2 6; then
+ echo
+ eerror "rtc: >=Linux-2.6.0 is needed for rtc support!"
+ result=$((result+1))
+ fi
+
+ if ! linux_chkconfig_present RTC; then
+ eerror "rtc: Your kernel lacks RealTime-Clock support!"
+ result=$((result+1))
+ fi
+ fi
+
+ if [[ $result -gt 0 ]]; then
+ echo
+ ewarn "One or more of the neccessary precondition(s) is/are not met!"
+ ewarn "Look at the messages above, resolve the problem (or disable the use-flag) and try again"
+ echo
+
+ if [[ $result -lt 3 ]]; then
+ eerror "[$result Error(s)] Zaptel is not happy :("
+ else
+ eerror "[$result Error(s)] You're making zaptel cry :'("
+ fi
+ die "[$result] Precondition(s) not met"
+ fi
+
+ echo
+ einfo "Zaptel is happy and continues... :)"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/${PN}-1.2.7-gentoo.diff
+
+ use ukcid && \
+ epatch ${FILESDIR}/${PN}-1.2.0-ukcid.patch
+
+ # try to apply bristuff patch
+ if use bri; then
+ # fix for userpriv
+ chmod -R a=rwX ${S_BRI}
+
+ einfo "Patching zaptel w/ BRI stuff (${BRI_VERSION})"
+ epatch ${S_BRI}/patches/zaptel.patch
+
+ cd ${S_BRI}
+
+ if use florz; then
+ einfo "Using florz patches (${FLORZ_VERSION}) for zaphfc"
+
+ # remove as soon as there's a new florz patch available
+ sed -i -e "s:zaptel-1\.2\.5:zaptel-1.2.6:g" \
+ ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff
+
+ epatch ${WORKDIR}/zaphfc_${FLORZ_VERSION}.diff
+ fi
+
+ # patch includes
+ sed -i -e "s:^#include.*zaptel\.h.*:#include <zaptel.h>:" \
+ qozap/qozap.c \
+ zaphfc/zaphfc.c \
+ cwain/cwain.c
+
+ # patch makefiles
+ sed -i -e "s:^ZAP[\t ]*=.*:ZAP=-I${S}:" \
+ -e "s:^MODCONF=.*:MODCONF=/etc/modules.d/zaptel:" \
+ -e "s:linux-2.6:linux:g" \
+ qozap/Makefile \
+ zaphfc/Makefile \
+ cwain/Makefile
+
+ sed -i -e "s:^\(CFLAGS+=-I. \).*:\1 \$(ZAP):" \
+ zaphfc/Makefile
+
+ cd ${S}
+ fi
+
+### Configuration changes
+ local myEC
+
+ # prepare zconfig.h
+ myEC=$(select_echo_cancel)
+ if [[ -n "${myEC}" ]]; then
+ einfo "Selected echo canceller: ${myEC}"
+ # disable default first, set new selected ec afterwards
+ zconfig_disable ECHO_CAN
+ zconfig_enable ECHO_CAN_${myEC}
+ fi
+
+ # enable rtc support on 2.6
+ if use rtc && linux_chkconfig_present RTC && kernel_is 2 6; then
+ einfo "Enabling ztdummy RTC support"
+ zconfig_enable USE_RTC
+ fi
+
+ # enable agressive echo surpression
+ use ecaggressive && \
+ zconfig_enable AGGRESSIVE_SUPPRESSOR
+
+ # ppp ras support
+ use zapras && \
+ zconfig_enable CONFIG_ZAPATA_PPP
+
+ # frame relay, syncppp...
+ use zapnet && \
+ zconfig_enable CONFIG_ZAPATA_NET
+
+ # zaptel watchdog
+ use watchdog && \
+ zconfig_enable CONFIG_ZAPTEL_WATCHDOG
+}
+
+src_compile() {
+ # build
+ make KVERS=${KV_FULL} \
+ KSRC=/usr/src/linux ARCH=$(tc-arch-kernel) || die
+
+ if use bri; then
+ cd ${S_BRI}
+ for x in cwain qozap zaphfc; do
+ einfo "Building ${x}..."
+ make KVERS=${KV_FULL} \
+ KSRC=/usr/src/linux \
+ ARCH=$(tc-arch-kernel) \
+ -C ${x} || die "make ${x} failed"
+ done
+ fi
+}
+
+src_install() {
+ make INSTALL_PREFIX=${D} ARCH=$(tc-arch-kernel) \
+ KVERS=${KV_FULL} KSRC=/usr/src/linux install || die
+
+ dodoc ChangeLog README README.udev README.Linux26 README.fxsusb zaptel.init
+ dodoc zaptel.conf.sample LICENSE zaptel.sysconfig
+
+ # additional tools
+ dobin ztmonitor ztspeed zttest
+
+ # install all header files, several packages need the complete set
+ # (e.g. sangoma wanpipe)
+ insinto /usr/include/zaptel
+ doins *.h
+
+ if use bri; then
+ einfo "Installing bri"
+ cd ${S_BRI}
+
+ insinto /lib/modules/${KV_FULL}/misc
+ doins qozap/qozap.${KV_OBJ}
+ doins zaphfc/zaphfc.${KV_OBJ}
+ doins cwain/cwain.${KV_OBJ}
+
+ # install example configs for octoBRI and quadBRI
+ insinto /etc
+ doins qozap/zaptel.conf.octoBRI
+ newins qozap/zaptel.conf zaptel.conf.quadBRI
+ newins zaphfc/zaptel.conf zaptel.conf.zaphfc
+
+ insinto /etc/asterisk
+ doins qozap/zapata.conf.octoBRI
+ newins qozap/zapata.conf zapata.conf.quadBRI
+ newins zaphfc/zapata.conf zapata.conf.zaphfc
+
+ docinto bristuff
+ dodoc CHANGES INSTALL
+
+ docinto bristuff/qozap
+ dodoc qozap/LICENSE qozap/TODO qozap/*.conf*
+
+ docinto bristuff/zaphfc
+ dodoc zaphfc/LICENSE zaphfc/*.conf
+
+ docinto bristuff/cwain
+ dodoc cwain/TODO cwain/LICENSE
+
+ cd ${S}
+ fi
+
+ # install init script
+ newinitd ${FILESDIR}/zaptel.rc6 zaptel
+ newconfd ${FILESDIR}/zaptel.confd zaptel
+
+ # install devfsd rule file
+ insinto /etc/devfs.d
+ newins ${FILESDIR}/zaptel.devfsd zaptel
+
+ # install udev rule file
+ insinto /etc/udev/rules.d
+ newins ${FILESDIR}/zaptel.udevd 10-zaptel.rules
+
+ # fix permissions if there's no udev / devfs around
+ if [[ -d ${D}/dev/zap ]]; then
+ chown -R root:dialout ${D}/dev/zap
+ chmod -R u=rwX,g=rwX,o= ${D}/dev/zap
+ fi
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ echo
+ einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!"
+ echo
+
+ if use bri; then
+ einfo "Bristuff configs have been merged as:"
+ einfo ""
+ einfo "${ROOT}etc/"
+ einfo " zaptel.conf.zaphfc"
+ einfo " zaptel.conf.quadBRI"
+ einfo " zaptel.conf.octoBRI"
+ einfo ""
+ einfo "${ROOT}etc/asterisk/"
+ einfo " zapata.conf.zaphfc"
+ einfo " zapata.conf.quadBRI"
+ einfo " zapata.conf.octoBRI"
+ echo
+ fi
+
+ # fix permissions if there's no udev / devfs around
+ if [[ -d ${ROOT}dev/zap ]]; then
+ chown -R root:dialout ${ROOT}dev/zap
+ chmod -R u=rwX,g=rwX,o= ${ROOT}dev/zap
+ fi
+}