From: Gustavo Zacarias Date: Wed, 17 Jan 2007 17:51:21 +0000 (+0000) Subject: New rev with BRIstuff-0.3.0-PRE-1x X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a197d3af4601df241d17c79394b83f6440f48623;p=gentoo.git New rev with BRIstuff-0.3.0-PRE-1x Package-Manager: portage-2.1.1-r2 --- diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest index 06b590538bfb..f52c2cce1e13 100644 --- a/net-misc/asterisk/Manifest +++ b/net-misc/asterisk/Manifest @@ -137,9 +137,12 @@ DIST asterisk-1.2.12.1-bristuff-0.3.0-PRE-1s.diff.bz2 90730 RMD160 7a13105a0dbe1 DIST asterisk-1.2.12.1.tar.gz 10576676 RMD160 9950eea63e03ffd5845f6a34f46680eec5a0a53b SHA1 6352ca330b8fa0ae9eb0816272070a1bce58c93b SHA256 e54fc05f30764ad6678337ae386918481dd99347cfaa2d85fed3d0dc3a548d56 DIST asterisk-1.2.13-bristuff-0.3.0-PRE-1s.diff.bz2 90716 RMD160 8a9a66f9397fa2b6892967ae98c9990ef400d829 SHA1 3e1a2435d21f51b7eefac810e78cc7def5b06a38 SHA256 e6fff5febd78944399148c373cdcf4e112e8dfc82e36fa87cea79e882e780354 DIST asterisk-1.2.13.tar.gz 10584113 RMD160 7cf9e00a0697b16891b463345c64a615c30015a3 SHA1 d2ec77e08f512a3fa11fd8639a7fe629a46ed242 SHA256 8d197b118d9ee25bc8793b37d1daa6b54fd6074e6738f462368361e5698d98f8 +DIST asterisk-1.2.14-bristuff-0.3.0-PRE-1x.diff.bz2 95462 RMD160 4b592148b692d010dfd64df4a969838d15525489 SHA1 657772d3fce53570bf877c8b084f59f73e3af8b8 SHA256 30203a73f6f409bc96f0896d26d1cba47857e040003f6e066227519bb2ef91ef +DIST asterisk-1.2.14.tar.gz 10595184 RMD160 c07410e57086ebc34c78fd6794fa5395c3f5a174 SHA1 1e88a30bcd3d78c1cdee44b80e0162516102ea86 SHA256 115248cb7b1fc35dc2be24218f91a87272cf5c0d8c2050a36da2314fadc05cf4 DIST asterisk-addons-1.0.9.tar.gz 73716 RMD160 98156861f790987fb4bf86b14c902aeca90b380b SHA1 b1d21de7cf338bc36a1d59846e46295c3844ccf4 SHA256 4c878a4e5b5aabbdd93116ccbca5cf6465d55f480f4aa1e6438e9fc49c1f11fe DIST bristuff-0.2.0-RC8r.tar.gz 194888 RMD160 d5dd31b9e4dcf30af6d2a62deb285a83f8a54019 SHA1 fc16a64e191d3f2720220f3ecbba3c55cece4654 SHA256 99f9da320d6335413384d12310e5ae9815572281c99d5908706022b6a4d6cb03 DIST bristuff-0.3.0-PRE-1s.tar.gz 265953 RMD160 8d3abdbbae4c376d52225395c72f4538e1f84a94 SHA1 1d942df9e4fd963755080e011caba88a33601c1b SHA256 30adea4f070ed44d1952163e850c177f976857b96965e18844ccd492ccef968d +DIST bristuff-0.3.0-PRE-1x.tar.gz 279200 RMD160 bc84aa50370627cfead9e0646cf87c16ddff7b00 SHA1 e02a82cebaefa0d666ad56532369310aae818d91 SHA256 13d98160d4a10b46b77c822577e6c64ad7dadbc2df1b4cd0a1007ae3bbbd4aa8 EBUILD asterisk-1.0.11_p1.ebuild 14805 RMD160 c740a2001f780b9b15db01e1fd5bb1931bad35df SHA1 bddf9cef14ea20a7b1c779984bd0202243c59c27 SHA256 9d4fd2a5bb31d2e24612e73f2f3029debc6a9349c6d4074af78348dcb45b652f MD5 3a1b66e871a5d50b186097da1af6f4aa asterisk-1.0.11_p1.ebuild 14805 RMD160 c740a2001f780b9b15db01e1fd5bb1931bad35df asterisk-1.0.11_p1.ebuild 14805 @@ -160,10 +163,14 @@ EBUILD asterisk-1.2.13.ebuild 12212 RMD160 e9d822949070983c535fe041021c9c8cdcce3 MD5 99256203a0fecb463765ca646d32f02b asterisk-1.2.13.ebuild 12212 RMD160 e9d822949070983c535fe041021c9c8cdcce3884 asterisk-1.2.13.ebuild 12212 SHA256 96d064cc9f10b6813cf1c4def2d12ca69a7ea2c1c9ed2f330734066d86fe4210 asterisk-1.2.13.ebuild 12212 -MISC ChangeLog 27864 RMD160 eaf70a7d75a0235fcad42259bf25657dbc8dbc6a SHA1 44fc18797400afe7b1a48d6ded57b1a8f901c246 SHA256 602e875e5e10df3df2a2eea1bde38a898219fd495a4591cbc30e0c5c2d6ebbab -MD5 3834079cda5fbc8998d50d531393d82f ChangeLog 27864 -RMD160 eaf70a7d75a0235fcad42259bf25657dbc8dbc6a ChangeLog 27864 -SHA256 602e875e5e10df3df2a2eea1bde38a898219fd495a4591cbc30e0c5c2d6ebbab ChangeLog 27864 +EBUILD asterisk-1.2.14.ebuild 11866 RMD160 3f9b38329b4ae381c44273850e934bbcc44dd68c SHA1 42fa6676f9158a80f2ff3d7d2561e8b0bc6152e2 SHA256 9623d5ed6436090d8f1a9010d02c30a1b884bde700ef208405933c2ff57553ec +MD5 a899e97ec3bcf997b751059255651d55 asterisk-1.2.14.ebuild 11866 +RMD160 3f9b38329b4ae381c44273850e934bbcc44dd68c asterisk-1.2.14.ebuild 11866 +SHA256 9623d5ed6436090d8f1a9010d02c30a1b884bde700ef208405933c2ff57553ec asterisk-1.2.14.ebuild 11866 +MISC ChangeLog 28021 RMD160 b1aa58fc8134281a75cd8c966faeb6b2bb18a067 SHA1 f6663f4ccd0246e029391b183d6eec72e941c308 SHA256 692246640970d3b9e49529508c66943b2c566f3a838a419ceb35278e841d1e46 +MD5 761bff35c852fc3f3c439b164a4796ee ChangeLog 28021 +RMD160 b1aa58fc8134281a75cd8c966faeb6b2bb18a067 ChangeLog 28021 +SHA256 692246640970d3b9e49529508c66943b2c566f3a838a419ceb35278e841d1e46 ChangeLog 28021 MISC metadata.xml 384 RMD160 f5de78add5676233b8e0b9e111eab08970443582 SHA1 0441844fb3a715d6979e6c548147ada23d73fec2 SHA256 674224368cb2be6f72655cd67ee19d4d2d0f3425d560aff22b698269e0adc6d8 MD5 488aea6fbdb7537394cc049b0ff9e5d5 metadata.xml 384 RMD160 f5de78add5676233b8e0b9e111eab08970443582 metadata.xml 384 @@ -183,10 +190,13 @@ SHA256 63571a9178e245b14ca367735b833b0d1700e4e2595c3d7694df7e0d5bd3fe9f files/di MD5 041ef49546f5e16e3bd5fd5ff0719f70 files/digest-asterisk-1.2.13-r1 1376 RMD160 782b59125ab61b4e40f284bbf830bd1fe10b1d47 files/digest-asterisk-1.2.13-r1 1376 SHA256 63571a9178e245b14ca367735b833b0d1700e4e2595c3d7694df7e0d5bd3fe9f files/digest-asterisk-1.2.13-r1 1376 +MD5 3342bcac7eb8510d9016dee340017fe6 files/digest-asterisk-1.2.14 1376 +RMD160 57192415a5909407d11c68a9d1e8f17af6b44097 files/digest-asterisk-1.2.14 1376 +SHA256 bedfbd607a6b74146a30d8b1b74b3464efa13b38362c2f1ae4fe0aa341435b83 files/digest-asterisk-1.2.14 1376 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.1 (GNU/Linux) +Version: GnuPG v1.4.6-ecc01.6 (GNU/Linux) -iD8DBQFFn84JGDyatLGpTbYRAiubAKCBaYqjJitqsthvst/uondM/GAAzQCdHdgD -t5xmQbwvNPlQ59eguvvwG1E= -=1Nu5 +iD8DBQFFrmMwKRy60XGEcJIRAtvJAJ9vaeS8nuNMDFoupYXw9YJ4H9X+FgCfR2Z1 +aj+uY5WeP5gJZFmNzOy1gjg= +=Fjw4 -----END PGP SIGNATURE----- diff --git a/net-misc/zaptel/ChangeLog b/net-misc/zaptel/ChangeLog index 1fa81e4c891a..42e3b1f903be 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.88 2006/12/19 09:36:30 drizzt Exp $ +# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/ChangeLog,v 1.89 2007/01/17 17:51:21 gustavoz Exp $ + +*zaptel-1.2.12-r1 (17 Jan 2007) + + 17 Jan 2007; Gustavo Zacarias + +zaptel-1.2.12-r1.ebuild: + New rev with BRIstuff-0.3.0-PRE-1x *zaptel-1.2.12 (19 Dec 2006) diff --git a/net-misc/zaptel/Manifest b/net-misc/zaptel/Manifest index 88ed5f9610f7..c8d60c0bb78a 100644 --- a/net-misc/zaptel/Manifest +++ b/net-misc/zaptel/Manifest @@ -76,6 +76,7 @@ SHA256 1a50fb553fd44ee7fcc64a5a855bae09afbdbcd302c6fcd8731bb4976637fc3c files/za DIST bristuff-0.2.0-RC8q.tar.gz 152037 RMD160 aaa9ca23eaeb74abc96dd7240f67e7886d4d6ad9 SHA1 27a6f56f47aa7ee5459d2625da7cff310909764e SHA256 8ba7a1e1e6ee8e9d77853d6d790d0de5deced7c11679b9b0e108cca817ed9728 DIST bristuff-0.3.0-PRE-1s.tar.gz 265953 RMD160 8d3abdbbae4c376d52225395c72f4538e1f84a94 SHA1 1d942df9e4fd963755080e011caba88a33601c1b SHA256 30adea4f070ed44d1952163e850c177f976857b96965e18844ccd492ccef968d DIST bristuff-0.3.0-PRE-1v.tar.gz 267644 RMD160 5c5f034d29f4156351a495f40c9c4b176f65e06e SHA1 0ffbe79cd44119b09eb744eb9bf1b6fb90fa1bab SHA256 91254dd6c71b74a5990df622b523d06c2f0399c6e47630e5155392c1598fd39e +DIST bristuff-0.3.0-PRE-1x.tar.gz 279200 RMD160 bc84aa50370627cfead9e0646cf87c16ddff7b00 SHA1 e02a82cebaefa0d666ad56532369310aae818d91 SHA256 13d98160d4a10b46b77c822577e6c64ad7dadbc2df1b4cd0a1007ae3bbbd4aa8 DIST zaphfc_0.3.0-PRE-1o_florz-12.diff.gz 10736 RMD160 b95d2301402e1108bc480ce0e66e87e3062eccf8 SHA1 f8ab2f312c6a2b2f607b9e7f3ccbcca0858c53a7 SHA256 04a8dd22d581b5d28d46a589d695f6eb634bf2bf355347a637fe2d560a63528c DIST zaptel-1.0.10.tar.gz 327832 RMD160 a797bb36f35e50c51d30705ad1d628f5728d87ed SHA1 98544260fca2afbcd304f7354b62a56138e15a09 SHA256 7978f3c56a95033bf2bc2cb8d0cb2830c5371aae21e0021503c6dbf2361795d1 DIST zaptel-1.2.11.tar.gz 1425625 RMD160 6ae43a2f5801dab17216912f976e67371d8e51d2 SHA1 30a2001449ff50b5a47970b76a77500986602211 SHA256 3641c8ef684862b3cc9fd3c3341d25095909a9c2f901d31b7cc9394210cb50e8 @@ -89,6 +90,10 @@ EBUILD zaptel-1.2.11-r1.ebuild 9023 RMD160 a85a0f5225e67234ff5c1bda1c12b63b354e5 MD5 e902c0a9128595c5a1bf2405fb0c16ae zaptel-1.2.11-r1.ebuild 9023 RMD160 a85a0f5225e67234ff5c1bda1c12b63b354e5a10 zaptel-1.2.11-r1.ebuild 9023 SHA256 3c719f62712fe3ed83389c28dc94ab1cbe2ee2022187db225dc3183cd1c4d584 zaptel-1.2.11-r1.ebuild 9023 +EBUILD zaptel-1.2.12-r1.ebuild 8955 RMD160 1cf58c363ed35c346b21e73b0c80418dc0fea59a SHA1 792a35794012ceb2820f8aad706c56cd5c9010b6 SHA256 1acb4108c0b154c4a93546318a1489ddf17e7a6316bbea3f3c00fb5ee8de6e38 +MD5 666ff14f5808d291ea857edcc74179fa zaptel-1.2.12-r1.ebuild 8955 +RMD160 1cf58c363ed35c346b21e73b0c80418dc0fea59a zaptel-1.2.12-r1.ebuild 8955 +SHA256 1acb4108c0b154c4a93546318a1489ddf17e7a6316bbea3f3c00fb5ee8de6e38 zaptel-1.2.12-r1.ebuild 8955 EBUILD zaptel-1.2.12.ebuild 9018 RMD160 98db97e401944feff969a6bdd884fe21cb53b0c6 SHA1 6b3dfd2e1f5afd9ff539ba6d230b8475cba8a333 SHA256 350fab1289b413a6714a4965a3caefdd1c457f2b362d9f1537729f1a424de0a2 MD5 49c53ac3b0bf4842511db0ef2becdc88 zaptel-1.2.12.ebuild 9018 RMD160 98db97e401944feff969a6bdd884fe21cb53b0c6 zaptel-1.2.12.ebuild 9018 @@ -97,10 +102,10 @@ EBUILD zaptel-1.2.9.1-r1.ebuild 8577 RMD160 b487dfe2f52b91b5cd5a75667a2c702bb653 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 17519 RMD160 173c1935fce9766e290c29c9a238db297744f4f6 SHA1 6887f7afa4469fe6376c3103206d05c451e5b9de SHA256 e4a9f2ccc861d37417b8dbc0e1b3725e282929c142516291c514a0cff98f781f -MD5 51c19bf51615180ea54724bde633a1f4 ChangeLog 17519 -RMD160 173c1935fce9766e290c29c9a238db297744f4f6 ChangeLog 17519 -SHA256 e4a9f2ccc861d37417b8dbc0e1b3725e282929c142516291c514a0cff98f781f ChangeLog 17519 +MISC ChangeLog 17674 RMD160 03b666cb5e57992cf234fd424f861b07f2c09787 SHA1 0694464c1d7729ad2fce548f3e3b3dff098342fb SHA256 5d8387270e27c4a17567e3eebe4c8f9ff294b6ea8740dc0f65e04990f6a0ffb1 +MD5 084539c82721ae1dc60153f9e22aa6bf ChangeLog 17674 +RMD160 03b666cb5e57992cf234fd424f861b07f2c09787 ChangeLog 17674 +SHA256 5d8387270e27c4a17567e3eebe4c8f9ff294b6ea8740dc0f65e04990f6a0ffb1 ChangeLog 17674 MISC metadata.xml 382 RMD160 315172442a4bfaa87b855d4c421b22a2527e97b2 SHA1 7b95f41def10946742929592db1d76b7e3bb0a19 SHA256 f79d5cd273e9ecc2181e60ea226a7cb0128011d877fc7531b2df30bd5fd9ae20 MD5 f3d5d5b8a638e7a9a83fe0eb0d94282c metadata.xml 382 RMD160 315172442a4bfaa87b855d4c421b22a2527e97b2 metadata.xml 382 @@ -114,13 +119,16 @@ SHA256 f25c5f1b434635c05e59971a2061b49113e3ad69290169f5fb0d7a5c83364311 files/di MD5 3fd6340ada34c7c0f0b1df11e3b80338 files/digest-zaptel-1.2.12 795 RMD160 5bb91c092f28aab3ca6618b0117d50a6bc045b80 files/digest-zaptel-1.2.12 795 SHA256 65df7b2070133e6588ce57412a539fc6dbf9e0ad58207ae7f2434c8fc2af46b8 files/digest-zaptel-1.2.12 795 +MD5 50a26754b0e2aaf6c64e65f389164e86 files/digest-zaptel-1.2.12-r1 795 +RMD160 232323602018067046f8699c1d87ffcb3b33af60 files/digest-zaptel-1.2.12-r1 795 +SHA256 54460d35717d16cc7f701365a8e3b927ebb1f5ec41bf1588ab30e87e29e7e6c1 files/digest-zaptel-1.2.12-r1 795 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 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.5 (GNU/Linux) +Version: GnuPG v1.4.6-ecc01.6 (GNU/Linux) -iD8DBQFFh7KlGDyatLGpTbYRArWQAJ90ulBZU6WpDkq8m3nHlnMmrVNOtQCdEDz4 -81UOd3xQJqK1JUah0SzY8b4= -=lCS+ +iD8DBQFFrmIiKRy60XGEcJIRAlOKAJ9DaDppmP8deQEF/mP/qw58lxqXOwCfTHTL +Fatn7qE6Jw3dXN6P5BfQZjY= +=Tjxr -----END PGP SIGNATURE----- diff --git a/net-misc/zaptel/files/digest-zaptel-1.2.12-r1 b/net-misc/zaptel/files/digest-zaptel-1.2.12-r1 new file mode 100644 index 000000000000..fabbce0f8e9e --- /dev/null +++ b/net-misc/zaptel/files/digest-zaptel-1.2.12-r1 @@ -0,0 +1,9 @@ +MD5 2f9c26b445dc76e7767fffa5e350d618 bristuff-0.3.0-PRE-1x.tar.gz 279200 +RMD160 bc84aa50370627cfead9e0646cf87c16ddff7b00 bristuff-0.3.0-PRE-1x.tar.gz 279200 +SHA256 13d98160d4a10b46b77c822577e6c64ad7dadbc2df1b4cd0a1007ae3bbbd4aa8 bristuff-0.3.0-PRE-1x.tar.gz 279200 +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 99b9f86556b903a32607b2751f920513 zaptel-1.2.12.tar.gz 1487021 +RMD160 4cbf2627a8bbbad65ec43578c1c89e79f1682bdb zaptel-1.2.12.tar.gz 1487021 +SHA256 ab1e87645ceaae9269493f4e448596045732389197a9bb8c21bd5be88533e48f zaptel-1.2.12.tar.gz 1487021 diff --git a/net-misc/zaptel/zaptel-1.2.12-r1.ebuild b/net-misc/zaptel/zaptel-1.2.12-r1.ebuild new file mode 100644 index 000000000000..6ddae4fd4b3e --- /dev/null +++ b/net-misc/zaptel/zaptel-1.2.12-r1.ebuild @@ -0,0 +1,367 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/zaptel/zaptel-1.2.12-r1.ebuild,v 1.1 2007/01/17 17:51:21 gustavoz Exp $ + +inherit toolchain-funcs eutils linux-mod + +## NOTE: +# +# + +BRI_VERSION="0.3.0-PRE-1x" +FLORZ_VERSION="0.3.0-PRE-1o_florz-12" + +IUSE="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://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/libusb + >=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 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 + 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-gcc411_is_a_retard-kbuild.patch + 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 "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 :" \ + 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 + + cd ${S}/xpp/utils + make || die "make xpp utils failed" + + 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() { + kernel_is 2 4 && cp /etc/modules.conf ${D}/etc + 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 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/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 + + # install xpp utils + cd ${S}/xpp/utils + make DESTDIR=${D} install || die "failed xpp utils install" +} + +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 +}