From 60c9a4c16b61ed2ad99d7366d3f5d4bf28b27dfe Mon Sep 17 00:00:00 2001 From: Tony Vroon <chainsaw@gentoo.org> Date: Tue, 22 Feb 2011 16:24:36 +0000 Subject: Trim down 1.8 branch by culling vulnerable ebuilds for AST-2011-002. Adding 1.8.2.4 which fixes overflows in both stack & heap based arrays that can be exploited through specially crafted UDPTL packets, particularly for T.38 pass-through & termination. Package-Manager: portage-2.1.9.40/cvs/Linux x86_64 RepoMan-Options: --force --- net-misc/asterisk/ChangeLog | 11 +- net-misc/asterisk/Manifest | 14 +- net-misc/asterisk/asterisk-1.8.2.2.ebuild | 431 ------------------------------ net-misc/asterisk/asterisk-1.8.2.3.ebuild | 431 ------------------------------ net-misc/asterisk/asterisk-1.8.2.4.ebuild | 431 ++++++++++++++++++++++++++++++ 5 files changed, 447 insertions(+), 871 deletions(-) delete mode 100644 net-misc/asterisk/asterisk-1.8.2.2.ebuild delete mode 100644 net-misc/asterisk/asterisk-1.8.2.3.ebuild create mode 100644 net-misc/asterisk/asterisk-1.8.2.4.ebuild (limited to 'net-misc/asterisk') diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog index f74e9dac8de7..a9d03ac52639 100644 --- a/net-misc/asterisk/ChangeLog +++ b/net-misc/asterisk/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-misc/asterisk # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.289 2011/02/03 19:17:49 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.290 2011/02/22 16:24:36 chainsaw Exp $ + +*asterisk-1.8.2.4 (22 Feb 2011) + + 22 Feb 2011; Tony Vroon <chainsaw@gentoo.org> -asterisk-1.8.2.2.ebuild, + -asterisk-1.8.2.3.ebuild, +asterisk-1.8.2.4.ebuild: + Trim down 1.8 branch by culling vulnerable ebuilds for AST-2011-002. Adding + 1.8.2.4 which fixes overflows in both stack & heap based arrays that can be + exploited through specially crafted UDPTL packets, particularly for T.38 + pass-through & termination. *asterisk-1.8.2.3 (03 Feb 2011) diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest index 435c8424fa8e..e1ecdacd6edd 100644 --- a/net-misc/asterisk/Manifest +++ b/net-misc/asterisk/Manifest @@ -36,8 +36,7 @@ DIST asterisk-1.2.37.tar.gz 29899629 RMD160 1de7ff96d3b1fd8d89f3ef7b3bb9e35bedcc DIST asterisk-1.2.40.tar.gz 29903514 RMD160 dc3da60756c82c98a055e49b068eb6760a01948e SHA1 4b4b794e858a3436bc35bdd2f4edf824c2885b68 SHA256 61dc745b12f6dc2998404e77747a964db56df8efae84a666c4ccddf016c9c06d DIST asterisk-1.4.39.1.tar.gz 21651888 RMD160 0ea21328e1e569499ada5c5a55aaedcd321853b4 SHA1 8a4e586124974e188ccefa902534b874899a7d29 SHA256 39af16a3b15f7ff7a4008b4cc892523189dd89fc57ba9278e248d896ecdabe9c DIST asterisk-1.6.2.16.1.tar.gz 23707383 RMD160 f34c759d1f47f4f55fc7468581251bc078a8c930 SHA1 43c6ce9c3e1461bd858dd283a5a8b4753323432c SHA256 22329bf995c930bfd5392b61d83f66543709e24db3e3aaeddcb5d9a1c0792f4c -DIST asterisk-1.8.2.2.tar.gz 26330842 RMD160 1f642528d67773a82abb928f725309c88c33b2f7 SHA1 c5cf5a02e2dcab9b537c8909fc7505fedf025c43 SHA256 d8df3458b0e1e0d32eca17b70f894b01665b8529b94ca937724143b09a26c3dd -DIST asterisk-1.8.2.3.tar.gz 26796032 RMD160 b3a8d08df7cf93426594f3c97b7f25e77fdc6b1a SHA1 98dd583ecb0e150ba02ea4e058c5067e51a0c760 SHA256 d7189fe6e6285eea02ef810a4e1feeb4d48d38fec5799b55dd361bb6fbb6a05b +DIST asterisk-1.8.2.4.tar.gz 26802859 RMD160 af4206f46c73b8c9227a96a4551f3c969527c793 SHA1 dec9ce8e8dbd6000ccd180de06ecebf74b71f930 SHA256 978dc9b1f4585c31fafa23a86e347ad46a75d8b438c059423f804bea088bbb1d DIST gentoo-ast14-patchset-0.1.tar.bz2 2468 RMD160 a466a098627edb18603dee199a3c1e858fdc2f77 SHA1 9518d527e56d48c40f520b677e160b6566887910 SHA256 e1385e91f33c3f3441c7405b00e0932cba92f9f561bc4e768bf8094372912184 DIST gentoo-asterisk-patchset-0.1.tar.bz2 5394 RMD160 bfd546101c77f6e6989c406bfb202e592f9d16fd SHA1 e49b7784f987e027d833fbe8e0773acb1ef78521 SHA256 07c1bc6a29bda4fa98e7d1eb436d2e6eafc13263b774a0ff41698e523fa59a97 DIST gentoo-asterisk-patchset-0.2.tar.bz2 7398 RMD160 65b282fa621b3e65d293cd7e1d2f0af1e7837643 SHA1 71958e5108f225dda4e22a97a26a793e51f39283 SHA256 cff992cef307d73d336bf64ed56c32382a264e1b0eb468921a51d09c7f9d5861 @@ -45,14 +44,13 @@ EBUILD asterisk-1.2.37.ebuild 10717 RMD160 6ec81f6a616cc2cefa862c1a53bc339bc2dcb EBUILD asterisk-1.2.40.ebuild 10725 RMD160 a41d802dbc202665f190f29241b0f40645480916 SHA1 489416463292be0c64a2d1e2f2182b38579bbfe3 SHA256 4c3467dcb7c4011e42b468d699ea3dcc0041a2fc6968b8124276c8df705c88c6 EBUILD asterisk-1.4.39.1-r1.ebuild 7367 RMD160 0304f9478d77dada3b7c4dc4f7ed9c5845ff871a SHA1 03cc1bd64f14156ee03b29609dbe643c9b2fb6cd SHA256 774fd4873d8c3122a96a0ddc7f6a0caed2dff81b9acd60cdb5b805bfd9755d7f EBUILD asterisk-1.6.2.16.1.ebuild 6432 RMD160 b991fe82242376ce9eb329a2cf61157636fea56e SHA1 26b1942e60b8ee65879b8bf5df270b22f54d2950 SHA256 f423382255347a192bf0e491b9284f0a19d955388b2307a634d38917eabd1954 -EBUILD asterisk-1.8.2.2.ebuild 14402 RMD160 c2b8ef0c34a70ea8ec99022adeeed7d720ff9aec SHA1 7d332b3959fd0fdf0fd4f300fb2e888740a3d7b8 SHA256 5f5f0409f1c7f465835f8f5ce3fe68e468d9011580a56dc98b10803e84bcba4a -EBUILD asterisk-1.8.2.3.ebuild 14402 RMD160 84e34445ed13fab84c956f70afd78c29a3a81e5a SHA1 d82da419f77724628f3fb770643bb20b8e7d7e50 SHA256 aac39b415d5432360442605b54627fcd6a114538dd11d339c705ced6b9ebd098 -MISC ChangeLog 71635 RMD160 2801cfbc9461faf9a86865be1980cff353b1e930 SHA1 eb27f04f4d1b4fc4f35e368effb04700b0888e7f SHA256 982fb266409a4a743c92198209dfe1c5537022aedd5624cbe2d7bf5cab511b38 +EBUILD asterisk-1.8.2.4.ebuild 14402 RMD160 6cc9ddd9072d71b880b65bad2038e4b0662043b6 SHA1 321dc1e6fa7b549b576ada245e561e1df66703c1 SHA256 2f3e5efd1db384937f10ffbbe0a5bf6dd1ce91f7700e7ba4a97074f2150f4533 +MISC ChangeLog 72058 RMD160 90bb203b4ec1b22d623546ac5bdd82a4ce58ddce SHA1 013d4796beb0f0e9edd08a5a6bfd3a45bb8af796 SHA256 7a7fd27a24498730df9f7b11543b33f53c12db572150ac6824dceb9ecf67f8b5 MISC metadata.xml 1681 RMD160 fa822016d351dcf52f4b52226adcfa03a4b4e726 SHA1 3436530fb26d46b1d4ff9adba8d684b1e054de20 SHA256 d4199859f1f0eea8a81a895d98270344a0967a76592004b6fdf5ff77a053e824 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk1K/2MACgkQp5vW4rUFj5ohbwCggHCtupDp6RD+naNe7cz5EUau -GnkAoLlbQQ+o8LGzQDl7lJwmXYpDfGgC -=aJv7 +iEYEARECAAYFAk1j40cACgkQp5vW4rUFj5qLpACfYQIrjfSxE6LeFfPFGh6ul+Cx +rbYAoJWejJ/7krgzMae5hAU2z++v9Tha +=ECKX -----END PGP SIGNATURE----- diff --git a/net-misc/asterisk/asterisk-1.8.2.2.ebuild b/net-misc/asterisk/asterisk-1.8.2.2.ebuild deleted file mode 100644 index 552663c854b1..000000000000 --- a/net-misc/asterisk/asterisk-1.8.2.2.ebuild +++ /dev/null @@ -1,431 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.8.2.2.ebuild,v 1.1 2011/01/22 02:36:25 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/${MY_P}.tar.gz - mirror://gentoo/gentoo-asterisk-patchset-0.2.tar.bz2" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="ais alsa bluetooth calendar +caps curl dahdi debug doc freetds gtalk h323 http iconv jabber jingle ldap lua misdn mysql newt +samples odbc osplookup oss portaudio postgres radius snmp span speex ssl sqlite sqlite3 srtp static syslog usb vorbis" - -EPATCH_SUFFIX="patch" -PATCHES=( "${WORKDIR}/asterisk-patchset" ) - -RDEPEND="sys-libs/ncurses - dev-libs/popt - sys-libs/zlib - dev-libs/libxml2 - ais? ( sys-cluster/openais ) - alsa? ( media-libs/alsa-lib ) - bluetooth? ( net-wireless/bluez ) - calendar? ( net-libs/neon - dev-libs/libical - dev-libs/iksemel ) - caps? ( sys-libs/libcap ) - curl? ( net-misc/curl ) - dahdi? ( >=net-libs/libpri-1.4.12_beta2 - net-misc/dahdi-tools ) - freetds? ( dev-db/freetds ) - gtalk? ( dev-libs/iksemel ) - h323? ( net-libs/openh323 ) - http? ( dev-libs/gmime:0 ) - iconv? ( virtual/libiconv ) - jabber? ( dev-libs/iksemel ) - jingle? ( dev-libs/iksemel ) - ldap? ( net-nds/openldap ) - lua? ( dev-lang/lua ) - misdn? ( net-dialup/misdnuser ) - mysql? ( dev-db/mysql ) - newt? ( dev-libs/newt ) - odbc? ( dev-db/unixODBC ) - osplookup? ( net-libs/osptoolkit - dev-libs/openssl ) - portaudio? ( media-libs/portaudio ) - 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:0 ) - sqlite3? ( dev-db/sqlite:3 ) - srtp? ( net-libs/libsrtp ) - ssl? ( dev-libs/openssl ) - syslog? ( app-admin/syslog-ng ) - usb? ( dev-libs/libusb - media-libs/alsa-lib ) - vorbis? ( media-libs/libvorbis )" - -DEPEND="${RDEPEND} - !net-misc/asterisk-addons - !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}" - -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 - - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" -} - -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 caps cap) \ - $(use_with http gmime) \ - $(use_with newt) \ - $(use_with portaudio) \ - $(use_with ssl crypto) \ - $(use_with ssl) - - # - # 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 - - # Compile menuselect binary for optional components - emake menuselect.makeopts - if use ais; then - menuselect/menuselect --enable res_ais menuselect.makeopts - else - menuselect/menuselect --disable res_ais menuselect.makeopts - fi - if use alsa; then - menuselect/menuselect --enable chan_alsa menuselect.makeopts - else - menuselect/menuselect --disable chan_alsa menuselect.makeopts - fi - if use bluetooth; then - menuselect/menuselect --enable chan_mobile menuselect.makeopts - else - menuselect/menuselect --disable chan_mobile menuselect.makeopts - fi - if use calendar; then - menuselect/menuselect --enable res_calendar menuselect.makeopts - menuselect/menuselect --enable res_calendar_caldav menuselect.makeopts - menuselect/menuselect --enable res_calendar_ews menuselect.makeopts - menuselect/menuselect --enable res_calendar_exchange menuselect.makeopts - menuselect/menuselect --enable res_calendar_icalendar menuselect.makeopts - else - menuselect/menuselect --disable res_calendar menuselect.makeopts - menuselect/menuselect --disable res_calendar_caldav menuselect.makeopts - menuselect/menuselect --disable res_calendar_ews menuselect.makeopts - menuselect/menuselect --disable res_calendar_exchange menuselect.makeopts - menuselect/menuselect --disable res_calendar_icalendar menuselect.makeopts - fi - if use curl; then - menuselect/menuselect --enable func_curl menuselect.makeopts - menuselect/menuselect --enable res_config_curl menuselect.makeopts - menuselect/menuselect --enable res_curl menuselect.makeopts - else - menuselect/menuselect --disable func_curl menuselect.makeopts - menuselect/menuselect --disable res_config_curl menuselect.makeopts - menuselect/menuselect --disable res_curl menuselect.makeopts - fi - if use dahdi; then - menuselect/menuselect --enable app_dahdibarge menuselect.makeopts - menuselect/menuselect --enable app_dahdiras menuselect.makeopts - menuselect/menuselect --enable chan_dahdi menuselect.makeopts - menuselect/menuselect --enable codec_dahdi menuselect.makeopts - menuselect/menuselect --enable res_timing_dahdi menuselect.makeopts - else - menuselect/menuselect --disable app_dahdibarge menuselect.makeopts - menuselect/menuselect --disable app_dahdiras menuselect.makeopts - menuselect/menuselect --disable chan_dahdi menuselect.makeopts - menuselect/menuselect --disable codec_dahdi menuselect.makeopts - menuselect/menuselect --disable res_timing_dahdi menuselect.makeopts - fi - if use freetds; then - menuselect/menuselect --enable cdr_tds menuselect.makeopts - menuselect/menuselect --enable cel_tds menuselect.makeopts - else - menuselect/menuselect --disable cdr_tds menuselect.makeopts - menuselect/menuselect --disable cel_tds menuselect.makeopts - fi - if use gtalk; then - menuselect/menuselect --enable chan_gtalk menuselect.makeopts - else - menuselect/menuselect --disable chan_gtalk menuselect.makeopts - fi - if use h323; then - menuselect/menuselect --enable chan_ooh323 menuselect.makeopts - else - menuselect/menuselect --disable chan_ooh323 menuselect.makeopts - fi - if use http; then - menuselect/menuselect --enable res_http_post menuselect.makeopts - else - menuselect/menuselect --disable res_http_post menuselect.makeopts - fi - if use iconv; then - menuselect/menuselect --enable func_iconv menuselect.makeopts - else - menuselect/menuselect --disable func_iconv menuselect.makeopts - fi - if use jabber; then - menuselect/menuselect --enable res_jabber menuselect.makeopts - else - menuselect/menuselect --disable res_jabber menuselect.makeopts - fi - if use jingle; then - menuselect/menuselect --enable chan_jingle menuselect.makeopts - else - menuselect/menuselect --disable chan_jingle menuselect.makeopts - fi - if use ldap; then - menuselect/menuselect --enable res_config_ldap menuselect.makeopts - else - menuselect/menuselect --disable res_config_ldap menuselect.makeopts - fi - if use lua; then - menuselect/menuselect --enable pbx_lua menuselect.makeopts - else - menuselect/menuselect --disable pbx_lua menuselect.makeopts - fi - if use misdn; then - menuselect/menuselect --enable chan_misdn menuselect.makeopts - else - menuselect/menuselect --disable chan_misdn menuselect.makeopts - fi - if use mysql; then - menuselect/menuselect --enable app_mysql menuselect.makeopts - menuselect/menuselect --enable cdr_mysql menuselect.makeopts - menuselect/menuselect --enable res_config_mysql menuselect.makeopts - else - menuselect/menuselect --disable app_mysql menuselect.makeopts - menuselect/menuselect --disable cdr_mysql menuselect.makeopts - menuselect/menuselect --disable res_config_mysql menuselect.makeopts - fi - if use odbc; then - menuselect/menuselect --enable cdr_adaptive_odbc menuselect.makeopts - menuselect/menuselect --enable cdr_odbc menuselect.makeopts - menuselect/menuselect --enable cel_odbc menuselect.makeopts - menuselect/menuselect --enable func_odbc menuselect.makeopts - menuselect/menuselect --enable res_config_odbc menuselect.makeopts - menuselect/menuselect --enable res_odbc menuselect.makeopts - else - menuselect/menuselect --disable cdr_adaptive_odbc menuselect.makeopts - menuselect/menuselect --disable cdr_odbc menuselect.makeopts - menuselect/menuselect --disable cel_odbc menuselect.makeopts - menuselect/menuselect --disable func_odbc menuselect.makeopts - menuselect/menuselect --disable res_config_odbc menuselect.makeopts - menuselect/menuselect --disable res_odbc menuselect.makeopts - fi - if use osplookup; then - menuselect/menuselect --enable app_osplookup menuselect.makeopts - else - menuselect/menuselect --disable app_osplookup menuselect.makeopts - fi - if use oss; then - menuselect/menuselect --enable chan_oss menuselect.makeopts - else - menuselect/menuselect --disable chan_oss menuselect.makeopts - fi - if use postgres; then - menuselect/menuselect --enable cdr_pgsql menuselect.makeopts - menuselect/menuselect --enable cel_pgsql menuselect.makeopts - menuselect/menuselect --enable res_config_pgsql menuselect.makeopts - else - menuselect/menuselect --disable cdr_pgsql menuselect.makeopts - menuselect/menuselect --disable cel_pgsql menuselect.makeopts - menuselect/menuselect --disable res_config_pgsql menuselect.makeopts - fi - if use radius; then - menuselect/menuselect --enable cdr_radius menuselect.makeopts - menuselect/menuselect --enable cel_radius menuselect.makeopts - else - menuselect/menuselect --disable cdr_radius menuselect.makeopts - menuselect/menuselect --disable cel_radius menuselect.makeopts - fi - if use snmp; then - menuselect/menuselect --enable res_snmp menuselect.makeopts - else - menuselect/menuselect --disable res_snmp menuselect.makeopts - fi - if use span; then - menuselect/menuselect --enable res_fax_spandsp menuselect.makeopts - else - menuselect/menuselect --disable res_fax_spandsp menuselect.makeopts - fi - if use speex; then - menuselect/menuselect --enable codec_speex menuselect.makeopts - menuselect/menuselect --enable func_speex menuselect.makeopts - else - menuselect/menuselect --disable codec_speex menuselect.makeopts - menuselect/menuselect --disable func_speex menuselect.makeopts - fi - if use sqlite; then - menuselect/menuselect --enable cdr_sqlite menuselect.makeopts - else - menuselect/menuselect --disable cdr_sqlite menuselect.makeopts - fi - if use sqlite3; then - menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts - menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts - else - menuselect/menuselect --disable cdr_sqlite3_custom menuselect.makeopts - menuselect/menuselect --disable cel_sqlite3_custom menuselect.makeopts - fi - if use srtp; then - menuselect/menuselect --enable res_srtp menuselect.makeopts - else - menuselect/menuselect --disable res_srtp menuselect.makeopts - fi - if use syslog; then - menuselect/menuselect --enable cdr_syslog menuselect.makeopts - else - menuselect/menuselect --disable cdr_syslog menuselect.makeopts - fi - if use usb; then - menuselect/menuselect --enable chan_usbradio menuselect.makeopts - else - menuselect/menuselect --disable chan_usbradio menuselect.makeopts - fi - if use vorbis; then - menuselect/menuselect --enable format_ogg_vorbis menuselect.makeopts - else - menuselect/menuselect --disable format_ogg_vorbis menuselect.makeopts - fi -} - -src_compile() { - ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" -} - -src_install() { - mkdir -p "${D}"usr/$(get_libdir)/pkgconfig - emake DESTDIR="${D}" -j1 installdirs || die "emake installdirs failed" - emake DESTDIR="${D}" install || die "emake installdirs 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 - - # install the upgrade documentation - # - dodoc README UPGRADE* BUGS CREDITS - - # install extra documentation - # - if use doc - then - dodoc doc/*.txt - dodoc doc/*.pdf - dodoc doc/PEERING - dodoc doc/CODING-GUIDELINES - dodoc doc/tex/*.pdf - 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 - # - insinto /etc/logrotate.d - newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk -} - -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.8 changes that you may care about:" - 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.8.2.3.ebuild b/net-misc/asterisk/asterisk-1.8.2.3.ebuild deleted file mode 100644 index 9cc1605eb891..000000000000 --- a/net-misc/asterisk/asterisk-1.8.2.3.ebuild +++ /dev/null @@ -1,431 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.8.2.3.ebuild,v 1.1 2011/02/03 19:17:49 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/${MY_P}.tar.gz - mirror://gentoo/gentoo-asterisk-patchset-0.2.tar.bz2" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="ais alsa bluetooth calendar +caps curl dahdi debug doc freetds gtalk h323 http iconv jabber jingle ldap lua misdn mysql newt +samples odbc osplookup oss portaudio postgres radius snmp span speex ssl sqlite sqlite3 srtp static syslog usb vorbis" - -EPATCH_SUFFIX="patch" -PATCHES=( "${WORKDIR}/asterisk-patchset" ) - -RDEPEND="sys-libs/ncurses - dev-libs/popt - sys-libs/zlib - dev-libs/libxml2 - ais? ( sys-cluster/openais ) - alsa? ( media-libs/alsa-lib ) - bluetooth? ( net-wireless/bluez ) - calendar? ( net-libs/neon - dev-libs/libical - dev-libs/iksemel ) - caps? ( sys-libs/libcap ) - curl? ( net-misc/curl ) - dahdi? ( >=net-libs/libpri-1.4.12_beta2 - net-misc/dahdi-tools ) - freetds? ( dev-db/freetds ) - gtalk? ( dev-libs/iksemel ) - h323? ( net-libs/openh323 ) - http? ( dev-libs/gmime:0 ) - iconv? ( virtual/libiconv ) - jabber? ( dev-libs/iksemel ) - jingle? ( dev-libs/iksemel ) - ldap? ( net-nds/openldap ) - lua? ( dev-lang/lua ) - misdn? ( net-dialup/misdnuser ) - mysql? ( dev-db/mysql ) - newt? ( dev-libs/newt ) - odbc? ( dev-db/unixODBC ) - osplookup? ( net-libs/osptoolkit - dev-libs/openssl ) - portaudio? ( media-libs/portaudio ) - 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:0 ) - sqlite3? ( dev-db/sqlite:3 ) - srtp? ( net-libs/libsrtp ) - ssl? ( dev-libs/openssl ) - syslog? ( app-admin/syslog-ng ) - usb? ( dev-libs/libusb - media-libs/alsa-lib ) - vorbis? ( media-libs/libvorbis )" - -DEPEND="${RDEPEND} - !net-misc/asterisk-addons - !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}" - -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 - - enewgroup asterisk - enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" -} - -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 caps cap) \ - $(use_with http gmime) \ - $(use_with newt) \ - $(use_with portaudio) \ - $(use_with ssl crypto) \ - $(use_with ssl) - - # - # 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 - - # Compile menuselect binary for optional components - emake menuselect.makeopts - if use ais; then - menuselect/menuselect --enable res_ais menuselect.makeopts - else - menuselect/menuselect --disable res_ais menuselect.makeopts - fi - if use alsa; then - menuselect/menuselect --enable chan_alsa menuselect.makeopts - else - menuselect/menuselect --disable chan_alsa menuselect.makeopts - fi - if use bluetooth; then - menuselect/menuselect --enable chan_mobile menuselect.makeopts - else - menuselect/menuselect --disable chan_mobile menuselect.makeopts - fi - if use calendar; then - menuselect/menuselect --enable res_calendar menuselect.makeopts - menuselect/menuselect --enable res_calendar_caldav menuselect.makeopts - menuselect/menuselect --enable res_calendar_ews menuselect.makeopts - menuselect/menuselect --enable res_calendar_exchange menuselect.makeopts - menuselect/menuselect --enable res_calendar_icalendar menuselect.makeopts - else - menuselect/menuselect --disable res_calendar menuselect.makeopts - menuselect/menuselect --disable res_calendar_caldav menuselect.makeopts - menuselect/menuselect --disable res_calendar_ews menuselect.makeopts - menuselect/menuselect --disable res_calendar_exchange menuselect.makeopts - menuselect/menuselect --disable res_calendar_icalendar menuselect.makeopts - fi - if use curl; then - menuselect/menuselect --enable func_curl menuselect.makeopts - menuselect/menuselect --enable res_config_curl menuselect.makeopts - menuselect/menuselect --enable res_curl menuselect.makeopts - else - menuselect/menuselect --disable func_curl menuselect.makeopts - menuselect/menuselect --disable res_config_curl menuselect.makeopts - menuselect/menuselect --disable res_curl menuselect.makeopts - fi - if use dahdi; then - menuselect/menuselect --enable app_dahdibarge menuselect.makeopts - menuselect/menuselect --enable app_dahdiras menuselect.makeopts - menuselect/menuselect --enable chan_dahdi menuselect.makeopts - menuselect/menuselect --enable codec_dahdi menuselect.makeopts - menuselect/menuselect --enable res_timing_dahdi menuselect.makeopts - else - menuselect/menuselect --disable app_dahdibarge menuselect.makeopts - menuselect/menuselect --disable app_dahdiras menuselect.makeopts - menuselect/menuselect --disable chan_dahdi menuselect.makeopts - menuselect/menuselect --disable codec_dahdi menuselect.makeopts - menuselect/menuselect --disable res_timing_dahdi menuselect.makeopts - fi - if use freetds; then - menuselect/menuselect --enable cdr_tds menuselect.makeopts - menuselect/menuselect --enable cel_tds menuselect.makeopts - else - menuselect/menuselect --disable cdr_tds menuselect.makeopts - menuselect/menuselect --disable cel_tds menuselect.makeopts - fi - if use gtalk; then - menuselect/menuselect --enable chan_gtalk menuselect.makeopts - else - menuselect/menuselect --disable chan_gtalk menuselect.makeopts - fi - if use h323; then - menuselect/menuselect --enable chan_ooh323 menuselect.makeopts - else - menuselect/menuselect --disable chan_ooh323 menuselect.makeopts - fi - if use http; then - menuselect/menuselect --enable res_http_post menuselect.makeopts - else - menuselect/menuselect --disable res_http_post menuselect.makeopts - fi - if use iconv; then - menuselect/menuselect --enable func_iconv menuselect.makeopts - else - menuselect/menuselect --disable func_iconv menuselect.makeopts - fi - if use jabber; then - menuselect/menuselect --enable res_jabber menuselect.makeopts - else - menuselect/menuselect --disable res_jabber menuselect.makeopts - fi - if use jingle; then - menuselect/menuselect --enable chan_jingle menuselect.makeopts - else - menuselect/menuselect --disable chan_jingle menuselect.makeopts - fi - if use ldap; then - menuselect/menuselect --enable res_config_ldap menuselect.makeopts - else - menuselect/menuselect --disable res_config_ldap menuselect.makeopts - fi - if use lua; then - menuselect/menuselect --enable pbx_lua menuselect.makeopts - else - menuselect/menuselect --disable pbx_lua menuselect.makeopts - fi - if use misdn; then - menuselect/menuselect --enable chan_misdn menuselect.makeopts - else - menuselect/menuselect --disable chan_misdn menuselect.makeopts - fi - if use mysql; then - menuselect/menuselect --enable app_mysql menuselect.makeopts - menuselect/menuselect --enable cdr_mysql menuselect.makeopts - menuselect/menuselect --enable res_config_mysql menuselect.makeopts - else - menuselect/menuselect --disable app_mysql menuselect.makeopts - menuselect/menuselect --disable cdr_mysql menuselect.makeopts - menuselect/menuselect --disable res_config_mysql menuselect.makeopts - fi - if use odbc; then - menuselect/menuselect --enable cdr_adaptive_odbc menuselect.makeopts - menuselect/menuselect --enable cdr_odbc menuselect.makeopts - menuselect/menuselect --enable cel_odbc menuselect.makeopts - menuselect/menuselect --enable func_odbc menuselect.makeopts - menuselect/menuselect --enable res_config_odbc menuselect.makeopts - menuselect/menuselect --enable res_odbc menuselect.makeopts - else - menuselect/menuselect --disable cdr_adaptive_odbc menuselect.makeopts - menuselect/menuselect --disable cdr_odbc menuselect.makeopts - menuselect/menuselect --disable cel_odbc menuselect.makeopts - menuselect/menuselect --disable func_odbc menuselect.makeopts - menuselect/menuselect --disable res_config_odbc menuselect.makeopts - menuselect/menuselect --disable res_odbc menuselect.makeopts - fi - if use osplookup; then - menuselect/menuselect --enable app_osplookup menuselect.makeopts - else - menuselect/menuselect --disable app_osplookup menuselect.makeopts - fi - if use oss; then - menuselect/menuselect --enable chan_oss menuselect.makeopts - else - menuselect/menuselect --disable chan_oss menuselect.makeopts - fi - if use postgres; then - menuselect/menuselect --enable cdr_pgsql menuselect.makeopts - menuselect/menuselect --enable cel_pgsql menuselect.makeopts - menuselect/menuselect --enable res_config_pgsql menuselect.makeopts - else - menuselect/menuselect --disable cdr_pgsql menuselect.makeopts - menuselect/menuselect --disable cel_pgsql menuselect.makeopts - menuselect/menuselect --disable res_config_pgsql menuselect.makeopts - fi - if use radius; then - menuselect/menuselect --enable cdr_radius menuselect.makeopts - menuselect/menuselect --enable cel_radius menuselect.makeopts - else - menuselect/menuselect --disable cdr_radius menuselect.makeopts - menuselect/menuselect --disable cel_radius menuselect.makeopts - fi - if use snmp; then - menuselect/menuselect --enable res_snmp menuselect.makeopts - else - menuselect/menuselect --disable res_snmp menuselect.makeopts - fi - if use span; then - menuselect/menuselect --enable res_fax_spandsp menuselect.makeopts - else - menuselect/menuselect --disable res_fax_spandsp menuselect.makeopts - fi - if use speex; then - menuselect/menuselect --enable codec_speex menuselect.makeopts - menuselect/menuselect --enable func_speex menuselect.makeopts - else - menuselect/menuselect --disable codec_speex menuselect.makeopts - menuselect/menuselect --disable func_speex menuselect.makeopts - fi - if use sqlite; then - menuselect/menuselect --enable cdr_sqlite menuselect.makeopts - else - menuselect/menuselect --disable cdr_sqlite menuselect.makeopts - fi - if use sqlite3; then - menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts - menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts - else - menuselect/menuselect --disable cdr_sqlite3_custom menuselect.makeopts - menuselect/menuselect --disable cel_sqlite3_custom menuselect.makeopts - fi - if use srtp; then - menuselect/menuselect --enable res_srtp menuselect.makeopts - else - menuselect/menuselect --disable res_srtp menuselect.makeopts - fi - if use syslog; then - menuselect/menuselect --enable cdr_syslog menuselect.makeopts - else - menuselect/menuselect --disable cdr_syslog menuselect.makeopts - fi - if use usb; then - menuselect/menuselect --enable chan_usbradio menuselect.makeopts - else - menuselect/menuselect --disable chan_usbradio menuselect.makeopts - fi - if use vorbis; then - menuselect/menuselect --enable format_ogg_vorbis menuselect.makeopts - else - menuselect/menuselect --disable format_ogg_vorbis menuselect.makeopts - fi -} - -src_compile() { - ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" -} - -src_install() { - mkdir -p "${D}"usr/$(get_libdir)/pkgconfig - emake DESTDIR="${D}" -j1 installdirs || die "emake installdirs failed" - emake DESTDIR="${D}" install || die "emake installdirs 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 - - # install the upgrade documentation - # - dodoc README UPGRADE* BUGS CREDITS - - # install extra documentation - # - if use doc - then - dodoc doc/*.txt - dodoc doc/*.pdf - dodoc doc/PEERING - dodoc doc/CODING-GUIDELINES - dodoc doc/tex/*.pdf - 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 - # - insinto /etc/logrotate.d - newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk -} - -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.8 changes that you may care about:" - 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.8.2.4.ebuild b/net-misc/asterisk/asterisk-1.8.2.4.ebuild new file mode 100644 index 000000000000..99e0889d78a0 --- /dev/null +++ b/net-misc/asterisk/asterisk-1.8.2.4.ebuild @@ -0,0 +1,431 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.8.2.4.ebuild,v 1.1 2011/02/22 16:24:36 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/${MY_P}.tar.gz + mirror://gentoo/gentoo-asterisk-patchset-0.2.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="ais alsa bluetooth calendar +caps curl dahdi debug doc freetds gtalk h323 http iconv jabber jingle ldap lua misdn mysql newt +samples odbc osplookup oss portaudio postgres radius snmp span speex ssl sqlite sqlite3 srtp static syslog usb vorbis" + +EPATCH_SUFFIX="patch" +PATCHES=( "${WORKDIR}/asterisk-patchset" ) + +RDEPEND="sys-libs/ncurses + dev-libs/popt + sys-libs/zlib + dev-libs/libxml2 + ais? ( sys-cluster/openais ) + alsa? ( media-libs/alsa-lib ) + bluetooth? ( net-wireless/bluez ) + calendar? ( net-libs/neon + dev-libs/libical + dev-libs/iksemel ) + caps? ( sys-libs/libcap ) + curl? ( net-misc/curl ) + dahdi? ( >=net-libs/libpri-1.4.12_beta2 + net-misc/dahdi-tools ) + freetds? ( dev-db/freetds ) + gtalk? ( dev-libs/iksemel ) + h323? ( net-libs/openh323 ) + http? ( dev-libs/gmime:0 ) + iconv? ( virtual/libiconv ) + jabber? ( dev-libs/iksemel ) + jingle? ( dev-libs/iksemel ) + ldap? ( net-nds/openldap ) + lua? ( dev-lang/lua ) + misdn? ( net-dialup/misdnuser ) + mysql? ( dev-db/mysql ) + newt? ( dev-libs/newt ) + odbc? ( dev-db/unixODBC ) + osplookup? ( net-libs/osptoolkit + dev-libs/openssl ) + portaudio? ( media-libs/portaudio ) + 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:0 ) + sqlite3? ( dev-db/sqlite:3 ) + srtp? ( net-libs/libsrtp ) + ssl? ( dev-libs/openssl ) + syslog? ( app-admin/syslog-ng ) + usb? ( dev-libs/libusb + media-libs/alsa-lib ) + vorbis? ( media-libs/libvorbis )" + +DEPEND="${RDEPEND} + !net-misc/asterisk-addons + !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}" + +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 + + enewgroup asterisk + enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" +} + +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 caps cap) \ + $(use_with http gmime) \ + $(use_with newt) \ + $(use_with portaudio) \ + $(use_with ssl crypto) \ + $(use_with ssl) + + # + # 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 + + # Compile menuselect binary for optional components + emake menuselect.makeopts + if use ais; then + menuselect/menuselect --enable res_ais menuselect.makeopts + else + menuselect/menuselect --disable res_ais menuselect.makeopts + fi + if use alsa; then + menuselect/menuselect --enable chan_alsa menuselect.makeopts + else + menuselect/menuselect --disable chan_alsa menuselect.makeopts + fi + if use bluetooth; then + menuselect/menuselect --enable chan_mobile menuselect.makeopts + else + menuselect/menuselect --disable chan_mobile menuselect.makeopts + fi + if use calendar; then + menuselect/menuselect --enable res_calendar menuselect.makeopts + menuselect/menuselect --enable res_calendar_caldav menuselect.makeopts + menuselect/menuselect --enable res_calendar_ews menuselect.makeopts + menuselect/menuselect --enable res_calendar_exchange menuselect.makeopts + menuselect/menuselect --enable res_calendar_icalendar menuselect.makeopts + else + menuselect/menuselect --disable res_calendar menuselect.makeopts + menuselect/menuselect --disable res_calendar_caldav menuselect.makeopts + menuselect/menuselect --disable res_calendar_ews menuselect.makeopts + menuselect/menuselect --disable res_calendar_exchange menuselect.makeopts + menuselect/menuselect --disable res_calendar_icalendar menuselect.makeopts + fi + if use curl; then + menuselect/menuselect --enable func_curl menuselect.makeopts + menuselect/menuselect --enable res_config_curl menuselect.makeopts + menuselect/menuselect --enable res_curl menuselect.makeopts + else + menuselect/menuselect --disable func_curl menuselect.makeopts + menuselect/menuselect --disable res_config_curl menuselect.makeopts + menuselect/menuselect --disable res_curl menuselect.makeopts + fi + if use dahdi; then + menuselect/menuselect --enable app_dahdibarge menuselect.makeopts + menuselect/menuselect --enable app_dahdiras menuselect.makeopts + menuselect/menuselect --enable chan_dahdi menuselect.makeopts + menuselect/menuselect --enable codec_dahdi menuselect.makeopts + menuselect/menuselect --enable res_timing_dahdi menuselect.makeopts + else + menuselect/menuselect --disable app_dahdibarge menuselect.makeopts + menuselect/menuselect --disable app_dahdiras menuselect.makeopts + menuselect/menuselect --disable chan_dahdi menuselect.makeopts + menuselect/menuselect --disable codec_dahdi menuselect.makeopts + menuselect/menuselect --disable res_timing_dahdi menuselect.makeopts + fi + if use freetds; then + menuselect/menuselect --enable cdr_tds menuselect.makeopts + menuselect/menuselect --enable cel_tds menuselect.makeopts + else + menuselect/menuselect --disable cdr_tds menuselect.makeopts + menuselect/menuselect --disable cel_tds menuselect.makeopts + fi + if use gtalk; then + menuselect/menuselect --enable chan_gtalk menuselect.makeopts + else + menuselect/menuselect --disable chan_gtalk menuselect.makeopts + fi + if use h323; then + menuselect/menuselect --enable chan_ooh323 menuselect.makeopts + else + menuselect/menuselect --disable chan_ooh323 menuselect.makeopts + fi + if use http; then + menuselect/menuselect --enable res_http_post menuselect.makeopts + else + menuselect/menuselect --disable res_http_post menuselect.makeopts + fi + if use iconv; then + menuselect/menuselect --enable func_iconv menuselect.makeopts + else + menuselect/menuselect --disable func_iconv menuselect.makeopts + fi + if use jabber; then + menuselect/menuselect --enable res_jabber menuselect.makeopts + else + menuselect/menuselect --disable res_jabber menuselect.makeopts + fi + if use jingle; then + menuselect/menuselect --enable chan_jingle menuselect.makeopts + else + menuselect/menuselect --disable chan_jingle menuselect.makeopts + fi + if use ldap; then + menuselect/menuselect --enable res_config_ldap menuselect.makeopts + else + menuselect/menuselect --disable res_config_ldap menuselect.makeopts + fi + if use lua; then + menuselect/menuselect --enable pbx_lua menuselect.makeopts + else + menuselect/menuselect --disable pbx_lua menuselect.makeopts + fi + if use misdn; then + menuselect/menuselect --enable chan_misdn menuselect.makeopts + else + menuselect/menuselect --disable chan_misdn menuselect.makeopts + fi + if use mysql; then + menuselect/menuselect --enable app_mysql menuselect.makeopts + menuselect/menuselect --enable cdr_mysql menuselect.makeopts + menuselect/menuselect --enable res_config_mysql menuselect.makeopts + else + menuselect/menuselect --disable app_mysql menuselect.makeopts + menuselect/menuselect --disable cdr_mysql menuselect.makeopts + menuselect/menuselect --disable res_config_mysql menuselect.makeopts + fi + if use odbc; then + menuselect/menuselect --enable cdr_adaptive_odbc menuselect.makeopts + menuselect/menuselect --enable cdr_odbc menuselect.makeopts + menuselect/menuselect --enable cel_odbc menuselect.makeopts + menuselect/menuselect --enable func_odbc menuselect.makeopts + menuselect/menuselect --enable res_config_odbc menuselect.makeopts + menuselect/menuselect --enable res_odbc menuselect.makeopts + else + menuselect/menuselect --disable cdr_adaptive_odbc menuselect.makeopts + menuselect/menuselect --disable cdr_odbc menuselect.makeopts + menuselect/menuselect --disable cel_odbc menuselect.makeopts + menuselect/menuselect --disable func_odbc menuselect.makeopts + menuselect/menuselect --disable res_config_odbc menuselect.makeopts + menuselect/menuselect --disable res_odbc menuselect.makeopts + fi + if use osplookup; then + menuselect/menuselect --enable app_osplookup menuselect.makeopts + else + menuselect/menuselect --disable app_osplookup menuselect.makeopts + fi + if use oss; then + menuselect/menuselect --enable chan_oss menuselect.makeopts + else + menuselect/menuselect --disable chan_oss menuselect.makeopts + fi + if use postgres; then + menuselect/menuselect --enable cdr_pgsql menuselect.makeopts + menuselect/menuselect --enable cel_pgsql menuselect.makeopts + menuselect/menuselect --enable res_config_pgsql menuselect.makeopts + else + menuselect/menuselect --disable cdr_pgsql menuselect.makeopts + menuselect/menuselect --disable cel_pgsql menuselect.makeopts + menuselect/menuselect --disable res_config_pgsql menuselect.makeopts + fi + if use radius; then + menuselect/menuselect --enable cdr_radius menuselect.makeopts + menuselect/menuselect --enable cel_radius menuselect.makeopts + else + menuselect/menuselect --disable cdr_radius menuselect.makeopts + menuselect/menuselect --disable cel_radius menuselect.makeopts + fi + if use snmp; then + menuselect/menuselect --enable res_snmp menuselect.makeopts + else + menuselect/menuselect --disable res_snmp menuselect.makeopts + fi + if use span; then + menuselect/menuselect --enable res_fax_spandsp menuselect.makeopts + else + menuselect/menuselect --disable res_fax_spandsp menuselect.makeopts + fi + if use speex; then + menuselect/menuselect --enable codec_speex menuselect.makeopts + menuselect/menuselect --enable func_speex menuselect.makeopts + else + menuselect/menuselect --disable codec_speex menuselect.makeopts + menuselect/menuselect --disable func_speex menuselect.makeopts + fi + if use sqlite; then + menuselect/menuselect --enable cdr_sqlite menuselect.makeopts + else + menuselect/menuselect --disable cdr_sqlite menuselect.makeopts + fi + if use sqlite3; then + menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts + menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts + else + menuselect/menuselect --disable cdr_sqlite3_custom menuselect.makeopts + menuselect/menuselect --disable cel_sqlite3_custom menuselect.makeopts + fi + if use srtp; then + menuselect/menuselect --enable res_srtp menuselect.makeopts + else + menuselect/menuselect --disable res_srtp menuselect.makeopts + fi + if use syslog; then + menuselect/menuselect --enable cdr_syslog menuselect.makeopts + else + menuselect/menuselect --disable cdr_syslog menuselect.makeopts + fi + if use usb; then + menuselect/menuselect --enable chan_usbradio menuselect.makeopts + else + menuselect/menuselect --disable chan_usbradio menuselect.makeopts + fi + if use vorbis; then + menuselect/menuselect --enable format_ogg_vorbis menuselect.makeopts + else + menuselect/menuselect --disable format_ogg_vorbis menuselect.makeopts + fi +} + +src_compile() { + ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" +} + +src_install() { + mkdir -p "${D}"usr/$(get_libdir)/pkgconfig + emake DESTDIR="${D}" -j1 installdirs || die "emake installdirs failed" + emake DESTDIR="${D}" install || die "emake installdirs 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 + + # install the upgrade documentation + # + dodoc README UPGRADE* BUGS CREDITS + + # install extra documentation + # + if use doc + then + dodoc doc/*.txt + dodoc doc/*.pdf + dodoc doc/PEERING + dodoc doc/CODING-GUIDELINES + dodoc doc/tex/*.pdf + 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 + # + insinto /etc/logrotate.d + newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk +} + +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.8 changes that you may care about:" + 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 +} -- cgit v1.2.3-65-gdbad