summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2014-03-04 09:22:40 +0000
committerTony Vroon <chainsaw@gentoo.org>2014-03-04 09:22:40 +0000
commit8354334bee48f44fac429c8f1649631edd486504 (patch)
treef5b8ef2c41f2ec240d76a03684ca83f277c39845 /net-misc
parentVersion bumps, remove old versions per security bug #502970 (diff)
downloadhistorical-8354334bee48f44fac429c8f1649631edd486504.tar.gz
historical-8354334bee48f44fac429c8f1649631edd486504.tar.bz2
historical-8354334bee48f44fac429c8f1649631edd486504.zip
Fixes a crash on hangup cause set, which is a regression introduced by an earlier fix. Performance improvements for high console verbosity. Updated G729 VAD detection patch by Jaco Kroon, closes bug #496584.
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64 Manifest-Sign-Key: 0xB5058F9A
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/asterisk/ChangeLog9
-rw-r--r--net-misc/asterisk/Manifest11
-rw-r--r--net-misc/asterisk/asterisk-11.8.0.ebuild318
3 files changed, 333 insertions, 5 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index 624459fb3573..7b405ffa77aa 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/asterisk
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.470 2014/02/06 16:48:19 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.471 2014/03/04 09:22:37 chainsaw Exp $
+
+*asterisk-11.8.0 (04 Mar 2014)
+
+ 04 Mar 2014; Tony Vroon <chainsaw@gentoo.org> +asterisk-11.8.0.ebuild:
+ Fixes a crash on hangup cause set, which is a regression introduced by an
+ earlier fix. Performance improvements for high console verbosity. Updated
+ G729 VAD detection patch by Jaco Kroon, closes bug #496584.
*asterisk-11.7.0-r1 (06 Feb 2014)
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
index f06e08e2fe6c..ffec2239f8e4 100644
--- a/net-misc/asterisk/Manifest
+++ b/net-misc/asterisk/Manifest
@@ -16,21 +16,24 @@ AUX 1.8.0/find_call_ids.sh 1078 SHA256 185d0f55f54d044eb4b4dc64954e5191f8b993d13
AUX 1.8.0/find_call_sip_trace.sh 1115 SHA256 e1ebeb1dab05f552f89f380719d319cdf579cb6aeb86a9010e13e14c57f55985 SHA512 e679f3953b2e397d7c80bb2f0ca3db848f07ba97ca139c87224de4467f8172034eb4372e5ddd68116774a7b9d5fd48aa30d809e2af2c6e6e0747762c69090b6a WHIRLPOOL 8c30be245556b37dd45dd5ff5cf5c3141050f60c3e286631520f8114e167c6bd4f7930be21e57e93fd183ab65dfbd3b95b8e342808870979b67977f3ce189ebf
DIST asterisk-1.8.25.0.tar.gz 29473304 SHA256 b218de8a7db9af370890b12c63863343f5459ae7a4ce23d386ec159c10241670 SHA512 5922ba50b4587bd376d553a6c4d63ff0e27dac515eda233b7a986dcd7ffde1a4c9548a52fb8f38d19592ff510fa5ec5456a4bdff18ab2c2d60d5540a47756cba WHIRLPOOL 46366557afb516cde5f65f90c58b6708942cdc5f570c1b0cea13a0083306e40a033213db52d8f44b63ab9c70a75df9e15e304918f9760503d0e95667e98e53bd
DIST asterisk-11.7.0.tar.gz 34779538 SHA256 4fb283b96447f5d871632a14069f35643c8c34d08d6ec5fedf0ae3df30e0c397 SHA512 cd7ee59f9133fbd088b30c0495ac4d94cb0ca273015681340eeb4192ee1c510b59c8290255fc2df81f070369ff2ca56073fdee3f39e0b0186d95bb85f9ad1bd6 WHIRLPOOL b22d05bbcbcc9ef9045a684f7e9a7fc3937f25b5940e3f15b285b9ea3eb319d1d093a818b3eadaf3665ac6c4c578d97fc639c699062522ee6c20554e9b51fee1
+DIST asterisk-11.8.0.tar.gz 34804028 SHA256 daa299cd682ef1bc53b601cfdc244b903ccc9fbc52c2acfa15458e3dab6ffa47 SHA512 2f29375cd31436457b12d2a88b2357c958436bd3ae5978397fdfebe003d77db36d5e14b8cf46e801966871ece1099ebfd395c777ab0bfa1115b24612f7557236 WHIRLPOOL 44109d98c79f6ccb113a0899e3fa16c714ebb349ecd5bb26b13bbc4da646ff4e5c56748ba03ae25ef86dc2a4e951624c5bc2e7a285f22124c8385e5ca9efa2c2
DIST asterisk-12.0.0.tar.gz 56595630 SHA256 0efc4507d5384447011fd1148eaaae2d06f70b04c736b4c73fbb9941a9440a2b SHA512 9d421597c8e33ce47c527143e9804347a63f8bd63dd8e12087cee1eaec8b7f52f2ab19d781be2b97d6db2c63f4537a61582e1bbd2f2decc3fcab901b1580af45 WHIRLPOOL 2b9b6ee258448dffcc070b7466e67b4fa3be5289be3fb96d970d95cea29bb3feaf904f6fc59ea3fa1dfe2d1cbc29afc18531f914d14193aaef22dd392ae85d4f
DIST gentoo-asterisk-patchset-1.17.tar.bz2 31552 SHA256 fa1c202a42a9b2b3c8e1f90df05f8c8e818688347ad62d38c1bd2daa69d58af4 SHA512 84d5cd12894f452a4f17f95531321f2e15f745391965f6351de5af52e2ac3b580c50552cf04d656f91fdc7db69c0ebd9e2cf210143f57c8a9fb0d2745477ce00 WHIRLPOOL 54c98f94acd95519087c4a6c62269c5f1c41a250eea4f9def40c01e968be6bc2b4e85cc18a16367a8af02c217a5088718e0bc0f55e03aebc29aa5247a2d03274
DIST gentoo-asterisk-patchset-3.7.tar.bz2 7068 SHA256 7633a3ea22cab8aa83da8499b7eb9d2703ee6c4a4e4fd9f135bd39d313a33cda SHA512 f45753e1f065a78040344a2006ef1f6c14efc6b0187fe4ccf71ed8f30b1f20a1fec58cb14751a5806f06e7ae9269344e267121865b04af146388f9acdbfbd4e7 WHIRLPOOL a6ba6682411c6cf0344c0919441a4b2259769cbc101e39ada748540668aa4e42794008c9d3917452bf30242abe232f44b6ce7fc7f91ef1c8889c6664512d04f9
DIST gentoo-asterisk-patchset-3.8.tar.bz2 7855 SHA256 26240af183a5c673ec42291c1ebc526a656f9abb422eefb9d666e2d6f7512b64 SHA512 b265aceb9a0489fde5a18795a7594d330402ac5c9f2cafbb4b5486c649968cb67341cc5ef93e2de46e2e926df286dd423ffc4227ff2e86d39e9ed18e1de40619 WHIRLPOOL 39df58d3f14797d2853d72be9ac29d593f3ba2f5923f6ce3f1bfdaf6ff8df5ca658b8309bad0b03d4c4b4d51e684ddd7d7748a6fe813a7ed5ecb6202a0401766
+DIST gentoo-asterisk-patchset-3.9.tar.bz2 7857 SHA256 d41b2c47a56040e3eb55b9354f05df6857f6efc60b35c081b8cdf50a8f6eed50 SHA512 97c49fdfb874e89a07abc0b129c9db0113a77feecd6bb1fea9b00a1f82161a9799f7a280fd2f6fc11c5e1e6984fc8374354967307f8e1b2d3a9fa713d350453c WHIRLPOOL ce7367cca3e6516d0e1fdb758f3463670b1cc2dad5a82abb3c3b1b3dc25ef07bc917ac0184e58674a02e88ffc6ac0b770f217a6870011791758e6612febf09f6
EBUILD asterisk-1.8.25.0.ebuild 9190 SHA256 5294b37c14c3c0c18960a523e51d962ada04c373027121ec119796bc17a4c299 SHA512 98304f69d7146635e2cf7599bdbf1f57fae8d79b016f6747a74cc83315ddd7d858ae3339396bf1708f72565ebe7264796be547658b4e4cecd3d89cb0ea4d5c3f WHIRLPOOL 5261a953c89ccc6251b340ec54ea28d497254422d554bad97113a847bd4a3a6cf9d98ff1baecfc4d4ed420d789f2127aa9e08cec831269e36fbf8ea317d4b27e
EBUILD asterisk-11.7.0-r1.ebuild 9440 SHA256 131ac66898df515897096a92898c3048c20417279e53f683197b612a0254984c SHA512 1fade9b264f2b6351b9f20095a9ec88600b1ee23715b8755ec16cd4b4d993e04976f901a6b7c59c3939a05f8abad55d92730a699146ec513641ec7eec06f7e8d WHIRLPOOL 072876f06ad7c5dd183a324a11e93b976465ab8f8a465549a41b8f5a020094104913b5370ff884c4613aae9aa561b714c74708504dc5d6a3439e193d8f2c61ab
EBUILD asterisk-11.7.0.ebuild 9433 SHA256 32986326ff2a5c0c5042076194058a4cc1b7fe67bb2ca6e821ab4a177f70c264 SHA512 6eae25fce777e00b3efe49c33cc76ef8b7d7373b892b81f3280ebdc55071be87bff1465a19a99579ad1b28796d74eb6f46424a345e00ca6367d45b29e451e4a5 WHIRLPOOL d6fac40d2b4896bbfc60ad861d6d06047965f48bab04b0ce36252a02f8e8f841fd87a4de0e40e4a3440e4721ddbb7a27eed76d9cec80ba08acb834dfbc3069cb
+EBUILD asterisk-11.8.0.ebuild 9437 SHA256 7f80ecee85112898a477890ac563545193ceeb60a201d83210547e76b7d3bdee SHA512 52d72c58fe418a4d0b8ebd0e846a2d94cd78ef2490bd09c8c87457709183313b3c34962376543cfdf7b5846dbf0c21fb34b62e155fcef29ea5b4c949fed40e56 WHIRLPOOL a29c332866963550426dc73b072b5e57fc973326cc2f63876db211be753e6e11ef91526a4c6df2ec6782fd7c202a7dd202ca60f9de04993ca8744cf2f96088a6
EBUILD asterisk-12.0.0.ebuild 9455 SHA256 872f569b7c3185d2bf2782d1f6534843944dd3b9009ec6f54732da06becb9ec1 SHA512 91303575018105d5d45131deafdf62a1bbefaf19fe2179f0bfaa47bbe8879efc964452e44d932269a32a56d0cda335a7d2bd51f272431b435a2508074f05d194 WHIRLPOOL 44840b411ebd53d2929a3c00dbc9253c77c7871e2657c33a05eaab67af486504f19b04e9852297ca6b72bb98db2a51ea3f787d26f7275ef0cc8dd6a9e221a110
-MISC ChangeLog 10408 SHA256 2dcb1ec103d848cf707e48fe5d467d6d679633f8b6e5e5f47105325d1ac3c1cf SHA512 b4ce8724180d7ab2eeaced31d1f7ecdf96e77ba2b75264b6d69a825d7635a4b68c9e2782aa367122cb41b117c428e2ca8958a85fc449e8d31c5aed139460e0f6 WHIRLPOOL 193ac93adacc37e8ffce5afd4eab64307848aaf6de89ab884a3bd27db190080e3c8361f01aa5d070779a2cbf3fb5d50d99695dc6e3e096a2cf461d3b450a17af
+MISC ChangeLog 10728 SHA256 2487ac5d344b37926cb2d3e1656c7a40604801003fa80b9c6b3f5cc532d93d1d SHA512 fecfe3dd6bfe68104716fd8d364d0e91912dd1dad24f9d244ea88fc02e46e6bf80850e7d5f68416135d8198d9511b79ec57175cd6e01d235e977ff1dea5952a1 WHIRLPOOL 4a174c1f715719699d7d5123675d9580426328ae439186a4c177d72a6de6eb7954b1753c4ba7b675d844146a5b0dd5a025a08d5416897cd8cd17d11685f4d42f
MISC ChangeLog-2012 113409 SHA256 6beb419f0c2e63641c73f2c14bd0c3a6a319c65bca8be526aa441fac2104fc9c SHA512 08c037acd578b9c3c387a80e45e80a68c4da84e63fced30215f22ec14eb6e223348d8e7d68f4decdf8a2d8cd0933b3f7fa3adddf7cd80bb407498b3e2868d917 WHIRLPOOL be0f2192531f7477545ccc0f10d9a50f36228e8d8d0e2773ccce3799c2d1b5e1b7be70d96502f759c7c878f88efd83122fc9230374c40c8963fe0bc7ff014b87
MISC metadata.xml 1183 SHA256 f92828f92cf3e0ce3581e031e3ecdc26336481db45fe6ea7b91e79fc3e58032c SHA512 9b00df0793f68988b4b7b2da778b05cd183e663a96c92b5f96ac1e09ba34a96a5155deb0639638e499701e5cf76de6cc6736f757a48608c2accf14e3ff633c14 WHIRLPOOL d5e4bd47714fa34285733f9c3ed2dff0fa65f33daeda7276428e7eaf0cd44ef59351f67f590ecab38305e77b9c3683c368ad764f323f3d9891b3414600aa4211
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iEYEAREIAAYFAlLzvMAACgkQp5vW4rUFj5pvyACgkRqIBiXbFLh325uk46xtTlMe
-tzcAni+AXYmb5APlwB3cxD8x8SseBPdV
-=06tU
+iEYEAREIAAYFAlMVm0gACgkQp5vW4rUFj5pcEwCgv2C9qOQi/0jjQB7pxz+mbvY8
+AIQAoKhkTbXrzBqUHN5Sb1wOusyn4Qaj
+=HNCF
-----END PGP SIGNATURE-----
diff --git a/net-misc/asterisk/asterisk-11.8.0.ebuild b/net-misc/asterisk/asterisk-11.8.0.ebuild
new file mode 100644
index 000000000000..923c72aa61a2
--- /dev/null
+++ b/net-misc/asterisk/asterisk-11.8.0.ebuild
@@ -0,0 +1,318 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-11.8.0.ebuild,v 1.1 2014/03/04 09:22:37 chainsaw Exp $
+
+EAPI=5
+inherit autotools base eutils linux-info multilib user
+
+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
+ mirror://gentoo/gentoo-asterisk-patchset-3.9.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_VOICEMAIL_STORAGE="
+ +voicemail_storage_file
+ voicemail_storage_odbc
+ voicemail_storage_imap
+"
+IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc jabber ldap libedit lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis"
+IUSE_EXPAND="VOICEMAIL_STORAGE"
+REQUIRED_USE="gtalk? ( jabber )
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
+ voicemail_storage_odbc? ( odbc )
+"
+
+EPATCH_SUFFIX="patch"
+PATCHES=( "${WORKDIR}/asterisk-patchset" )
+
+RDEPEND="dev-db/sqlite:3
+ dev-libs/popt
+ dev-libs/libxml2
+ dev-libs/openssl
+ sys-libs/ncurses
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ bluetooth? ( net-wireless/bluez )
+ calendar? ( net-libs/neon
+ dev-libs/libical
+ dev-libs/iksemel )
+ caps? ( sys-libs/libcap )
+ cluster? ( sys-cluster/corosync )
+ curl? ( net-misc/curl )
+ dahdi? ( >=net-libs/libpri-1.4.12_beta2
+ net-misc/dahdi-tools )
+ freetds? ( dev-db/freetds )
+ gtalk? ( dev-libs/iksemel )
+ http? ( dev-libs/gmime:2.4 )
+ iconv? ( virtual/libiconv )
+ ilbc? ( dev-libs/ilbc-rfc3951 )
+ jabber? ( dev-libs/iksemel )
+ ldap? ( net-nds/openldap )
+ libedit? ( dev-libs/libedit )
+ lua? ( dev-lang/lua )
+ mysql? ( virtual/mysql )
+ newt? ( dev-libs/newt )
+ odbc? ( dev-db/unixODBC )
+ osplookup? ( net-libs/osptoolkit )
+ portaudio? ( media-libs/portaudio )
+ postgres? ( dev-db/postgresql-base )
+ radius? ( net-dialup/radiusclient-ng )
+ selinux? ( sec-policy/selinux-asterisk )
+ snmp? ( net-analyzer/net-snmp )
+ span? ( media-libs/spandsp )
+ speex? ( media-libs/speex )
+ srtp? ( net-libs/libsrtp )
+ vorbis? ( media-libs/libvorbis )"
+
+DEPEND="${RDEPEND}
+ !net-libs/openh323
+ !net-libs/pjsip
+ voicemail_storage_imap? ( virtual/imap-c-client )
+"
+
+RDEPEND="${RDEPEND}
+ syslog? ( virtual/logger )"
+
+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
+ enewgroup dialout 20
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
+}
+
+src_prepare() {
+ base_src_prepare
+ AT_M4DIR=autoconf eautoreconf
+}
+
+src_configure() {
+ local vmst
+
+ econf \
+ --libdir="/usr/$(get_libdir)" \
+ --localstatedir="/var" \
+ --with-crypto \
+ --with-gsm=internal \
+ --with-popt \
+ --with-ssl \
+ --with-z \
+ --without-pwlib \
+ $(use_with caps cap) \
+ $(use_with http gmime) \
+ $(use_with newt) \
+ $(use_with portaudio)
+
+ # 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
+
+ # That NATIVE_ARCH chatter really is quite bothersome
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
+
+ # Compile menuselect binary for optional components
+ emake menuselect.makeopts
+
+ # Broken functionality is forcibly disabled (bug #360143)
+ menuselect/menuselect --disable chan_misdn menuselect.makeopts
+ menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
+
+ # Utility set is forcibly enabled (bug #358001)
+ menuselect/menuselect --enable smsq menuselect.makeopts
+ menuselect/menuselect --enable streamplayer menuselect.makeopts
+ menuselect/menuselect --enable aelparse menuselect.makeopts
+ menuselect/menuselect --enable astman menuselect.makeopts
+
+ # this is connected, otherwise it would not find
+ # ast_pktccops_gate_alloc symbol
+ menuselect/menuselect --enable chan_mgcp menuselect.makeopts
+ menuselect/menuselect --enable res_pktccops menuselect.makeopts
+
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
+ menuselect/menuselect --enable pbx_dundi menuselect.makeopts
+ menuselect/menuselect --enable func_aes menuselect.makeopts
+ menuselect/menuselect --enable chan_iax2 menuselect.makeopts
+
+ # SQlite3 is now the main database backend, enable related features
+ menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
+ menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
+
+ # The others are based on USE-flag settings
+ use_select() {
+ local state=$(use "$1" && echo enable || echo disable)
+ shift # remove use from parameters
+
+ while [[ -n $1 ]]; do
+ menuselect/menuselect --${state} "$1" menuselect.makeopts
+ shift
+ done
+ }
+
+ use_select alsa chan_alsa
+ use_select bluetooth chan_mobile
+ use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
+ use_select cluster res_corosync
+ use_select curl func_curl res_config_curl res_curl
+ use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi
+ use_select freetds {cdr,cel}_tds
+ use_select gtalk chan_motif
+ use_select http res_http_post
+ use_select iconv func_iconv
+ use_select jabber res_xmpp
+ use_select ilbc codec_ilbc format_ilbc
+ use_select ldap res_config_ldap
+ use_select lua pbx_lua
+ use_select mysql app_mysql cdr_mysql res_config_mysql
+ use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
+ use_select osplookup app_osplookup
+ use_select oss chan_oss
+ use_select postgres {cdr,cel}_pgsql res_config_pgsql
+ use_select radius {cdr,cel}_radius
+ use_select snmp res_snmp
+ use_select span res_fax_spandsp
+ use_select speex {codec,func}_speex
+ use_select srtp res_srtp
+ use_select syslog cdr_syslog
+ use_select vorbis format_ogg_vorbis
+
+ # Voicemail storage ...
+ for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
+ if use ${vmst}; then
+ menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
+ fi
+ done
+
+ if use debug; then
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
+ menuselect/menuselect --enable $o menuselect.makeopts
+ done
+ fi
+}
+
+src_compile() {
+ ASTLDFLAGS="${LDFLAGS}" emake
+}
+
+src_install() {
+ mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
+ emake DESTDIR="${D}" installdirs
+ emake DESTDIR="${D}" install
+
+ if use radius; then
+ insinto /etc/radiusclient-ng/
+ doins contrib/dictionary.digium
+ fi
+ if use samples; then
+ emake DESTDIR="${D}" samples
+ 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/* || die
+ rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
+ rm -f "${D}"var/lib/asterisk/agi-bin/* || die
+ rm -f "${D}"etc/asterisk/* || die
+ fi
+ rm -rf "${D}"var/spool/asterisk/voicemail/default || die
+
+ # keep directories
+ diropts -m 0770 -o asterisk -g asterisk
+ keepdir /etc/asterisk
+ keepdir /var/lib/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.8.0/asterisk.initd7 asterisk
+ newconfd "${FILESDIR}"/1.8.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
+ fi
+
+ # install SIP scripts; bug #300832
+ #
+ dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
+ dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
+ dodoc "${FILESDIR}/1.8.0/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 "Please read the Asterisk 11 upgrade document:"
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11"
+}
+
+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
+}