summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2009-08-04 17:29:04 +0000
committerTony Vroon <chainsaw@gentoo.org>2009-08-04 17:29:04 +0000
commitf92dc5de50434e0692c9c7ae3e3dc54e0123676e (patch)
treea2f7e2ad06a01b428fae7f461713280e0c6f3f9f /net-misc
parentAutomated update of use.local.desc (diff)
downloadhistorical-f92dc5de50434e0692c9c7ae3e3dc54e0123676e.tar.gz
historical-f92dc5de50434e0692c9c7ae3e3dc54e0123676e.tar.bz2
historical-f92dc5de50434e0692c9c7ae3e3dc54e0123676e.zip
Revision bump, now applies patches correctly and adds missed dialout group to enewuser statement. Closes bug #279988 by Robin Johnson <robbat2@gentoo.org>. Do not optimize if USE="debug" as requested by Vieri, closes bug #192966.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/asterisk/ChangeLog10
-rw-r--r--net-misc/asterisk/Manifest9
-rw-r--r--net-misc/asterisk/asterisk-1.2.33-r1.ebuild415
3 files changed, 429 insertions, 5 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index f1fff02fd7f7..23cedbef151b 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-misc/asterisk
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.204 2009/07/21 13:36:22 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.205 2009/08/04 17:29:04 chainsaw Exp $
+
+*asterisk-1.2.33-r1 (04 Aug 2009)
+
+ 04 Aug 2009; <chainsaw@gentoo.org> +asterisk-1.2.33-r1.ebuild:
+ Revision bump, now applies patches correctly and adds missed dialout group
+ to enewuser statement. Closes bug #279988 by Robin Johnson
+ <robbat2@gentoo.org>. Do not optimize if USE="debug" as requested by
+ Vieri, closes bug #192966.
21 Jul 2009; <chainsaw@gentoo.org> asterisk-1.2.32.ebuild:
Add the new asterisk user to the dialout group as well as the asterisk
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
index 184010f125df..d365f7bc5f48 100644
--- a/net-misc/asterisk/Manifest
+++ b/net-misc/asterisk/Manifest
@@ -35,16 +35,17 @@ DIST asterisk-1.2.33.tar.gz 10638312 RMD160 529fc724fc9e3f4ba6951a39b9e1164ba03a
DIST asterisk-1.6.1.0.tar.gz 13627016 RMD160 2fd9fc82a3f9cf23bbe2ed974b008a7a5bfdd570 SHA1 cd976cf05ba4c4b53b50e7af69fd6d684f070f86 SHA256 37b97603d19a9b403f59e3a8a5246cea10871b74d5f3ba8614345610e4d2cab8
DIST asterisk-1.6.1.1.tar.gz 13630484 RMD160 2eddf1f8b234480a84ce840323c66b204fea09e1 SHA1 db9462d1a829625da0149c4952abfa7eee99d0c2 SHA256 551775588a8d25544b7bcc4017185cb15fd33988f832c30c87e014df78401b9a
EBUILD asterisk-1.2.32.ebuild 10943 RMD160 72ba0b3e164603f1def0609e17ecdbaca0ab785c SHA1 6d17e406b88790da4c4e6f2311f366d6e719ea05 SHA256 39de089b06b8027d11be5e512daed22ffb680f4833c01b33badb10d66c07ae2a
+EBUILD asterisk-1.2.33-r1.ebuild 11038 RMD160 fbd7167840fb0e095f0366b4454907fffba21ea8 SHA1 60e4ed0e15dc363f3e75fd06cf440e4bfb19e6c3 SHA256 ca013f0940a3a66725ae8759bcfecc494debbf01a9483643b5fb2b9bdff79f16
EBUILD asterisk-1.2.33.ebuild 10836 RMD160 7d75d0e7dde5dd9d000460f34bf6ae15e7e40526 SHA1 81fceed8c13539161fda9a6d68901bbf90dbc093 SHA256 e2c6b157f257d8a4da7ec14a55d68ba68a3f603aa38989c269d7a6d18c9be0d3
EBUILD asterisk-1.6.1.0.ebuild 12058 RMD160 3b4a9ac79f571983519d760f55beeed93ebe6cba SHA1 f1aa0e09f5c290059e194f3647d4bdf484cb8e40 SHA256 16a33feb73b0fbdb79c07273031c97f6d148bde797bbbd977f4cede311c10985
EBUILD asterisk-1.6.1.1-r1.ebuild 12325 RMD160 952f5dd9045b164072ffe62177340ea6f3492f3a SHA1 c89301eeea6e391ba10553b244ecedd0161daaa2 SHA256 add01201617434161c584717d3ab270220be528bc297f59778cab29d65629217
EBUILD asterisk-1.6.1.1.ebuild 12058 RMD160 06dcb9e125aa728a7218d0ed8741db2e1fbb000d SHA1 a94c19c5d345dfc5dad7b22bea33636d87f9ac05 SHA256 4ab193b98b6e66e8c48eb0ddb952b5c60201ffe173d95104139aeef8b6d1528b
-MISC ChangeLog 43217 RMD160 3208f4197d79447d7409eb3fec0918207709737f SHA1 cfe86b0a1fce5cbe2f8fc8fca8bf44b9a3789e5e SHA256 3d27646d3547d0e13200aca3451e2ea2049e398564e3cf4311927cef79160418
+MISC ChangeLog 43556 RMD160 d87ddc9d015e7391906c2f3bb80f1b8faf55aa2f SHA1 03f1848b6c474243fe848cc7644820e4a81e9bf1 SHA256 4c8df09299229cc9ab639e8580c697b0bf415e2bb89c12c7a2dd87574397b47e
MISC metadata.xml 1185 RMD160 eb12d6782abb8afd1c4eced97537a3528f960839 SHA1 80f58a977e41229cf37ee2cb5820e1cc29e517bc SHA256 4f1f9a977fac87bc22bc782cb30e4e7952e9772685d3424c69a514de3be5d0d3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
-iEYEARECAAYFAkplxE4ACgkQp5vW4rUFj5ofTQCeOL0EQQcmNmFIEuyYTa/9AXAK
-Y7sAnA7Cx/o09mDNGj/iXAkXPMoY9DTb
-=HlkB
+iEYEARECAAYFAkp4b8sACgkQp5vW4rUFj5o3VwCeJ0fxTkcbqj5MFBG6t1E99J7a
+x/MAn0FATzsu+h2cFKFnhI83AiI6bzCa
+=OPBe
-----END PGP SIGNATURE-----
diff --git a/net-misc/asterisk/asterisk-1.2.33-r1.ebuild b/net-misc/asterisk/asterisk-1.2.33-r1.ebuild
new file mode 100644
index 000000000000..307b73e2152d
--- /dev/null
+++ b/net-misc/asterisk/asterisk-1.2.33-r1.ebuild
@@ -0,0 +1,415 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.2.33-r1.ebuild,v 1.1 2009/08/04 17:29:04 chainsaw Exp $
+
+EAPI=2
+inherit eutils multilib toolchain-funcs
+
+IUSE="alsa curl debug doc gtk h323 hardened lowmem mmx nosamples \
+ odbc osp postgres pri sqlite ssl speex zaptel elibc_uclibc"
+
+AST_PATCHES="1.2.27-patches-1.0"
+
+MY_P="${P/_p/.}"
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="http://downloads.digium.com/pub/asterisk/releases/${MY_P}.tar.gz
+ mirror://gentoo/${PN}-${AST_PATCHES}.tar.bz2"
+
+S="${WORKDIR}/${MY_P}"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+
+RDEPEND="dev-libs/newt
+ media-sound/sox
+ ssl? ( dev-libs/openssl )
+ gtk? ( =x11-libs/gtk+-1.2* )
+ pri? ( >=net-libs/libpri-1.2.5[-bri] )
+ h323? ( >=dev-libs/pwlib-1.8.3
+ >=net-libs/openh323-1.15.0 )
+ alsa? ( media-libs/alsa-lib )
+ curl? ( net-misc/curl )
+ odbc? ( dev-db/unixODBC )
+ speex? ( media-libs/speex )
+ sqlite? ( <dev-db/sqlite-3.0.0 )
+ zaptel? ( >=net-misc/zaptel-1.2.16 )
+ postgres? ( virtual/postgresql-base )
+ osp? ( >=net-libs/osptoolkit-3.3.4 )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ doc? ( app-doc/doxygen )
+ virtual/logger"
+
+#asterisk uses special mpg123 functions and does not work with mpeg321, bug #42703
+PDEPEND="|| ( media-sound/mpg123 net-misc/asterisk-addons )"
+
+QA_TEXTRELS_x86="usr/lib/asterisk/modules/codec_gsm.so"
+QA_EXECSTACK_x86="usr/lib/asterisk/modules/codec_gsm.so"
+
+#
+# List of modules to ignore during scan (because they have been removed in 1.2.x)
+#
+SCAN_IGNORE_MODS="
+ app_qcall
+ chan_modem
+ chan_modem_i4l
+ chan_modem_bestdata
+ chan_modme_aopen"
+
+#
+# shortcuts
+#
+is_ast10update() {
+ return $(has_version "=net-misc/asterisk-1.0*")
+}
+
+is_astupdate() {
+ if ! is_ast10update; then
+ return $(has_version "<net-misc/asterisk-${PV}")
+ fi
+ return 0
+}
+
+#
+# Scan for asterisk-1.0.x modules that will have to be updated
+#
+scan_modules() {
+ local modules_list=""
+ local n
+
+ for x in $(ls -1 "${ROOT}"usr/$(get_libdir)/asterisk/modules/*.so); do
+ echo -en "Scanning.... $(basename ${x}) \r"
+
+ # skip blacklisted modules
+ hasq $(basename ${x//.so}) ${SCAN_IGNORE_MODS} && continue
+
+ if $(readelf -s "${x}" | grep -q "\(ast_load\|ast_destroy\)$"); then
+ modules_list="${modules_list} $(basename ${x//.so})"
+ fi
+ done
+
+ if [[ -n "${modules_list}" ]]; then
+ echo " ========================================================"
+ ewarn "Please update or unmerge the following modules:"
+ echo
+
+ n=0
+ for x in ${modules_list}; do
+ ewarn " - ${x}"
+ (( n++ ))
+ done
+
+ echo
+ ewarn "Warning: $n outdated module(s) found!"
+ ewarn "Warning: asterisk may not work if you don't update them!"
+ echo " ========================================================"
+ echo
+ einfo "You can use the \"asterisk-updater\" script to update the modules"
+ epause
+ echo
+ return 1
+ else
+ einfo "No asterisk-1.0.x modules found!"
+ return 0
+ fi
+}
+
+pkg_setup() {
+ local checkfailed=0 waitaftermsg=0
+
+ if is_ast10update; then
+ ewarn " Asterisk UPGRADE Warning"
+ ewarn ""
+ ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.gz after the installation!"
+ ewarn ""
+ ewarn " Asterisk UPGRADE Warning"
+ echo
+ waitaftermsg=1
+ fi
+
+ #
+ # Regular checks
+ #
+ einfo "Running some pre-flight checks..."
+ echo
+
+}
+
+src_prepare() {
+ #
+ # gentoo patchset
+ #
+ for x in $(grep -v "^#\| \+" "${WORKDIR}"/patches/patches.list); do
+ epatch "${WORKDIR}"/patches/${x}
+ done
+
+ if use mmx; then
+ if ! use hardened; then
+ einfo "Enabling mmx optimization"
+ sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \
+ Makefile
+ else
+ ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!"
+ fi
+ fi
+
+ if ! use debug; then
+ einfo "Disabling debug support"
+ sed -i -e "s:^\(DEBUG=\):#\1:" \
+ Makefile
+ fi
+
+ if ! use ssl; then
+ einfo "Disabling crypto support"
+ sed -i -e 's:^#\(NOCRYPTO=yes\):\1:' \
+ -e '/^LIBS+=-lssl/d' Makefile || die
+ fi
+
+ epatch "${FILESDIR}/1.2.0/${PN}-1.2.21.1-h323-dumb-makefile.diff"
+
+ #
+ # uclibc patch
+ #
+ if use elibc_uclibc; then
+ einfo "Patching asterisk for uclibc..."
+ epatch "${FILESDIR}"/1.0.0/${PN}-1.0.5-uclibc-dns.diff
+ epatch "${FILESDIR}"/1.2.0/${PN}-1.2.1-uclibc-getloadavg.diff
+ fi
+
+ #
+ # Disable AEL, security bug #171884
+ # Re-enable at your own risk (no USE since it can be critical)
+ #
+ sed -i -e 's/pbx_ael.so//' pbx/Makefile || die
+
+ # codecs/Makefile does not add -lspeexdsp needed for speex 1.2, bug #206463
+ if use speex && has_version ">=media-libs/speex-1.2"; then
+ sed -i -e "s/-lspeex/-lspeex -lspeexdsp/" codecs/Makefile \
+ || die "patching codecs/Makefile failed"
+ fi
+}
+
+src_compile() {
+ local myopts
+
+ use lowmem && \
+ myopts="-DLOW_MEMORY"
+
+ if use h323; then
+ einfo "Building H.323 wrapper lib..."
+ make -C channels/h323 \
+ NOTRACE=1 \
+ PWLIBDIR=/usr/share/pwlib \
+ OPENH323DIR=/usr/share/openh323 \
+ libchanh323.a Makefile.ast || die "Make h323 failed"
+ fi
+
+ einfo "Building Asterisk..."
+ if use debug; then
+ unset CFLAGS
+ make \
+ CC=$(tc-getCC) \
+ NOTRACE=1 \
+ PWLIBDIR=/usr/share/pwlib \
+ OPENH323DIR=/usr/share/openh323 \
+ OPTIONS="${myopts}" \
+ dont-optimize=1 || die "Make failed"
+ else
+ make \
+ CC=$(tc-getCC) \
+ NOTRACE=1 \
+ OPTIMIZE="${CFLAGS}" \
+ PWLIBDIR=/usr/share/pwlib \
+ OPENH323DIR=/usr/share/openh323 \
+ OPTIONS="${myopts}" || die "Make failed"
+ fi
+
+ # create api docs
+ use doc && \
+ make progdocs
+}
+
+src_install() {
+
+ # install asterisk
+ make DESTDIR="${D}" ASTLIBDIR="\$(INSTALL_PREFIX)/usr/$(get_libdir)/asterisk" install || die "Make install failed"
+ make DESTDIR="${D}" ASTLIBDIR="\$(INSTALL_PREFIX)/usr/$(get_libdir)/asterisk" samples || die "Failed to create sample files"
+
+ # remove installed sample files if nosamples flag is set
+ if use nosamples; then
+ einfo "Skipping installation of sample files..."
+ rm -rf "${D}"var/spool/asterisk/voicemail/default
+ rm -f "${D}"var/lib/asterisk/mohmp3/*
+ rm -f "${D}"var/lib/asterisk/sounds/demo-*
+ rm -f "${D}"var/lib/asterisk/agi-bin/*
+ else
+ einfo "Sample files have been installed"
+ keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
+ fi
+
+ # move sample configuration files to doc directory
+ if is_ast10update; then
+ elog "Updating from old (pre-1.2) asterisk version, new configuration files have been installed"
+ elog "into "${ROOT}"etc/asterisk, use etc-update or dispatch-conf to update them"
+ elif has_version "net-misc/asterisk"; then
+ elog "Configuration samples have been moved to: $ROOT/usr/share/doc/${PF}/conf"
+ insinto /usr/share/doc/${PF}/conf
+ doins "${D}"etc/asterisk/*.conf*
+ rm -f "${D}"etc/asterisk/*.conf* 2>/dev/null
+ fi
+
+ # don't delete these directories, even if they are empty
+ for x in voicemail meetme system dictate monitor tmp; do
+ keepdir /var/spool/asterisk/${x}
+ done
+ keepdir /var/lib/asterisk/sounds/priv-callerintros
+ keepdir /var/lib/asterisk/mohmp3
+ keepdir /var/lib/asterisk/agi-bin
+ keepdir /var/log/asterisk/cdr-csv
+ keepdir /var/log/asterisk/cdr-custom
+ keepdir /var/run/asterisk
+
+ # install astxs
+ dobin contrib/scripts/astxs
+
+ newinitd "${FILESDIR}"/1.2.0/asterisk.rc6 asterisk
+ newconfd "${FILESDIR}"/1.2.0/asterisk.confd asterisk
+
+ # install standard docs...
+ dodoc BUGS CREDITS ChangeLog HARDWARE README README.fpm
+ dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README UPGRADE.txt
+ dodoc doc/README.*
+ dodoc doc/*.txt
+
+ docinto scripts
+ dodoc contrib/scripts/*
+
+ docinto utils
+ dodoc contrib/utils/*
+
+ docinto configs
+ dodoc configs/*
+
+ # install api docs
+ if use doc; then
+ insinto /usr/share/doc/${PF}/api/html
+ doins doc/api/html/*
+ fi
+
+ insinto /usr/share/doc/${PF}/cgi
+ doins contrib/scripts/vmail.cgi
+ doins images/*.gif
+
+ # install asterisk-updater
+ dosbin "${FILESDIR}"/1.2.0/asterisk-updater
+
+ # install asterisk.h, a lot of external modules need this
+ insinto /usr/include/asterisk
+ doins include/asterisk.h
+
+ # make sure misdn/capi stuff is not installed, provided by asterisk-chan_..
+ rm -f "${D}"/etc/asterisk/misdn.conf "${D}"/usr/lib/asterisk/modules/chan_misdn.so \
+ "${D}"/usr/share/doc/${PF}/{conf/misdn.conf,configs/misdn.conf.sample.gz,README.misdn.gz}
+ rm -f "${D}"/usr/include/asterisk/chan_capi{,_app}.h \
+ "${D}"/usr/share/doc/${PF}/{conf/capi.conf,configs/capi.conf.sample.gz}
+
+ # make sure the broken speex support does not keep Asterisk from starting up
+ # bug #206463 if you care about this. solution needs to work with --as-needed
+ rm -f "${D}"usr/$(get_libdir)/asterisk/modules/codec_speex.so || die "Unable to remove fatally flawed codec_speex.so"
+}
+
+pkg_preinst() {
+ enewgroup asterisk
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
+}
+
+pkg_postinst() {
+ einfo "Fixing permissions"
+ chown -R asterisk:asterisk "${ROOT}"var/log/asterisk
+ chmod -R u=rwX,g=rX,o= "${ROOT}"var/log/asterisk
+
+ for x in lib run spool; do
+ chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
+ done
+
+ chown asterisk:asterisk "${ROOT}"etc/asterisk/
+ chown asterisk:asterisk "${ROOT}"etc/asterisk/*.adsi
+ chown asterisk:asterisk "${ROOT}"etc/asterisk/extensions.ael
+ chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/
+ chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/*.adsi
+ chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/extensions.ael
+ echo
+
+ #
+ # Announcements, warnings, reminders...
+ #
+ einfo "Asterisk has been installed"
+ einfo ""
+ 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"
+ elog
+ elog "http://www.automated.it/guidetoasterisk.htm"
+ elog
+ elog "Gentoo VoIP IRC Channel:"
+ elog "#gentoo-voip @ irc.freenode.net"
+ elog
+ elog "Please note that AEL is no longer built because of security bugs"
+ elog "See http://bugs.gentoo.org/show_bug.cgi?id=171884"
+ elog
+ echo
+ echo
+
+ #
+ # Warning about 1.0 -> 1.2 changes...
+ #
+ if is_ast10update; then
+ ewarn ""
+ ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.gz before continuing"
+ ewarn ""
+ fi
+
+ if is_astupdate; then
+ ewarn ""
+ ewarn " - The initgroups patch has been dropped, please update your"
+ ewarn " \"conf.d/asterisk\" and \"init.d/asterisk\" file!"
+ ewarn ""
+ fi
+
+ # scan for old modules
+ if is_ast10update; then
+ einfo "Asterisk has been updated from pre-1.2.x, scanning for old modules"
+ scan_modules
+ fi
+}
+
+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=rX,o= "${ROOT}"var/${x}/asterisk
+ done
+
+ chown -R root:asterisk "${ROOT}"etc/asterisk
+ chmod -R u=rwX,g=rX,o= "${ROOT}"etc/asterisk
+
+ einfo "done"
+ else
+ einfo "skipping"
+ fi
+}