diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2010-10-15 18:04:29 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2010-10-15 18:04:29 +0000 |
commit | be419f4c0e9e249441cabaf75168338c6dfeaff7 (patch) | |
tree | 62ef8931c43374a00a0f8ac182b7babd502c96e3 | |
parent | Re-reverting back to ~x86. bug 330539 (diff) | |
download | historical-be419f4c0e9e249441cabaf75168338c6dfeaff7.tar.gz historical-be419f4c0e9e249441cabaf75168338c6dfeaff7.tar.bz2 historical-be419f4c0e9e249441cabaf75168338c6dfeaff7.zip |
Remove old ebuilds & patches.
Package-Manager: portage-2.1.9.18/cvs/Linux x86_64
-rw-r--r-- | net-misc/asterisk/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/asterisk/Manifest | 15 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-1.6.2.10.ebuild | 239 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-1.6.2.11-r1.ebuild | 253 | ||||
-rw-r--r-- | net-misc/asterisk/asterisk-1.6.2.11.ebuild | 236 | ||||
-rw-r--r-- | net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-fxsks-hookstate.patch | 31 | ||||
-rw-r--r-- | net-misc/asterisk/files/1.6.2/asterisk.initd | 271 |
7 files changed, 11 insertions, 1042 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog index c4c90f6fa548..d6c8d5b0ebc7 100644 --- a/net-misc/asterisk/ChangeLog +++ b/net-misc/asterisk/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/asterisk # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.271 2010/10/15 17:32:44 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.272 2010/10/15 18:04:29 chainsaw Exp $ + + 15 Oct 2010; <chainsaw@gentoo.org> + -files/1.6.1/asterisk-1.6.1.6-fxsks-hookstate.patch, + -files/1.6.2/asterisk.initd, -asterisk-1.6.2.10.ebuild, + -asterisk-1.6.2.11.ebuild, -asterisk-1.6.2.11-r1.ebuild: + Remove old ebuilds & patches. *asterisk-1.6.2.13-r2 (15 Oct 2010) diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest index f65a1999554f..f963219e2a99 100644 --- a/net-misc/asterisk/Manifest +++ b/net-misc/asterisk/Manifest @@ -11,7 +11,6 @@ AUX 1.2.0/asterisk.confd 2200 RMD160 f26ac9b18e8c1db86c54839d9b4a816cfe45c61f SH AUX 1.2.0/asterisk.rc6 5891 RMD160 d14da5d703cdd9bedf9986e0e49a93d8031876ee SHA1 3e28003ecd2d0659266644bffe463fd25efddbcc SHA256 d2bbd0e335f7f2f399780778501df3fd2026ba27dfe48db3ab282430fb215531 AUX 1.6.0/asterisk.confd 2204 RMD160 31bceebfa535e97cb2634e313678cc42186d4750 SHA1 748c623cea238cd9b322672d5ebcfe214a4f0463 SHA256 daec84c58e0ef6cbd71a6fc62cb83129b1bcffdfdd619ebbd62a642f0cd1eee7 AUX 1.6.1/asterisk-1.6.1-uclibc.patch 373 RMD160 08f18dd2af3736497995ebcbea84939ae4c4cc98 SHA1 b10884d4b9123800f62b4aabac5a93b1a110e3da SHA256 b6fe54def0ab3f90058c2ed7bd288dd21c96aaf88b9028f12d223fb31d7e41c5 -AUX 1.6.1/asterisk-1.6.1.6-fxsks-hookstate.patch 1074 RMD160 eaefb4ff9bb3f022c1d3ec0e2ef3dc3fd0b604b9 SHA1 6c4f233ddd4efd0471796b83813ba6e4aed15cdc SHA256 8c777f4e5e6a5dfcacb4534cf8c4f7cd81e4bedb16811abfbfcf96289cf6eb68 AUX 1.6.2/asterisk-1.6.2.11-strip-noapi.patch 742 RMD160 d9a176bc9bfed14adc3e59881c04932070cb98c3 SHA1 4d40de82f27bbeb8a0b62fa17d864b9629ba29a3 SHA256 c874f28eb895b0c87a0bbf9b60ec7cd7dfe2599faa1920d1f1a20c983be3bca8 AUX 1.6.2/asterisk-1.6.2.13-alarm-receiver-use-playtones.patch 3989 RMD160 919d03d1d59517a4f7999b54a416e42d2e0f9e90 SHA1 80efe8e6b0421b8063a3419d760563af98caac5c SHA256 63f3fd50f923c6dd38e5c5f7d89bbfca5bb27d76e17a0bf1e679873349105e96 AUX 1.6.2/asterisk-1.6.2.13-backport-bri-net-ptmp.patch 1839 RMD160 3b2b6101ef65325609bbdd7249240869fe1389bf SHA1 c62ce68ca642b32ffdc67ab52159ddd7c7061840 SHA256 1afdcb99201d3f97e94bafcb74f5c0c97f7b6a37262bd0333e728392a3152cc3 @@ -23,7 +22,6 @@ AUX 1.6.2/asterisk-1.6.2.2-nv-faxdetect.patch 21042 RMD160 fa31dbfa3828f60073d59 AUX 1.6.2/asterisk-1.6.2.8-inband-indications.patch 468 RMD160 590c9271486fa08c6408d68eea332ab8a7fa76a7 SHA1 f586944eade3d1e9f21705ac27c11e90bb9edff6 SHA256 ddfe757f4810964b8d48e7363068763fbf313db14e4f9205d926dc34b1a86ba6 AUX 1.6.2/asterisk-1.6.2.8-pri-missing-keyword.patch 547 RMD160 30deeb63ae09c316d5ada7597939adc8861a40d8 SHA1 722efddb5dde9238c0ee11cbfb58da25a5a2c95a SHA256 e3b98ee06015b062929613f41e430a93e571cf0920393f4480ebce256dd1e7fc AUX 1.6.2/asterisk-1.6.2.9-gsm-pic.patch 2423 RMD160 9eee96d54d9613c2e565d1983479b26762913e0e SHA1 c61479f1ee1f6ac113dae4dbf68222034990f6be SHA256 9cd951f984189f1dc93f9ecde1409f07c53644ef22091d668f55c0bb7122bc0c -AUX 1.6.2/asterisk.initd 6604 RMD160 a21972586bdd043a0a68380d46765b03616950f8 SHA1 433848ac74814e89b668e96fef043eef869d2d8f SHA256 30bcc997a12d454413b48ccb66838c857302c8fe8ad394db7f3fdb7822e84ab8 AUX 1.6.2/asterisk.initd2 6658 RMD160 b694da109e746e9a9e642ffa7f1d278f03543cea SHA1 63443d3066d4c47228fe1d852420d571ae6f8800 SHA256 f6fd2c229e61c12360b1d289a631f6a0a6f8638e7c6f6add6040ad988170bf70 AUX 1.6.2/asterisk.logrotate 476 RMD160 16defc611e332dcbbc49f88ec25b2ef1acbfab5e SHA1 86911eec273139f87b77148aeeeb0b1f6f434eb4 SHA256 6e6290515180e248746609cabbc89c0550ed5cc04f7d3916c409ef2565bcdd53 AUX 1.6.2/asterisk.logrotate2 473 RMD160 5b735d23d3072cd5d29dcac4aaf902b65bb9ea4e SHA1 36913a7c6abeb423484c1340cf99f84f42f437f8 SHA256 946375ddc5cb5adf94550e0a4b029210f4c67cc388ef7b6cb79bab6e8f6c571b @@ -35,23 +33,18 @@ AUX 1.6.2/sip_calc_auth 493 RMD160 1813bd5aecbb60b38c20752050e6be44cca10f47 SHA1 DIST asterisk-1.2.27-patches-1.0.tar.bz2 6653 RMD160 18f1d7fc4497466050ed4f517ff5732eb448ff2e SHA1 2aecd3e91cde38dbb0fd591e8a49db221f44b94e SHA256 a4da0570fca2df3c508f072be62722879956fe8c454027fbb8dafb7a6095384c DIST asterisk-1.2.37.tar.gz 29899629 RMD160 1de7ff96d3b1fd8d89f3ef7b3bb9e35bedccfb33 SHA1 c9a3c4684e021f62b4d19f6e0c8fc11f64db19d6 SHA256 9f3ec67efe0e4d45434621cd358e8e7d64e1b05df04d66e2390c9420acd2aeaa DIST asterisk-1.2.40.tar.gz 29903514 RMD160 dc3da60756c82c98a055e49b068eb6760a01948e SHA1 4b4b794e858a3436bc35bdd2f4edf824c2885b68 SHA256 61dc745b12f6dc2998404e77747a964db56df8efae84a666c4ccddf016c9c06d -DIST asterisk-1.6.2.10.tar.gz 23647517 RMD160 c8aaf7444364ceab9a97030a3179fb2d6f0fb791 SHA1 60877704de3b7ac6213eb4e0dac2c68a06a40658 SHA256 5ead8d2f2c0250d114a2623a093f0bb90601e1ec8e0e1e80bf7846752fd56f2f -DIST asterisk-1.6.2.11.tar.gz 23695731 RMD160 c130b0f75ab27c090538137ffb7085982fcbabf7 SHA1 486a2ccd7934fc5eab6331953332ad7f2b44c2d4 SHA256 5b84b756f33a1f92899a968fac9c2806cadd455eed2e0fe6c7d4f3727636f1b4 DIST asterisk-1.6.2.13.tar.gz 23679304 RMD160 ebdd776da2e76a247a621748d8aea0c1f0cffc63 SHA1 b412d4a8589b5b58bd64e2b7f277712b7cbbfabd SHA256 28bb18e988d22557ee77220cb33209212af1e618348c3d42666f785da517c01e EBUILD asterisk-1.2.37.ebuild 10738 RMD160 0f409319cb82c2c92cde0ab6436e44dd214c0cf3 SHA1 6cce3c94e5ace2f1f9fa7e6a621b358e3921cbec SHA256 fc6ed3447de3400e74fcffeee457adc59a4433047655f4190b55a9dfbec8c18b EBUILD asterisk-1.2.40.ebuild 10743 RMD160 f3db358e4776aef3dfb196f5e182f6f588030f60 SHA1 ae80355f7aa6e84c413f83c20028209e2908e3f9 SHA256 f67e2a7c507315feffdeb5950f9225c9edb038bb915f5402102dbd4da693c35d -EBUILD asterisk-1.6.2.10.ebuild 6545 RMD160 611f8636c5a0472ea165e06e6e5f4f8179f6fb86 SHA1 9715dbfed8f19daedf31c79cdb18b11a895030e6 SHA256 24044410879066b380c1709dd2bf72e611751e0448b23aef9589a0e9c146dcea -EBUILD asterisk-1.6.2.11-r1.ebuild 6871 RMD160 51af7664012e91d269d08ffbcfd45fd21be6afdb SHA1 20a8a34003a08d2f65e2a8e30c842615ef136e43 SHA256 f70f0c6a50b4be345b7aee880bbfba7c163e63ead8ab7ac41e15d1cea9f18063 -EBUILD asterisk-1.6.2.11.ebuild 6437 RMD160 9ac8be976e444ce23fd8d30e3a593d8c09cf78c6 SHA1 cec95214edbd5e501094cb740445ede40befe4be SHA256 695a95f8e630bc8fa5a35a3f97ce97b93e452591f470f5691399b637506634b3 EBUILD asterisk-1.6.2.13-r1.ebuild 7196 RMD160 d3221cfedab5310159b25b323ab716dd7d35aef8 SHA1 2a0473f809211060631e657c05601863930a9cba SHA256 7ed79b0b458daa23990ecae9069ba3d65ab01521819928222b65eca99af40f87 EBUILD asterisk-1.6.2.13-r2.ebuild 7377 RMD160 12c080a61d7c345fcebb6bc148baf0396f2db8f9 SHA1 4df6a0218d162724e759d9d11660d623a7c314ce SHA256 40a5be578f62de21c53f4d312d743796746705a5d27deccefb5e0504add00c75 EBUILD asterisk-1.6.2.13.ebuild 6868 RMD160 d889222a63df46edc27a70bffa0339a717acb889 SHA1 5d048c74b3a4f603f4d900a61263138b3ef2b518 SHA256 7727121819199291f91a485af0868df5790b6449fab6324e3f15863868c35115 -MISC ChangeLog 63869 RMD160 867605e77e3096ef75617ad8365afe0c4650eda3 SHA1 a6bee6bd053e4d22ef5d66d0476622ae4d5be7a0 SHA256 a127656a5da01cd474e1852415f5928bbc5c06841235a139bfeb000981e7762b +MISC ChangeLog 64111 RMD160 609bd7cc79423f234493f54e4955b516994377d4 SHA1 5485917b6e34a3a8d29490923f512d5cbf904815 SHA256 e615262ac0e956bd56ae0ea1bb3b477a419fec0566b6bcb09943d0ba1ce6ceab MISC metadata.xml 1286 RMD160 e037505d2f85ed93050d173f62faa30fb36b59ae SHA1 cf8f219278a99dd36f6a9fe0a4fa8d6fb3ab54e7 SHA256 08bfe80f286c8d9823485c04df3b92c942c61fd42d61a93949a4cb8ac90dfe5f -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) -iEYEARECAAYFAky4kEgACgkQp5vW4rUFj5oWQACgr0G82XPBit+MV5nXSX7LMrAO -kRcAoKDD/0ty5sILmvfLscs8GGwf3jI1 -=No3S +iEYEARECAAYFAky4l7gACgkQp5vW4rUFj5q6+QCgjfdcgcR3FGNzYyuRKs5mJUrY +Tv0An28VLjPSlgF/9E4Pbfd6GPfAuwqJ +=rEQt -----END PGP SIGNATURE----- diff --git a/net-misc/asterisk/asterisk-1.6.2.10.ebuild b/net-misc/asterisk/asterisk-1.6.2.10.ebuild deleted file mode 100644 index 6e983db8cefc..000000000000 --- a/net-misc/asterisk/asterisk-1.6.2.10.ebuild +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.10.ebuild,v 1.2 2010/08/20 23:12:54 chainsaw Exp $ - -EAPI=3 -inherit autotools base eutils linux-info multilib - -MY_P="${PN}-${PV/_/-}" - -DESCRIPTION="Asterisk: A Modular Open Source PBX System" -HOMEPAGE="http://www.asterisk.org/" -SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap lua keepsrc misdn newt +samples oss postgres radius snmp span speex ssl sqlite static vorbis" - -RDEPEND="sys-libs/ncurses - dev-libs/popt - sys-libs/zlib - alsa? ( media-libs/alsa-lib ) - caps? ( sys-libs/libcap ) - curl? ( net-misc/curl ) - dahdi? ( >=net-libs/libpri-1.4.7 - net-misc/dahdi-tools ) - freetds? ( dev-db/freetds ) - iconv? ( virtual/libiconv ) - jabber? ( dev-libs/iksemel ) - ldap? ( net-nds/openldap ) - lua? ( dev-lang/lua ) - misdn? ( net-dialup/misdnuser ) - newt? ( dev-libs/newt ) - postgres? ( dev-db/postgresql-base ) - radius? ( net-dialup/radiusclient-ng ) - snmp? ( net-analyzer/net-snmp ) - span? ( media-libs/spandsp ) - speex? ( media-libs/speex ) - sqlite? ( dev-db/sqlite ) - ssl? ( dev-libs/openssl ) - vorbis? ( media-libs/libvorbis )" - -DEPEND="${RDEPEND} - !<net-misc/asterisk-addons-1.6 - !net-misc/asterisk-chan_unistim - !net-misc/zaptel - !net-misc/asterisk-core-sounds - !net-misc/asterisk-extra-sounds - !net-misc/asterisk-moh-opsound" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}/1.6.2/${PN}-1.6.2.9-gsm-pic.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.8-pri-missing-keyword.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.8-inband-indications.patch" - "${FILESDIR}/1.6.1/${PN}-1.6.1-uclibc.patch" - "${FILESDIR}/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch" -) - -pkg_setup() { - CONFIG_CHECK="~!NF_CONNTRACK_SIP" - local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users - have reported that this module dropped critical SIP packets in their deployments. You - may want to disable it if you see such problems." - check_extra_config -} - -src_prepare() { - base_src_prepare - AT_M4DIR=autoconf eautoreconf -} - -src_configure() { - econf \ - --libdir="/usr/$(get_libdir)" \ - --localstatedir="/var" \ - --with-gsm=internal \ - --with-popt \ - --with-z \ - $(use_with alsa asound) \ - $(use_with caps cap) \ - $(use_with curl) \ - $(use_with dahdi pri) \ - $(use_with dahdi tonezone) \ - $(use_with dahdi) \ - $(use_with freetds tds) \ - $(use_with iconv) \ - $(use_with jabber iksemel) \ - $(use_with lua) \ - $(use_with misdn isdnnet) \ - $(use_with misdn suppserv) \ - $(use_with misdn) \ - $(use_with newt) \ - $(use_with oss) \ - $(use_with postgres) \ - $(use_with radius) \ - $(use_with snmp netsnmp) \ - $(use_with span spandsp) \ - $(use_with speex) \ - $(use_with speex speexdsp) \ - $(use_with sqlite sqlite3) \ - $(use_with ssl crypto) \ - $(use_with ssl) \ - $(use_with vorbis ogg) \ - $(use_with vorbis) || die "econf failed" -} - -src_compile() { - ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" -} - -src_install() { - # setup directory structure - # - mkdir -p "${D}"usr/$(get_libdir)/pkgconfig - - emake DESTDIR="${D}" install || die "emake install failed" - - if use samples; then - emake DESTDIR="${D}" samples || die "emake samples failed" - for conffile in "${D}"etc/asterisk/*.* - do - chown asterisk:asterisk $conffile - chmod 0660 $conffile - done - einfo "Sample files have been installed" - else - einfo "Skipping installation of sample files..." - rm -f "${D}"var/lib/asterisk/mohmp3/* - rm -f "${D}"var/lib/asterisk/sounds/demo-* - rm -f "${D}"var/lib/asterisk/agi-bin/* - rm -f "${D}"etc/asterisk/* - fi - rm -rf "${D}"var/spool/asterisk/voicemail/default - - # keep directories - diropts -m 0770 -o asterisk -g asterisk - keepdir /etc/asterisk - keepdir /var/lib/asterisk - keepdir /var/run/asterisk - keepdir /var/spool/asterisk - keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} - diropts -m 0750 -o asterisk -g asterisk - keepdir /var/log/asterisk/{cdr-csv,cdr-custom} - - newinitd "${FILESDIR}"/1.6.2/asterisk.initd asterisk - newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk - - # some people like to keep the sources around for custom patching - # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there - if use keepsrc - then - dodir /usr/src - - ebegin "Copying sources into /usr/src" - cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources" - eend $? - - ebegin "Cleaning source tree" - emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources" - eend $? - - einfo "Clean sources are available in "${ROOT}"usr/src/${PF}" - fi - - # install the upgrade documentation - # - dodoc README UPGRADE* BUGS CREDITS - - # install snmp mib files - # - if use snmp - then - insinto /usr/share/snmp/mibs/ - doins doc/digium-mib.txt doc/asterisk-mib.txt - fi - - # install SIP scripts; bug #300832 - # - dodoc "${FILESDIR}/1.6.2/sip_calc_auth" - dodoc "${FILESDIR}/1.6.2/find_call_sip_trace.sh" - dodoc "${FILESDIR}/1.6.2/find_call_ids.sh" - dodoc "${FILESDIR}/1.6.2/call_data.txt" -} - -pkg_preinst() { - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" -} - -pkg_postinst() { - # - # Announcements, warnings, reminders... - # - einfo "Asterisk has been installed" - echo - elog "If you want to know more about asterisk, visit these sites:" - elog "http://www.asteriskdocs.org/" - elog "http://www.voip-info.org/wiki-Asterisk" - echo - elog "http://www.automated.it/guidetoasterisk.htm" - echo - elog "Gentoo VoIP IRC Channel:" - elog "#gentoo-voip @ irc.freenode.net" - echo - echo - elog "1.6.1 -> 1.6.2 changes that you may care about:" - elog "canreinvite -> directmedia (sip.conf)" - elog "extensive T.38 (fax) changes" - elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" - elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" -} - -pkg_config() { - einfo "Do you want to reset file permissions and ownerships (y/N)?" - - read tmp - tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" - - if [[ "$tmp" = "y" ]] ||\ - [[ "$tmp" = "yes" ]] - then - einfo "Resetting permissions to defaults..." - - for x in spool run lib log; do - chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk - done - - chown -R root:asterisk "${ROOT}"etc/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk - - einfo "done" - else - einfo "skipping" - fi -} diff --git a/net-misc/asterisk/asterisk-1.6.2.11-r1.ebuild b/net-misc/asterisk/asterisk-1.6.2.11-r1.ebuild deleted file mode 100644 index f4fab5f6b7fc..000000000000 --- a/net-misc/asterisk/asterisk-1.6.2.11-r1.ebuild +++ /dev/null @@ -1,253 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.11-r1.ebuild,v 1.1 2010/08/20 23:12:54 chainsaw Exp $ - -EAPI=3 -inherit autotools base eutils linux-info multilib - -MY_P="${PN}-${PV/_/-}" - -DESCRIPTION="Asterisk: A Modular Open Source PBX System" -HOMEPAGE="http://www.asterisk.org/" -SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="alsa +caps dahdi debug freetds iconv jabber ldap lua keepsrc logrotate misdn newt +samples oss postgres radius snmp span speex ssl sqlite static vorbis" - -RDEPEND="sys-libs/ncurses - dev-libs/popt - sys-libs/zlib - alsa? ( media-libs/alsa-lib ) - caps? ( sys-libs/libcap ) - dahdi? ( >=net-libs/libpri-1.4.7 - net-misc/dahdi-tools ) - freetds? ( dev-db/freetds ) - iconv? ( virtual/libiconv ) - jabber? ( dev-libs/iksemel ) - ldap? ( net-nds/openldap ) - lua? ( dev-lang/lua ) - misdn? ( net-dialup/misdnuser ) - newt? ( dev-libs/newt ) - postgres? ( dev-db/postgresql-base ) - radius? ( net-dialup/radiusclient-ng ) - snmp? ( net-analyzer/net-snmp ) - span? ( media-libs/spandsp ) - speex? ( media-libs/speex ) - sqlite? ( dev-db/sqlite ) - ssl? ( dev-libs/openssl ) - vorbis? ( media-libs/libvorbis )" - -DEPEND="${RDEPEND} - !<net-misc/asterisk-addons-1.6 - !net-misc/asterisk-chan_unistim - !net-misc/zaptel" - -PDEPEND="net-misc/asterisk-core-sounds - net-misc/asterisk-extra-sounds - net-misc/asterisk-moh-opsound" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}/1.6.2/${PN}-1.6.2.9-gsm-pic.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.8-pri-missing-keyword.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.8-inband-indications.patch" - "${FILESDIR}/1.6.1/${PN}-1.6.1-uclibc.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.11-strip-noapi.patch" -) - -pkg_setup() { - CONFIG_CHECK="~!NF_CONNTRACK_SIP" - local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users - have reported that this module dropped critical SIP packets in their deployments. You - may want to disable it if you see such problems." - check_extra_config -} - -src_prepare() { - base_src_prepare - AT_M4DIR=autoconf eautoreconf -} - -src_configure() { - econf \ - --libdir="/usr/$(get_libdir)" \ - --localstatedir="/var" \ - --with-gsm=internal \ - --with-popt \ - --with-z \ - $(use_with alsa asound) \ - $(use_with caps cap) \ - $(use_with dahdi pri) \ - $(use_with dahdi tonezone) \ - $(use_with dahdi) \ - $(use_with freetds tds) \ - $(use_with iconv) \ - $(use_with jabber iksemel) \ - $(use_with lua) \ - $(use_with misdn isdnnet) \ - $(use_with misdn suppserv) \ - $(use_with misdn) \ - $(use_with newt) \ - $(use_with oss) \ - $(use_with postgres) \ - $(use_with radius) \ - $(use_with snmp netsnmp) \ - $(use_with span spandsp) \ - $(use_with speex) \ - $(use_with speex speexdsp) \ - $(use_with sqlite sqlite3) \ - $(use_with ssl crypto) \ - $(use_with ssl) \ - $(use_with vorbis ogg) \ - $(use_with vorbis) || die "econf failed" - - # - # blank out sounds/sounds.xml file to prevent - # asterisk from installing sounds files (we pull them in via - # asterisk-{core,extra}-sounds and asterisk-moh-opsound. - # - >"${S}"/sounds/sounds.xml -} - -src_compile() { - ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" -} - -src_install() { - # setup directory structure - # - mkdir -p "${D}"usr/$(get_libdir)/pkgconfig - - emake DESTDIR="${D}" install || die "emake install failed" - - if use samples; then - emake DESTDIR="${D}" samples || die "emake samples failed" - for conffile in "${D}"etc/asterisk/*.* - do - chown asterisk:asterisk $conffile - chmod 0660 $conffile - done - einfo "Sample files have been installed" - else - einfo "Skipping installation of sample files..." - rm -f "${D}"var/lib/asterisk/mohmp3/* - rm -f "${D}"var/lib/asterisk/sounds/demo-* - rm -f "${D}"var/lib/asterisk/agi-bin/* - rm -f "${D}"etc/asterisk/* - fi - rm -rf "${D}"var/spool/asterisk/voicemail/default - - # keep directories - diropts -m 0770 -o asterisk -g asterisk - keepdir /etc/asterisk - keepdir /var/lib/asterisk - keepdir /var/run/asterisk - keepdir /var/spool/asterisk - keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} - diropts -m 0750 -o asterisk -g asterisk - keepdir /var/log/asterisk/{cdr-csv,cdr-custom} - - newinitd "${FILESDIR}"/1.6.2/asterisk.initd2 asterisk - newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk - - # some people like to keep the sources around for custom patching - # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there - if use keepsrc - then - dodir /usr/src - - ebegin "Copying sources into /usr/src" - cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources" - eend $? - - ebegin "Cleaning source tree" - emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources" - eend $? - - einfo "Clean sources are available in "${ROOT}"usr/src/${PF}" - fi - - # install the upgrade documentation - # - dodoc README UPGRADE* BUGS CREDITS - - # install snmp mib files - # - if use snmp - then - insinto /usr/share/snmp/mibs/ - doins doc/digium-mib.txt doc/asterisk-mib.txt - fi - - # install SIP scripts; bug #300832 - # - dodoc "${FILESDIR}/1.6.2/sip_calc_auth" - dodoc "${FILESDIR}/1.6.2/find_call_sip_trace.sh" - dodoc "${FILESDIR}/1.6.2/find_call_ids.sh" - dodoc "${FILESDIR}/1.6.2/call_data.txt" - - # install logrotate snippet; bug #329281 - # - if use logrotate - then - insinto /etc/logrotate.d - newins "${FILESDIR}/1.6.2/asterisk.logrotate" asterisk - fi -} - -pkg_preinst() { - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" -} - -pkg_postinst() { - # - # Announcements, warnings, reminders... - # - einfo "Asterisk has been installed" - echo - elog "If you want to know more about asterisk, visit these sites:" - elog "http://www.asteriskdocs.org/" - elog "http://www.voip-info.org/wiki-Asterisk" - echo - elog "http://www.automated.it/guidetoasterisk.htm" - echo - elog "Gentoo VoIP IRC Channel:" - elog "#gentoo-voip @ irc.freenode.net" - echo - echo - elog "1.6.1 -> 1.6.2 changes that you may care about:" - elog "canreinvite -> directmedia (sip.conf)" - elog "extensive T.38 (fax) changes" - elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" - elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" -} - -pkg_config() { - einfo "Do you want to reset file permissions and ownerships (y/N)?" - - read tmp - tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" - - if [[ "$tmp" = "y" ]] ||\ - [[ "$tmp" = "yes" ]] - then - einfo "Resetting permissions to defaults..." - - for x in spool run lib log; do - chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk - done - - chown -R root:asterisk "${ROOT}"etc/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk - - einfo "done" - else - einfo "skipping" - fi -} diff --git a/net-misc/asterisk/asterisk-1.6.2.11.ebuild b/net-misc/asterisk/asterisk-1.6.2.11.ebuild deleted file mode 100644 index 7784a22aeea0..000000000000 --- a/net-misc/asterisk/asterisk-1.6.2.11.ebuild +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.11.ebuild,v 1.2 2010/08/20 23:12:54 chainsaw Exp $ - -EAPI=3 -inherit autotools base eutils linux-info multilib - -MY_P="${PN}-${PV/_/-}" - -DESCRIPTION="Asterisk: A Modular Open Source PBX System" -HOMEPAGE="http://www.asterisk.org/" -SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="alsa +caps dahdi debug freetds iconv jabber ldap lua keepsrc misdn newt +samples oss postgres radius snmp span speex ssl sqlite static vorbis" - -RDEPEND="sys-libs/ncurses - dev-libs/popt - sys-libs/zlib - alsa? ( media-libs/alsa-lib ) - caps? ( sys-libs/libcap ) - dahdi? ( >=net-libs/libpri-1.4.7 - net-misc/dahdi-tools ) - freetds? ( dev-db/freetds ) - iconv? ( virtual/libiconv ) - jabber? ( dev-libs/iksemel ) - ldap? ( net-nds/openldap ) - lua? ( dev-lang/lua ) - misdn? ( net-dialup/misdnuser ) - newt? ( dev-libs/newt ) - postgres? ( dev-db/postgresql-base ) - radius? ( net-dialup/radiusclient-ng ) - snmp? ( net-analyzer/net-snmp ) - span? ( media-libs/spandsp ) - speex? ( media-libs/speex ) - sqlite? ( dev-db/sqlite ) - ssl? ( dev-libs/openssl ) - vorbis? ( media-libs/libvorbis )" - -DEPEND="${RDEPEND} - !<net-misc/asterisk-addons-1.6 - !net-misc/asterisk-chan_unistim - !net-misc/zaptel - !net-misc/asterisk-core-sounds - !net-misc/asterisk-extra-sounds - !net-misc/asterisk-moh-opsound" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}/1.6.2/${PN}-1.6.2.9-gsm-pic.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.8-pri-missing-keyword.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.8-inband-indications.patch" - "${FILESDIR}/1.6.1/${PN}-1.6.1-uclibc.patch" - "${FILESDIR}/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch" -) - -pkg_setup() { - CONFIG_CHECK="~!NF_CONNTRACK_SIP" - local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users - have reported that this module dropped critical SIP packets in their deployments. You - may want to disable it if you see such problems." - check_extra_config -} - -src_prepare() { - base_src_prepare - AT_M4DIR=autoconf eautoreconf -} - -src_configure() { - econf \ - --libdir="/usr/$(get_libdir)" \ - --localstatedir="/var" \ - --with-gsm=internal \ - --with-popt \ - --with-z \ - $(use_with alsa asound) \ - $(use_with caps cap) \ - $(use_with dahdi pri) \ - $(use_with dahdi tonezone) \ - $(use_with dahdi) \ - $(use_with freetds tds) \ - $(use_with iconv) \ - $(use_with jabber iksemel) \ - $(use_with lua) \ - $(use_with misdn isdnnet) \ - $(use_with misdn suppserv) \ - $(use_with misdn) \ - $(use_with newt) \ - $(use_with oss) \ - $(use_with postgres) \ - $(use_with radius) \ - $(use_with snmp netsnmp) \ - $(use_with span spandsp) \ - $(use_with speex) \ - $(use_with speex speexdsp) \ - $(use_with sqlite sqlite3) \ - $(use_with ssl crypto) \ - $(use_with ssl) \ - $(use_with vorbis ogg) \ - $(use_with vorbis) || die "econf failed" -} - -src_compile() { - ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" -} - -src_install() { - # setup directory structure - # - mkdir -p "${D}"usr/$(get_libdir)/pkgconfig - - emake DESTDIR="${D}" install || die "emake install failed" - - if use samples; then - emake DESTDIR="${D}" samples || die "emake samples failed" - for conffile in "${D}"etc/asterisk/*.* - do - chown asterisk:asterisk $conffile - chmod 0660 $conffile - done - einfo "Sample files have been installed" - else - einfo "Skipping installation of sample files..." - rm -f "${D}"var/lib/asterisk/mohmp3/* - rm -f "${D}"var/lib/asterisk/sounds/demo-* - rm -f "${D}"var/lib/asterisk/agi-bin/* - rm -f "${D}"etc/asterisk/* - fi - rm -rf "${D}"var/spool/asterisk/voicemail/default - - # keep directories - diropts -m 0770 -o asterisk -g asterisk - keepdir /etc/asterisk - keepdir /var/lib/asterisk - keepdir /var/run/asterisk - keepdir /var/spool/asterisk - keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} - diropts -m 0750 -o asterisk -g asterisk - keepdir /var/log/asterisk/{cdr-csv,cdr-custom} - - newinitd "${FILESDIR}"/1.6.2/asterisk.initd asterisk - newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk - - # some people like to keep the sources around for custom patching - # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there - if use keepsrc - then - dodir /usr/src - - ebegin "Copying sources into /usr/src" - cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources" - eend $? - - ebegin "Cleaning source tree" - emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources" - eend $? - - einfo "Clean sources are available in "${ROOT}"usr/src/${PF}" - fi - - # install the upgrade documentation - # - dodoc README UPGRADE* BUGS CREDITS - - # install snmp mib files - # - if use snmp - then - insinto /usr/share/snmp/mibs/ - doins doc/digium-mib.txt doc/asterisk-mib.txt - fi - - # install SIP scripts; bug #300832 - # - dodoc "${FILESDIR}/1.6.2/sip_calc_auth" - dodoc "${FILESDIR}/1.6.2/find_call_sip_trace.sh" - dodoc "${FILESDIR}/1.6.2/find_call_ids.sh" - dodoc "${FILESDIR}/1.6.2/call_data.txt" -} - -pkg_preinst() { - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" -} - -pkg_postinst() { - # - # Announcements, warnings, reminders... - # - einfo "Asterisk has been installed" - echo - elog "If you want to know more about asterisk, visit these sites:" - elog "http://www.asteriskdocs.org/" - elog "http://www.voip-info.org/wiki-Asterisk" - echo - elog "http://www.automated.it/guidetoasterisk.htm" - echo - elog "Gentoo VoIP IRC Channel:" - elog "#gentoo-voip @ irc.freenode.net" - echo - echo - elog "1.6.1 -> 1.6.2 changes that you may care about:" - elog "canreinvite -> directmedia (sip.conf)" - elog "extensive T.38 (fax) changes" - elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" - elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" -} - -pkg_config() { - einfo "Do you want to reset file permissions and ownerships (y/N)?" - - read tmp - tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" - - if [[ "$tmp" = "y" ]] ||\ - [[ "$tmp" = "yes" ]] - then - einfo "Resetting permissions to defaults..." - - for x in spool run lib log; do - chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk - done - - chown -R root:asterisk "${ROOT}"etc/asterisk - chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk - - einfo "done" - else - einfo "skipping" - fi -} diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-fxsks-hookstate.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-fxsks-hookstate.patch deleted file mode 100644 index 98cd9adf1ce7..000000000000 --- a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.6-fxsks-hookstate.patch +++ /dev/null @@ -1,31 +0,0 @@ -Allow FXO channels to send out calls even before someone calls in through -them. - -This rxisoffhook does not work. Before 1.6.0 it was wrapped in a #ifdef -DAHDI_CHECK_HOOKSTATE (or rather: ZAP_CHECK_HOOKSTATE). In 1.6 it is -accidentally enabled by default. - -On DAHDI (the kernel) this field is not properly initialized at startup. -And thus it will only work after an incoming ring. - -Upstream issue: http://issues.asterisk.org/view.php?id=14577 - ---- a/channels/chan_dahdi.c -+++ b/channels/chan_dahdi.c -@@ -9295,12 +9295,16 @@ static inline int available(struct dahdi - /* When "onhook" that means no battery on the line, and thus - it is out of service..., if it's on a TDM card... If it's a channel - bank, there is no telling... */ -+#ifdef DAHDI_CHECK_HOOKSTATE - if (par.rxbits > -1) - return 1; - if (par.rxisoffhook) - return 1; - else - return 0; -+#else -+ return 1; -+#endif - } else if (par.rxisoffhook) { - ast_debug(1, "Channel %d off hook, can't use\n", p->channel); - /* Not available when the other end is off hook */ diff --git a/net-misc/asterisk/files/1.6.2/asterisk.initd b/net-misc/asterisk/files/1.6.2/asterisk.initd deleted file mode 100644 index 9462f493efe1..000000000000 --- a/net-misc/asterisk/files/1.6.2/asterisk.initd +++ /dev/null @@ -1,271 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.6.2/asterisk.initd,v 1.1 2010/07/19 15:48:50 chainsaw Exp $ - -opts="${opts} forcestop reload" - -depend() { - need net - use nscd dns dahdi mysql postgresql slapd capi -} - -is_running() { - if [ -z "$(pidof asterisk)" ]; then - return 1 - else - PID="$(cat /var/run/asterisk/asterisk.pid)" - for x in $(pidof asterisk); do - if [ "${x}" = "${PID}" ]; then - return 0 - fi - done - fi - - return 1 -} - -asterisk_run_loop() { - local OPTS ARGS MSG NICE="" - local result=0 signal=0 - - # default options - OPTS="-f" # don't fork / detach breaks wrapper script... - - # filter (redundant) arguments - ARGS="$(echo "${@}" | sed -e "s:-c\|-f::g")" - - # mangle yes/no options - ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')" - - if [ -n "${ASTERISK_CORE_SIZE}" ] && - [ "${ASTERISK_CORE_SIZE}" != "0" ]; then - ulimit -c ${ASTERISK_CORE_SIZE} - - if [ -n "${ASTERISK_CORE_DIR}" ] && \ - [ ! -d "${ASTERISK_CORE_DIR}" ] - then - mkdir -m750 -p "${ASTERISK_CORE_DIR}" - - if [ -n "${ASTERISK_USER}" ]; then - chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}" - fi - fi - ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}" - - cd "${ASTERISK_CORE_DIR}" - echo " Core dump size : ${ASTERISK_CORE_SIZE}" - echo " Core dump location : ${ASTERISK_CORE_DIR}" - fi - - if [ -n "${ASTERISK_MAX_FD}" ]; then - ulimit -n ${ASTERISK_MAX_FD} - echo " Max open filedescriptors : ${ASTERISK_MAX_FD}" - fi - - if [ -n "${ASTERISK_NICE}" ]; then - echo " Nice level : ${ASTERISK_NICE}" - NICE="nice -n ${ASTERISK_NICE} --" - fi - - if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then - if [ -x /usr/sbin/sendmail ]; then - echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}" - else - echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!" - unset ASTERISK_NOTIFY_EMAIL - fi - fi - - if [ -n "${ASTERISK_TTY}" ]; then - for x in ${ASTERISK_TTY} \ - /dev/tty${ASTERISK_TTY} \ - /dev/vc/${ASTERISK_TTY} - do - if [ -c "${x}" ]; then - TTY="${x}" - fi - done - [ -n "${TTY}" ] && \ - echo " Messages are sent to : ${TTY}" - fi - - if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then - echo " Starting Asterisk console : ${ASTERISK_CONSOLE}" - OPTS="${OPTS} -c" - fi - - OPTS="${OPTS} ${ARGS}" - - trap "rm /var/run/asterisk/wrapper_loop.pid" EXIT - cut -f4 -d' ' < /proc/self/stat > /var/run/asterisk/wrapper_loop.pid - - while :; do - if [ -n "${TTY}" ]; then - /usr/bin/stty -F ${TTY} sane - ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY} - result=$? - else - set -o pipefail - ${NICE} /usr/sbin/asterisk ${OPTS} 2>&1 >/dev/null | logger -t asterisk_wrapper - set +o pipefail - result=$? - fi - - if [ $result -eq 0 ]; then - logger -t asterisk_wrapper "Asterisk terminated normally" - break - else - if [ $result -gt 128 ]; then - signal=$((result - 128)) - MSG="Asterisk terminated with Signal: $signal" - - CORE_TARGET="core-$(date "+%Y%m%d-%h%M%s")" - - local CORE_DUMPED=0 - if [ -f "${ASTERISK_CORE_DIR}/core" ]; then - mv "${ASTERISK_CORE_DIR}/core" \ - "${ASTERISK_CORE_DIR}/${CORE_TARGET}" - CORE_DUMPED=1 - - elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then - mv "${ASTERISK_CORE_DIR}/core.${PID}" \ - "${ASTERISK_CORE_DIR}/${CORE_TARGET}" - CORE_DUMPED=1 - - fi - - [ $CORE_DUMPED -eq 1 ] && \ - MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}" - else - MSG="Asterisk terminated with return code: $result" - fi - - # kill left-over tasks - for X in ${ASTERISK_CLEANUP_ON_CRASH}; do - kill -9 $(pidof ${X}); - done - fi - - [ -n "${TTY}" ] \ - && echo "${MSG}" >${TTY} \ - || logger -t asterisk_wrapper "${MSG}" - - - if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \ - [ -x /usr/sbin/sendmail ]; then - echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\ - /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}" - fi - sleep 5 - logger -t asterisk_wrapper "Restarting Asterisk..." - done - return 0 -} - -start() { - local OPTS USER GROUP PID - local tmp x - - if [ -n "${ASTERISK_NICE}" ]; then - if [ ${ASTERISK_NICE} -ge -20 ] && \ - [ ${ASTERISK_NICE} -le 19 ]; then - OPTS="--nicelevel ${ASTERISK_NICE}" - else - eerror "Nice value must be between -20 and 19" - return 1 - fi - fi - - if [ -n "${ASTERISK_USER}" ]; then - USER=$(echo $ASTERISK_USER | sed 's/:.*//') - GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }') - if [ -n "${USER}" ]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}" - fi - if [ -n "${GROUP}" ]; then - ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}" - GROUP=":${GROUP}" # make it look nice... - fi - for element in $(find /var/{log,run}/asterisk); do - if [ $(stat -c %U $element) != ${USER} ]; then - ewarn "${USER} is not the owner of $element, fixing." - chown -R ${USER} /var/{log,run}/asterisk - chmod -R u+r /var/{log,run}/asterisk - chmod u+x /var/{log,run}/asterisk - fi; - done; - ebegin "Starting asterisk PBX (as ${USER}${GROUP})" - else - ebegin "Starting asterisk PBX (as root)" - fi - - if [ "$(echo ${ASTERISK_WRAPPER} | tr '[:upper:]' '[:lower:]')" != "yes" ]; then - start-stop-daemon --start --exec /usr/sbin/asterisk \ - ${OPTS} -- ${ASTERISK_OPTS} - result=$? - else - asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null & - result=$? - fi - - if [ $result -eq 0 ]; then - # 2 seconds should be enough for asterisk to start - sleep 2 - is_running - result=$? - fi - - eend $result -} - -forcestop() { - ebegin "Stopping asterisk PBX" - start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid - eend $? -} - -stop() { - if ! is_running; then - eerror "Asterisk is not running!" - return 0 - fi - - if [ -r /var/run/asterisk/wrapper_loop.pid ]; then - ebegin "Killing wrapper script" - kill $(</var/run/asterisk/wrapper_loop.pid) - eend $? - fi - - ebegin "Stopping asterisk PBX gracefully" - /usr/sbin/asterisk -r -x "core stop gracefully" &>/dev/null - # Now we have to wait until asterisk has _really_ stopped. - sleep 1 - if is_running; then - einfon "Waiting for asterisk to shutdown ." - local cnt=0 - while is_running; do - cnt=`expr $cnt + 1` - if [ $cnt -gt 60 ] ; then - # Waited 120 seconds now. Fail. - echo - eend 1 "Failed." - return - fi - sleep 2 - echo -n "." - done - echo - fi - eend 0 -} - -reload() { - if is_running; then - ebegin "Forcing asterisk to reload configuration" - /usr/sbin/asterisk -r -x "reload" &>/dev/null - eend $? - else - eerror "Asterisk is not running!" - fi -} |