diff options
author | Rajiv Aaron Manglani <rajiv@gentoo.org> | 2008-01-28 06:27:17 +0000 |
---|---|---|
committer | Rajiv Aaron Manglani <rajiv@gentoo.org> | 2008-01-28 06:27:17 +0000 |
commit | e7806155ee7458ea4fd906a3c80f14eb8ce9ba5c (patch) | |
tree | 1f41ee3cbc9400ef80cd0f3aacc13d059ff52df8 /net-misc/zaptel | |
parent | Version bump. (diff) | |
download | historical-e7806155ee7458ea4fd906a3c80f14eb8ce9ba5c.tar.gz historical-e7806155ee7458ea4fd906a3c80f14eb8ce9ba5c.tar.bz2 historical-e7806155ee7458ea4fd906a3c80f14eb8ce9ba5c.zip |
version bump, bug #205795. thanks to thomas stein for a patch suggestion,
and solar for help with amd64.
Package-Manager: portage-2.1.4
Diffstat (limited to 'net-misc/zaptel')
-rw-r--r-- | net-misc/zaptel/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/zaptel/Manifest | 20 | ||||
-rw-r--r-- | net-misc/zaptel/files/digest-zaptel-1.2.23 | 9 | ||||
-rw-r--r-- | net-misc/zaptel/files/zaptel-1.2.23-gentoo.diff | 67 | ||||
-rw-r--r-- | net-misc/zaptel/zaptel-1.2.23.ebuild | 363 |
5 files changed, 463 insertions, 5 deletions
diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog index 32c3c84699dd..f8adb84f2731 100644 --- a/net-misc/zaptel/ChangeLog +++ b/net-misc/zaptel/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/zaptel # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.101 2008/01/15 05:34:53 rajiv Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.102 2008/01/28 06:27:16 rajiv Exp $ + +*zaptel-1.2.23 (28 Jan 2008) + + 28 Jan 2008; Rajiv Aaron Manglani <rajiv@gentoo.org> + +files/zaptel-1.2.23-gentoo.diff, +zaptel-1.2.23.ebuild: + version bump, bug #205795. thanks to thomas stein for a patch suggestion, + and solar for help with amd64. *zaptel-1.2.22.1-r1 (15 Jan 2008) diff --git a/net-misc/zaptel/Manifest b/net-misc/zaptel/Manifest index 81d6dee731ef..65e50831c43e 100644 --- a/net-misc/zaptel/Manifest +++ b/net-misc/zaptel/Manifest @@ -26,6 +26,10 @@ AUX zaptel-1.2.22.1-gentoo.diff 3650 RMD160 c2f44b093562d73bb675457bbb181f9e286a MD5 1f59e4b42405bda79e789cb12de32cf0 files/zaptel-1.2.22.1-gentoo.diff 3650 RMD160 c2f44b093562d73bb675457bbb181f9e286a37e8 files/zaptel-1.2.22.1-gentoo.diff 3650 SHA256 9235a39a67b3fc581dceca284b7add5f3bdd0bffaa9a682b7d25ea7b5996d878 files/zaptel-1.2.22.1-gentoo.diff 3650 +AUX zaptel-1.2.23-gentoo.diff 2352 RMD160 33bfa3ad9645eb8a26576e680916dfbf52762beb SHA1 8518953978d1f4e9ac27c7a5e1f4dc2d49c1452d SHA256 43a66b279a7c65f94b728e146bc206f82119fc057230d517c30dc894f47b0361 +MD5 19039076196921fe70fe3d6bcc5c6f6a files/zaptel-1.2.23-gentoo.diff 2352 +RMD160 33bfa3ad9645eb8a26576e680916dfbf52762beb files/zaptel-1.2.23-gentoo.diff 2352 +SHA256 43a66b279a7c65f94b728e146bc206f82119fc057230d517c30dc894f47b0361 files/zaptel-1.2.23-gentoo.diff 2352 AUX zaptel-1.2.9.1-ar.patch 924 RMD160 24eac6e9c5a9576b04df1e595fa6a2e2487772fe SHA1 fdf329d360508d8e629d196d4f0e6ccfabf24dff SHA256 8a8374b2689ed70108d10eb704bb6d3b35550f33a183e039e7efd69c7a681485 MD5 235d2550fd9a0bde64929e27a6a2343d files/zaptel-1.2.9.1-ar.patch 924 RMD160 24eac6e9c5a9576b04df1e595fa6a2e2487772fe files/zaptel-1.2.9.1-ar.patch 924 @@ -74,6 +78,7 @@ DIST zaptel-1.2.12.tar.gz 1487021 RMD160 4cbf2627a8bbbad65ec43578c1c89e79f1682bd DIST zaptel-1.2.16.tar.gz 3047775 RMD160 dba8d97334aa7668166b33ef64498d2e3a27b6ad SHA1 b39e23012127ddad586335c0163850ce828c6370 SHA256 efe0a3ecc36cf8c8cd8dc2e017c71fa9d2c32ee7bdae60818f9ba64b9c11924c DIST zaptel-1.2.18.tar.gz 3076214 RMD160 e051b06311681c281a70c4826705b2ab315377c1 SHA1 9ec57df2548b77d4e591aa9253393153455177db SHA256 c1bfd262dcb428456cf590c6740f146d409faceeba9969585d8bec4ceb376b4d DIST zaptel-1.2.22.1.tar.gz 3602765 RMD160 ffe5173ddcf6bc8ddaaa1ef0e2b4f1f42ad06d2b SHA1 0105cd8b936d2299e72274a6bf3d165440ee6126 SHA256 762c593ceaa8b2b910ce4f9edea9be087d88f4453a99a004a78abac6e2ef31fd +DIST zaptel-1.2.23.tar.gz 3696838 RMD160 717f376273810310858c28d3cbf700c778b70d71 SHA1 992b8ca44076b8ebdbe39909753b585324c44082 SHA256 1b8a77b999ff60b37d6f4163d07458ca3f4c54c9bdba43b3385168a127705e5b DIST zaptel-1.2.9.1.tar.gz 1255412 RMD160 caf2ad931e2ae439500805a6ca4376dc8083de5a SHA1 6145301bb47107c0910a098e26b4ca5cdb2377ab SHA256 7def44c259352397af2ad80f3c0eb103ff640ffbc7c95f37c3802fee75c10ede EBUILD zaptel-1.2.11-r1.ebuild 9023 RMD160 a85a0f5225e67234ff5c1bda1c12b63b354e5a10 SHA1 1bfff3ce189db21c4ab62dbe120807191cc0702b SHA256 3c719f62712fe3ed83389c28dc94ab1cbe2ee2022187db225dc3183cd1c4d584 MD5 e902c0a9128595c5a1bf2405fb0c16ae zaptel-1.2.11-r1.ebuild 9023 @@ -107,14 +112,18 @@ EBUILD zaptel-1.2.22.1.ebuild 8803 RMD160 f350ff77a6724ff3e73a83dea2cde96add6f3d MD5 1e517623d97d26e091754687b5e788ca zaptel-1.2.22.1.ebuild 8803 RMD160 f350ff77a6724ff3e73a83dea2cde96add6f3db3 zaptel-1.2.22.1.ebuild 8803 SHA256 721a85c350aabd9a8eb44ed311b014d44808efcfe38418239e9440a9389adeaa zaptel-1.2.22.1.ebuild 8803 +EBUILD zaptel-1.2.23.ebuild 8913 RMD160 dcea8a04557abf36248a8c47d4bff0dee55faccf SHA1 0f8a9ed18b8d1f475bfe448bff1c0bbadb74a078 SHA256 429959252d02014f660e7f95d035ea01be7e05d97fc70282c5aa7e3d2831b175 +MD5 fedacd42128a91662fdfa8e546132de1 zaptel-1.2.23.ebuild 8913 +RMD160 dcea8a04557abf36248a8c47d4bff0dee55faccf zaptel-1.2.23.ebuild 8913 +SHA256 429959252d02014f660e7f95d035ea01be7e05d97fc70282c5aa7e3d2831b175 zaptel-1.2.23.ebuild 8913 EBUILD zaptel-1.2.9.1-r1.ebuild 8577 RMD160 b487dfe2f52b91b5cd5a75667a2c702bb65397c5 SHA1 b304a51b4e762ca281a54ddac822f3e2deabc4b7 SHA256 36b1e47f352425665c6ed1c77ba9a53374b5bb04e8aaabd8b9483b4c377df8bd MD5 3137e2eae66b020b7ac2d239b8d4008b zaptel-1.2.9.1-r1.ebuild 8577 RMD160 b487dfe2f52b91b5cd5a75667a2c702bb65397c5 zaptel-1.2.9.1-r1.ebuild 8577 SHA256 36b1e47f352425665c6ed1c77ba9a53374b5bb04e8aaabd8b9483b4c377df8bd zaptel-1.2.9.1-r1.ebuild 8577 -MISC ChangeLog 19877 RMD160 58a6550f4ea16a8450b4d74a5301b4107febafb2 SHA1 0e857170fd53236f7fedb04f965216c0e2e15759 SHA256 5e593b0ea22eb6dafdca6f43f22bfaa4b24f0ab8f406aa48b84cc78bdd2936a6 -MD5 2cbd077cba9eb98a908cbc677fe3e907 ChangeLog 19877 -RMD160 58a6550f4ea16a8450b4d74a5301b4107febafb2 ChangeLog 19877 -SHA256 5e593b0ea22eb6dafdca6f43f22bfaa4b24f0ab8f406aa48b84cc78bdd2936a6 ChangeLog 19877 +MISC ChangeLog 20131 RMD160 2284901726bc5b638f111c7b83223f7c524a7ae2 SHA1 df4c3450fb2fa7904f203cff5d221f0a7a0e40f1 SHA256 71672677c018b8d4c9b378527c5882d5e870c46c39cd96d89437a4f304bffee3 +MD5 808a205a0a65544f491954720c8dbb10 ChangeLog 20131 +RMD160 2284901726bc5b638f111c7b83223f7c524a7ae2 ChangeLog 20131 +SHA256 71672677c018b8d4c9b378527c5882d5e870c46c39cd96d89437a4f304bffee3 ChangeLog 20131 MISC metadata.xml 345 RMD160 ce0076215245b28c91df8fcaf8a62c26c4f6b17e SHA1 b5d75d0687c1bb698d4ead8663aae5b7e73728fe SHA256 79f621be31d2899b13106f9a518c4c34971005fee3dd15564582d107e62da2e8 MD5 cce1c5840330faab72b9b0c0c1f5a694 metadata.xml 345 RMD160 ce0076215245b28c91df8fcaf8a62c26c4f6b17e metadata.xml 345 @@ -143,6 +152,9 @@ SHA256 8e60a9f664c58a9e27e92525bc246fe9cf9932035594841506d79c2744155af8 files/di MD5 43dcb69dd6fb2e07c7db3a6b60a792f5 files/digest-zaptel-1.2.22.1-r1 819 RMD160 b807909bdc9d20d3d71c794df1f769fdbb6b6eae files/digest-zaptel-1.2.22.1-r1 819 SHA256 a40d25e520803c035b838d22019aa36c1c6ae4b81d271372fb2e1329a66f0ea8 files/digest-zaptel-1.2.22.1-r1 819 +MD5 1ea29468b85865f04f1cbf6acbaddb08 files/digest-zaptel-1.2.23 813 +RMD160 92513667e39950df1787d196f6b016216c537e33 files/digest-zaptel-1.2.23 813 +SHA256 12b0c553881700ca5c66cbe0c01f211607e3a2b60f6984547b27ea315d175409 files/digest-zaptel-1.2.23 813 MD5 4f0bce568656b2bd56047db290089c5e files/digest-zaptel-1.2.9.1-r1 658 RMD160 fed5eacf2bbc84ace2c5fdd4a4375d04312a761f files/digest-zaptel-1.2.9.1-r1 658 SHA256 9322dafee7f351be55a54eec5d617e1ee98b3a32aa5cb25546bd9631ac34487f files/digest-zaptel-1.2.9.1-r1 658 diff --git a/net-misc/zaptel/files/digest-zaptel-1.2.23 b/net-misc/zaptel/files/digest-zaptel-1.2.23 new file mode 100644 index 000000000000..d5c5d366cfdb --- /dev/null +++ b/net-misc/zaptel/files/digest-zaptel-1.2.23 @@ -0,0 +1,9 @@ +MD5 ede315067f70d7a202a081941155c6e9 bristuff-0.3.0-PRE-1y-l.tar.gz 300381 +RMD160 808862df63edf85997753e1e857cc907c54f2b60 bristuff-0.3.0-PRE-1y-l.tar.gz 300381 +SHA256 d083b6529e34c3192e91f34b68c542106ebaa5e3046d816061709297061d3576 bristuff-0.3.0-PRE-1y-l.tar.gz 300381 +MD5 c2abba3d64b2234f26983ba9e6235861 zaphfc_0.3.0-PRE-1y-l_florz-12.1.diff.gz 10277 +RMD160 20507dfa5fa9f882ebcd26b0634c07f34c4f0874 zaphfc_0.3.0-PRE-1y-l_florz-12.1.diff.gz 10277 +SHA256 e564ae8c5da0c27899dff3d9c32c4579cc86f9eaf848f972dbb361050c8c86f4 zaphfc_0.3.0-PRE-1y-l_florz-12.1.diff.gz 10277 +MD5 174f82ddcbfce74a6bea4a69bbef33cf zaptel-1.2.23.tar.gz 3696838 +RMD160 717f376273810310858c28d3cbf700c778b70d71 zaptel-1.2.23.tar.gz 3696838 +SHA256 1b8a77b999ff60b37d6f4163d07458ca3f4c54c9bdba43b3385168a127705e5b zaptel-1.2.23.tar.gz 3696838 diff --git a/net-misc/zaptel/files/zaptel-1.2.23-gentoo.diff b/net-misc/zaptel/files/zaptel-1.2.23-gentoo.diff new file mode 100644 index 000000000000..660d2394e7f0 --- /dev/null +++ b/net-misc/zaptel/files/zaptel-1.2.23-gentoo.diff @@ -0,0 +1,67 @@ +diff -uNr zaptel-1.2.23/build_tools/genmodconf zaptel-1.2.23.gentoo/build_tools/genmodconf +--- zaptel-1.2.23/build_tools/genmodconf 2007-07-11 14:58:09.000000000 -0400 ++++ zaptel-1.2.23.gentoo/build_tools/genmodconf 2008-01-27 12:15:34.000000000 -0500 +@@ -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 [ -z "${combined}" ]; then + echo "***" + echo "*** WARNING:" +diff -uNr zaptel-1.2.23/Makefile zaptel-1.2.23.gentoo/Makefile +--- zaptel-1.2.23/Makefile 2007-12-11 03:50:21.000000000 -0500 ++++ zaptel-1.2.23.gentoo/Makefile 2008-01-27 13:43:26.000000000 -0500 +@@ -108,7 +108,7 @@ + + INSTALL_PREFIX := /usr + +-CFLAGS+=-I. -O4 -g -fPIC -Wall ++CFLAGS+=-I. -g -Wall + ifneq (,$(findstring ppc,$(MACHINE))) + CFLAGS += -fsigned-char + KFLAGS += -msoft-float -fsigned-char +@@ -289,7 +289,7 @@ + $(CC) $(KFLAGS) -o $@ -c $< + + zonedata.lo tonezone.lo: %.lo: %.c +- $(CC) -c $(CFLAGS) -o $@ $^ ++ $(CC) -c $(CFLAGS) -fPIC -o $@ $^ + + tones.h: gendigits + ./gendigits > $@ +@@ -394,7 +394,7 @@ + else # DYNFS + ifdef UDEVRULES + install -d $(DESTDIR)/etc/udev/rules.d +- build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/zaptel.rules ++ build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/10-zaptel.rules + else # !UDEVRULES + @echo "**** Dynamic filesystem detected -- not creating device nodes" + endif +@@ -464,11 +464,10 @@ + rm -f $(DESTDIR)$(MODS_DIR)/wcfxsusb.o + endif + rm -f $(DESTDIR)$(MODS_DIR)/wcfxs.o +- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : + + install-libs: libs + install -D -m 755 $(LIBTONEZONE_SO) $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) +- [ `id -u` = 0 ] && /sbin/ldconfig || : ++ [ `id -u` = 0 ] && /sbin/ldconfig -n $(DESTDIR)$(LIBDIR) || : + rm -f $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO) + ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \ + $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER) diff --git a/net-misc/zaptel/zaptel-1.2.23.ebuild b/net-misc/zaptel/zaptel-1.2.23.ebuild new file mode 100644 index 000000000000..238b1d1cc543 --- /dev/null +++ b/net-misc/zaptel/zaptel-1.2.23.ebuild @@ -0,0 +1,363 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.23.ebuild,v 1.1 2008/01/28 06:27:16 rajiv Exp $ + +inherit toolchain-funcs eutils linux-mod flag-o-matic + +BRI_VERSION="0.3.0-PRE-1y-l" +FLORZ_VERSION="0.3.0-PRE-1y-l_florz-12.1" + +IUSE="astribank bri ecmark ecmark2 ecmark3 ecaggressive eckb1 ecmg2 ecsteve ecsteve2 florz +rtc watchdog zapras zapnet" + +MY_P="${P/_/-}" + +DESCRIPTION="Drivers for Digium and ZapataTelephony cards" +HOMEPAGE="http://www.asterisk.org" +SRC_URI="http://downloads.digium.com/pub/zaptel/releases/${MY_P}.tar.gz + bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz ) + florz? ( http://zaphfc.florz.dyndns.org/zaphfc_${FLORZ_VERSION}.diff.gz ) + " + +S="${WORKDIR}/${MY_P}" + +S_BRI="${WORKDIR}/bristuff-${BRI_VERSION}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~x86" + +RDEPEND="virtual/libc + dev-libs/libusb + >=dev-libs/newt-0.50.0 + astribank? ( dev-lang/perl )" + +DEPEND="${RDEPEND} virtual/linux-sources" + +# 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 kernel_is 2 4 ; then + if ! linux_chkconfig_present CRC32; then + echo + eerror "Your kernel lacks CRC32 support!" + eerror "Enable CONFIG_CRC32!" + result=$((result+1)) + fi + else + if ! linux_chkconfig_present CRC_CCITT; then + echo + eerror "Your kernel lacks CRC_CCIT support!" + eerror "Enable CONFIG_CRC_CCIT!" + result=$((result+1)) + fi + if ! linux_chkconfig_present FW_LOADER; then + echo + eerror "Your kernel lacks FW_LOADER support!" + eerror "Enable CONFIG_FW_LOADER!" + result=$((result+1)) + fi + 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}/${P}-gentoo.diff + epatch ${FILESDIR}/zaptel-1.2.9.1-ar.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 "Patching zaptel with florz (${FLORZ_VERSION}) for zaphfc" + 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=${KV_DIR} ARCH=$(tc-arch-kernel) || die + + if use astribank; then + cd ${S}/xpp/utils + make || die "make xpp utils failed" + fi + + 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() { + # Create firmware directory + mkdir -p ${D}/lib/firmware/ + + kernel_is 2 4 && cp /etc/modules.conf ${D}/etc + make DESTDIR=${D} ARCH=$(tc-arch-kernel) \ + KVERS=${KV_FULL} KSRC=/usr/src/linux devices firmware \ + install-modules install-programs || die + + dodoc ChangeLog README README.udev README.fxsusb zaptel.init + dodoc zaptel.conf.sample zaptel.sysconfig README.fxotune + + # additional tools + dobin ztmonitor ztspeed zttest fxotune + + # 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/TODO qozap/*.conf* + + docinto bristuff/zaphfc + dodoc zaphfc/*.conf + + docinto bristuff/cwain + dodoc cwain/TODO + + cd ${S} + fi + + # install init script + newinitd ${FILESDIR}/zaptel.rc6 zaptel + newconfd ${FILESDIR}/zaptel.confd zaptel + + # install udev rule file + insinto /etc/udev/rules.d + newins ${FILESDIR}/zaptel.udevd 10-zaptel.rules + + if use astribank; then + cd ${S}/xpp/utils + eval `perl '-V:installarchlib'` + make DESTDIR=${D} PERLLIBDIR=${installarchlib} install || die "failed xpp utils install" + dosbin zt_registration xpp_sync lszaptel + fi +} + +pkg_postinst() { + linux-mod_pkg_postinst + + echo + einfo "Use the /etc/init.d/zaptel script to load zaptel.conf settings on startup!" + einfo "This ebuild no longer sets permissions on device nodes. Please review" + einfo " /etc/udev/rules.d/10-zaptel.rules or the appropriate configuration" + einfo " method for your device node manager." + 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 +} |