summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2011-07-12 12:03:49 +0000
committerTony Vroon <chainsaw@gentoo.org>2011-07-12 12:03:49 +0000
commit27125cb832cbfb3720c7605c950ec1360a94c62e (patch)
treeb8cbbe4d0046840a88d71434a37c0451204b0176 /net-misc/asterisk
parentVersion bump (diff)
downloadhistorical-27125cb832cbfb3720c7605c950ec1360a94c62e.tar.gz
historical-27125cb832cbfb3720c7605c950ec1360a94c62e.tar.bz2
historical-27125cb832cbfb3720c7605c950ec1360a94c62e.zip
Version bump; PUBLISH fixes now upstream. The channel variable backward compatibility patch no longer applies and has been dropped. Fixes a deadlock on attended transfer, thread blocking issue in SIP TCP/TLS, chanspy channel leak, MeetMe PIN prompts, stuck AGI scripts, lost MWI notifications & a conference crosstalk issue during the leader wait.
Package-Manager: portage-2.1.10.4/cvs/Linux x86_64
Diffstat (limited to 'net-misc/asterisk')
-rw-r--r--net-misc/asterisk/ChangeLog11
-rw-r--r--net-misc/asterisk/Manifest11
-rw-r--r--net-misc/asterisk/asterisk-1.8.5.0.ebuild436
3 files changed, 453 insertions, 5 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index 38e653899781..7a9991b577ad 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.331 2011/07/06 09:13:18 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.332 2011/07/12 12:03:49 chainsaw Exp $
+
+*asterisk-1.8.5.0 (12 Jul 2011)
+
+ 12 Jul 2011; Tony Vroon <chainsaw@gentoo.org> +asterisk-1.8.5.0.ebuild:
+ Version bump; PUBLISH fixes now upstream. The channel variable backward
+ compatibility patch no longer applies and has been dropped. Fixes a deadlock
+ on attended transfer, thread blocking issue in SIP TCP/TLS, chanspy channel
+ leak, MeetMe PIN prompts, stuck AGI scripts, lost MWI notifications & a
+ conference crosstalk issue during the leader wait.
*asterisk-1.6.2.19-r2 (06 Jul 2011)
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
index 428c49a29bf8..662d9320030f 100644
--- a/net-misc/asterisk/Manifest
+++ b/net-misc/asterisk/Manifest
@@ -12,20 +12,23 @@ AUX 1.6.2/sip_calc_auth 493 RMD160 1813bd5aecbb60b38c20752050e6be44cca10f47 SHA1
DIST asterisk-1.6.2.18.2.tar.gz 23754387 RMD160 cb9e25969ce9228def60768b53a08abccc590293 SHA1 daae5d79e947fac12c232906873ccef1c40d81be SHA256 59b9f7586df9361dd3f26f2277c091e6a4db38aa824a2cdce0770cbf89ae7b0e
DIST asterisk-1.6.2.19.tar.gz 23818324 RMD160 89710872034d9ebaa54d66ed0d7f5f6724caa780 SHA1 a81b426fa5146696abfdacd171f31f48aa976eb7 SHA256 6de032f6f6c2969679396b97d06e816d62f8b14332eb6de60e9f85be0f023b20
DIST asterisk-1.8.4.4.tar.gz 27326189 RMD160 c95cab1b24547f1abd229dcf323cc7ed0b0b36a0 SHA1 07d3ae5744e2dd10c5d9564b503690f3f0b84d96 SHA256 08d44e7cfd5c306d944cd48eb8a497a345ebbb4e781d7a6cc917376784789c1f
+DIST asterisk-1.8.5.0.tar.gz 27417584 RMD160 c841993f914bd150696b9163a1cc1d1828f45e4a SHA1 9e29581deea773c2537f5c01a43823211688412a SHA256 5c4601c0dab2c94a3dc37cab5d55af8eab67765a31eb8aed7321dd98e7c62a46
DIST gentoo-asterisk-patchset-0.1.tar.bz2 5394 RMD160 bfd546101c77f6e6989c406bfb202e592f9d16fd SHA1 e49b7784f987e027d833fbe8e0773acb1ef78521 SHA256 07c1bc6a29bda4fa98e7d1eb436d2e6eafc13263b774a0ff41698e523fa59a97
DIST gentoo-asterisk-patchset-0.5.tar.bz2 6790 RMD160 ce738a36248b974d707ef748314e160acccd6ddb SHA1 4b6ae9e6e1529237fe4fe5d313440be741921d8e SHA256 258cbc3b81019b99bfe4b12888ed181ab142ca6d21ad61eae3d032c3617a7a79
DIST gentoo-asterisk-patchset-0.6.tar.bz2 5115 RMD160 becb32155e126933d3e04aa1ffe6e822f7aed152 SHA1 0d7aa220afa66d88dc54da95de41e221afce4d9a SHA256 8367b43024725b257c9abfe518f09bc9c531727dff73782a5f839c369c54fb92
DIST gentoo-asterisk-patchset-0.7.tar.bz2 6278 RMD160 048a7810c2b8e4ba1613adfd438fd8727e3db210 SHA1 6e0c17b703ea367fb6cf94456c4766ebfd4159fb SHA256 4be86e7500e9e1a2ceefa93df8b6c1bf9ce0fecacfee279241da1c681f365001
+DIST gentoo-asterisk-patchset-0.8.tar.bz2 5172 RMD160 cee8f220ee03dcadcd14a5121c424977f0661550 SHA1 2ad9585d770c83f79e7aae16ac8c5c0a3abeb5e1 SHA256 277d001301c4c3ad38e3ba46037bdf8210cd44e72502c5df205ebb050c1a10c2
EBUILD asterisk-1.6.2.18.2.ebuild 5823 RMD160 b7e7cf1d93d72661ca507cf0dae717ef348302d5 SHA1 85c8c98fc1da48d2d1437b5b83e87b31474fbfca SHA256 0b7af62d8a7056926e39733a78e391566f21c28c63a59e26f0459d386dde106b
EBUILD asterisk-1.6.2.19-r1.ebuild 5828 RMD160 d3b67c872da7f9ae149f8cd9d8966c165a079e3d SHA1 4c1b7c925c72c40788ebf666f730898910580ab4 SHA256 483e0247f51aff216ad12f1bb8c556b053012cc241ec30f29c7c8ab5f9f7bba4
EBUILD asterisk-1.6.2.19-r2.ebuild 5828 RMD160 70d8188d88d2269e19567797211a626d3bfea8cc SHA1 9dd8be33d74955e5beef90a86cd268d397e46ca2 SHA256 c046df182c099451102d61bd095af7b3f5b01c093afd36c7ab1932bd8c05f01f
EBUILD asterisk-1.8.4.4-r1.ebuild 14632 RMD160 0492acdd869b59f3c6f1a0efb7e9168d24b2231e SHA1 8c68dec416669bc0d5f9675288743294d30538cd SHA256 99c30aec8a536d63e192d5949828e77050ad3a8a7c2777e77a3106c887e476a3
-MISC ChangeLog 83715 RMD160 2e1215ce2592aa909fbaec820c600fa485ba3891 SHA1 9acfd5f552b1a7d096f0d1be02aba1d721a70ac8 SHA256 7061328c8756f44ae4215d8771edc0bc0ad4c1a540749cdc687051c30ee80605
+EBUILD asterisk-1.8.5.0.ebuild 14629 RMD160 0a4b9816cc6f013777ba7ed1e242a951ef5740fa SHA1 3c978682a980253e84b5c31dc796b0f716c6e4ac SHA256 84dac1d6df7fa5d108fd4aac419b3f7e47df1523429f02e7c3f4eaf36ae0f0a4
+MISC ChangeLog 84181 RMD160 93c2123803138ad9fafc4b660a3177942ead6f35 SHA1 92c13c1371401810e5fb9d5c34e7ddbdc68c8310 SHA256 7662a5ff66875f02ebcea344351d2b5d46effc5b8e11c1bc6725dd0a24554b63
MISC metadata.xml 1104 RMD160 5b90405c685bc1c0ee173b3024afab5bc849bf40 SHA1 bf76dd265acf32efba9e4e8189ae154a4b9ebd40 SHA256 17e96f326cd60399fb217025567ae4c80f1b9b12418f1bf5b41c8fa4c49598ec
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk4UJyUACgkQp5vW4rUFj5oWjACeOulxVHKTXrISM1S0kvPJ/Fyc
-4tAAn0zjGUkejRrmoG2L6JIsqHjbLtaH
-=hT78
+iEYEARECAAYFAk4cOBsACgkQp5vW4rUFj5rowgCfdceJPIyG6bhIlaK2/2K4xtS9
+W/AAnRjdAvxDc3RJB4k3ECINS4AkVykH
+=eojH
-----END PGP SIGNATURE-----
diff --git a/net-misc/asterisk/asterisk-1.8.5.0.ebuild b/net-misc/asterisk/asterisk-1.8.5.0.ebuild
new file mode 100644
index 000000000000..8c610cf27d3b
--- /dev/null
+++ b/net-misc/asterisk/asterisk-1.8.5.0.ebuild
@@ -0,0 +1,436 @@
+# 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.5.0.ebuild,v 1.1 2011/07/12 12:03: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.8.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 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 )
+ 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 )
+ 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"
+
+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() {
+ 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
+
+ # Broken functionality is forcibly disabled (bug #360143)
+ menuselect/menuselect --disable chan_misdn 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
+
+ # The others are based on USE-flag settings
+ 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 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}" 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.initd3 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
+ 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
+}