summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajiv Aaron Manglani <rajiv@gentoo.org>2006-06-08 03:57:49 +0000
committerRajiv Aaron Manglani <rajiv@gentoo.org>2006-06-08 03:57:49 +0000
commitef29bb597cb07ef8aea98b1d11e8b62cf9c4b02c (patch)
treebc9c230ad9b9753e32231b8dc0636af2bef7e0cc /net-misc
parentremove old ebuilds. (diff)
downloadgentoo-2-ef29bb597cb07ef8aea98b1d11e8b62cf9c4b02c.tar.gz
gentoo-2-ef29bb597cb07ef8aea98b1d11e8b62cf9c4b02c.tar.bz2
gentoo-2-ef29bb597cb07ef8aea98b1d11e8b62cf9c4b02c.zip
remove old ebuilds.
(Portage version: 2.1_rc4-r4) (Unsigned Manifest commit)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/asterisk/Manifest58
-rw-r--r--net-misc/asterisk/asterisk-1.0.10-r1.ebuild502
-rw-r--r--net-misc/asterisk/asterisk-1.0.7-r2.ebuild469
-rw-r--r--net-misc/asterisk/asterisk-1.0.7-r3.ebuild469
-rw-r--r--net-misc/asterisk/asterisk-1.0.8-r1.ebuild473
-rw-r--r--net-misc/asterisk/asterisk-1.0.8-r2.ebuild473
-rw-r--r--net-misc/asterisk/asterisk-1.0.9-r3.ebuild475
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.0.10-r19
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.0.7-r29
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.0.7-r39
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.0.8-r19
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.0.8-r29
-rw-r--r--net-misc/asterisk/files/digest-asterisk-1.0.9-r39
13 files changed, 8 insertions, 2965 deletions
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
index 69b664334513..ef05007ab496 100644
--- a/net-misc/asterisk/Manifest
+++ b/net-misc/asterisk/Manifest
@@ -140,15 +140,11 @@ DIST asterisk-addons-1.0.9.tar.gz 73716 RMD160 98156861f790987fb4bf86b14c902aeca
DIST bristuff-0.2.0-RC8g.tar.gz 139013 RMD160 c0a037e0819b8985be2df60a010309335527f203 SHA1 d4289553e12260a24814b045c26a77c087e39daf SHA256 19a0a7fdbb192fed4ea086251d5653abbe8525232dd5b613f9366400c97b213b
DIST bristuff-0.2.0-RC8h.tar.gz 150270 RMD160 a958bc8418618ca892f0fbdb8d8cf203375d3865 SHA1 93420f41e6383167505f5ef8b65cde7ddf7f42ea SHA256 74c2e40cd665a2a9ac29d5ddd31892c8ca15ca9b55e2a08523e9db5ca75ba207
DIST bristuff-0.2.0-RC8n.tar.gz 143979 RMD160 922b6b807bb48aa690412de3916eeb54c1454486 SHA1 83342bebe9a2c5804ea81edc2c80d5675366b3b5 SHA256 a92d9d8e9777c0637d2db0375794fe011fd8ecf1461f0b8e6587c74670da637c
-DIST bristuff-0.2.0-RC8q.tar.gz 152037 RMD160 aaa9ca23eaeb74abc96dd7240f67e7886d4d6ad9 SHA1 27a6f56f47aa7ee5459d2625da7cff310909764e SHA256 8ba7a1e1e6ee8e9d77853d6d790d0de5deced7c11679b9b0e108cca817ed9728
+DIST bristuff-0.2.0-RC8q.tar.gz 152018 RMD160 98b1328d4618ade310a5312d71ec0f1e27507a37 SHA1 0ae715fcf7143b89099b82411d27c40381e0b31d SHA256 03cf1f5920aa023f6a449da473159b4b447d3940d74590cbad95304a4fbcb1c4
DIST bristuff-0.2.0-RC8r.tar.gz 194888 RMD160 d5dd31b9e4dcf30af6d2a62deb285a83f8a54019 SHA1 fc16a64e191d3f2720220f3ecbba3c55cece4654 SHA256 99f9da320d6335413384d12310e5ae9815572281c99d5908706022b6a4d6cb03
DIST bristuff-0.3.0-PRE-1n.tar.gz 248488 RMD160 3da3043a88551578b4495ae8e54ffb6a4f3bfd2c SHA1 c4aa937dffa7dec4ffed1c08bc228f6521c52306 SHA256 31b894bdd2741e309dfed23963db1cda3d74a8d616de8df9f1281b5558aa27f1
DIST bristuff-0.3.0-PRE-1o.tar.gz 252770 RMD160 60f1656a815bd1ff7d86ca7cb657c1d850a84804 SHA1 fd215b07533532c04f60212284a4cd1d6f18d5ba SHA256 aec95d12959181b601d7d10f05bb16eff715859dc8ea9fbb10e670296f61b6e9
DIST bristuff-0.3.0-PRE-1p.tar.gz 254003 RMD160 e87c0289bc598b52b962d192bc54008edc9b38a9 SHA1 5372bf13be0f5c7dd36046a8ac1cf5ed0fbb1f0b SHA256 d7dbb352ac68d64458919b94f815c8c97418c54fa8ae5411084370325528c164
-EBUILD asterisk-1.0.10-r1.ebuild 14665 RMD160 d024f1f9142dcd89c565b8e4256c7173f4ed68c7 SHA1 098f7998e44b6e228f619704cde2bd8aae2fd5de SHA256 aed8a073177d63742937ffdc5917a9b511f9b062a55172c2054eea4950948f07
-MD5 5331ab3504762b397113ab2996b7ba61 asterisk-1.0.10-r1.ebuild 14665
-RMD160 d024f1f9142dcd89c565b8e4256c7173f4ed68c7 asterisk-1.0.10-r1.ebuild 14665
-SHA256 aed8a073177d63742937ffdc5917a9b511f9b062a55172c2054eea4950948f07 asterisk-1.0.10-r1.ebuild 14665
EBUILD asterisk-1.0.10-r2.ebuild 14790 RMD160 f98c910b4a05d8f8c52d49ad8c195a8635b1be7b SHA1 18232089eea9af79d514ae44358e857abe54f034 SHA256 dba69c1e42c8f4a1d81cb48b264e1e59e7ca8d84d6576be12be16210e6f4f2f5
MD5 bb0a1e5098f140166d38b18999f996f7 asterisk-1.0.10-r2.ebuild 14790
RMD160 f98c910b4a05d8f8c52d49ad8c195a8635b1be7b asterisk-1.0.10-r2.ebuild 14790
@@ -157,34 +153,14 @@ EBUILD asterisk-1.0.11_p1.ebuild 14821 RMD160 e6c0354b6509eea8de6651535fbdc477df
MD5 340af069c192be789478eba9754021ac asterisk-1.0.11_p1.ebuild 14821
RMD160 e6c0354b6509eea8de6651535fbdc477dfb0b372 asterisk-1.0.11_p1.ebuild 14821
SHA256 147db56430b8020c5b964cf699f8f026b6e007c6d1b91908c678329ff63461c6 asterisk-1.0.11_p1.ebuild 14821
-EBUILD asterisk-1.0.7-r2.ebuild 13672 RMD160 c1c04e5dce4554a13ce211db3c34947ec8b7964b SHA1 fea9ba0a5c6d19a31bf79ced4938fa3700980a7c SHA256 a0cc1eec14c06bf72775182a8431d20a91e92d38f899262fcb5c2a1514097403
-MD5 5a641e52c52eded4766e31c8520fe83b asterisk-1.0.7-r2.ebuild 13672
-RMD160 c1c04e5dce4554a13ce211db3c34947ec8b7964b asterisk-1.0.7-r2.ebuild 13672
-SHA256 a0cc1eec14c06bf72775182a8431d20a91e92d38f899262fcb5c2a1514097403 asterisk-1.0.7-r2.ebuild 13672
-EBUILD asterisk-1.0.7-r3.ebuild 13676 RMD160 0f558baa6aa14ee5f038aa999c92cb678af0f6ab SHA1 abf055f6ff6d933bfe3012d30fdc44120900cf9f SHA256 00e809cbfa9337f2da842c1b88fe0d53033f5950eff2cea9da3615f97ed7f285
-MD5 f47f423dec3c8c0aaca9c4f117a8c5fc asterisk-1.0.7-r3.ebuild 13676
-RMD160 0f558baa6aa14ee5f038aa999c92cb678af0f6ab asterisk-1.0.7-r3.ebuild 13676
-SHA256 00e809cbfa9337f2da842c1b88fe0d53033f5950eff2cea9da3615f97ed7f285 asterisk-1.0.7-r3.ebuild 13676
EBUILD asterisk-1.0.7-r4.ebuild 13802 RMD160 9f46793d6efe08b927713b3d01700064113833ba SHA1 25df1a8dc985b3b99d2eb91e2d4c9193b4e8b0d1 SHA256 d698dff5a5cdbaeb06da98469d4b25a6818ba4e73d7fc48834c3120e44c59ba2
MD5 e84c2b7af3dfbf8d394d408520de4f71 asterisk-1.0.7-r4.ebuild 13802
RMD160 9f46793d6efe08b927713b3d01700064113833ba asterisk-1.0.7-r4.ebuild 13802
SHA256 d698dff5a5cdbaeb06da98469d4b25a6818ba4e73d7fc48834c3120e44c59ba2 asterisk-1.0.7-r4.ebuild 13802
-EBUILD asterisk-1.0.8-r1.ebuild 13808 RMD160 c3b72a43d7e5b3cfc652209751ada75273142cfb SHA1 970472c3487d3b5090be12bb0f5025e322c4d6b0 SHA256 f2c4f26687634d83d652f462eb26dd319c2fff952a887daf37b0229d67158f9e
-MD5 dab2abf3ef2e4b6f44e833df1ecb0f77 asterisk-1.0.8-r1.ebuild 13808
-RMD160 c3b72a43d7e5b3cfc652209751ada75273142cfb asterisk-1.0.8-r1.ebuild 13808
-SHA256 f2c4f26687634d83d652f462eb26dd319c2fff952a887daf37b0229d67158f9e asterisk-1.0.8-r1.ebuild 13808
-EBUILD asterisk-1.0.8-r2.ebuild 13815 RMD160 7adce75fb3a670a5e3bae18ec81ab9e72d074d01 SHA1 32d46f54fb904e11e32c2f9afcaf660a60bad48f SHA256 11a29e455fe784598e2b83f989d05866a0e988f3c69390af84b210a28d4625d1
-MD5 3ffe465ae17b176a5324ed45ce59e70a asterisk-1.0.8-r2.ebuild 13815
-RMD160 7adce75fb3a670a5e3bae18ec81ab9e72d074d01 asterisk-1.0.8-r2.ebuild 13815
-SHA256 11a29e455fe784598e2b83f989d05866a0e988f3c69390af84b210a28d4625d1 asterisk-1.0.8-r2.ebuild 13815
EBUILD asterisk-1.0.8-r3.ebuild 13938 RMD160 bcc69b63d3cbaed9646bb85fc9be60c50bb9caec SHA1 c02a3f6471c69c5d7336853f1abe6a63f63d8392 SHA256 a5ea0cc7163c7b5bd54a8dc0f87ec121c79e5549a9475a3e08d9df61b66b14de
MD5 8e136e114d120013ba998489b8645414 asterisk-1.0.8-r3.ebuild 13938
RMD160 bcc69b63d3cbaed9646bb85fc9be60c50bb9caec asterisk-1.0.8-r3.ebuild 13938
SHA256 a5ea0cc7163c7b5bd54a8dc0f87ec121c79e5549a9475a3e08d9df61b66b14de asterisk-1.0.8-r3.ebuild 13938
-EBUILD asterisk-1.0.9-r3.ebuild 13841 RMD160 16113d8f28e91f1cbc4d30659e1ff28f9fcf8f2e SHA1 9a92c6f44fb921240796cd82c917ef5d72d5697f SHA256 e23d90e10208f4de651037332f2fbeb4528ab506f690f9c2bfc04e2c43e6a463
-MD5 d334b99433aa96e3eaf99bc98bc073e8 asterisk-1.0.9-r3.ebuild 13841
-RMD160 16113d8f28e91f1cbc4d30659e1ff28f9fcf8f2e asterisk-1.0.9-r3.ebuild 13841
-SHA256 e23d90e10208f4de651037332f2fbeb4528ab506f690f9c2bfc04e2c43e6a463 asterisk-1.0.9-r3.ebuild 13841
EBUILD asterisk-1.0.9-r4.ebuild 13965 RMD160 5a09429e96ec494e217a11eb174225c84c0c9b2b SHA1 02d511237e5e4348fde013dbda690491465d8dd0 SHA256 ea43e113fa541640f6cd3d1abec0841c611255df5938456e55871548b2973296
MD5 9a4b789a2035ac22e1af8d08f602e386 asterisk-1.0.9-r4.ebuild 13965
RMD160 5a09429e96ec494e217a11eb174225c84c0c9b2b asterisk-1.0.9-r4.ebuild 13965
@@ -201,44 +177,26 @@ EBUILD asterisk-1.2.9_p1.ebuild 13214 RMD160 80ebeabac948a3d5c887eb9a3e9d57db2b4
MD5 094a21660abe50b8d546338a31c26096 asterisk-1.2.9_p1.ebuild 13214
RMD160 80ebeabac948a3d5c887eb9a3e9d57db2b41c56a asterisk-1.2.9_p1.ebuild 13214
SHA256 c1b90df3bab436d255b063b6243386faa68971b34aa246b2521d32c1f436e260 asterisk-1.2.9_p1.ebuild 13214
-MISC ChangeLog 24099 RMD160 202abc218437b7ba7f123395abba7a510dd1bc0e SHA1 2e0d6d7c56f7dc70b9b40ae27327c080a675f525 SHA256 bc72ffd80554c84d7cdca66e6e4c5e799f04f6184ff1e7e1376b387574c0905b
-MD5 2e88c99a136b50ce1cb67cb1baf7d99a ChangeLog 24099
-RMD160 202abc218437b7ba7f123395abba7a510dd1bc0e ChangeLog 24099
-SHA256 bc72ffd80554c84d7cdca66e6e4c5e799f04f6184ff1e7e1376b387574c0905b ChangeLog 24099
+MISC ChangeLog 24347 RMD160 1b62c6d71ceb4710baa8e471c85c0caa78d2a10d SHA1 a39a878a44174ee486776e78282eca8ac24c249c SHA256 64894a334f394308285b8b81bf323114f63611783c4f36ae6d926e82bc2e557b
+MD5 cc44b07c0d0a991b0f985e4122641338 ChangeLog 24347
+RMD160 1b62c6d71ceb4710baa8e471c85c0caa78d2a10d ChangeLog 24347
+SHA256 64894a334f394308285b8b81bf323114f63611783c4f36ae6d926e82bc2e557b ChangeLog 24347
MISC metadata.xml 384 RMD160 f5de78add5676233b8e0b9e111eab08970443582 SHA1 0441844fb3a715d6979e6c548147ada23d73fec2 SHA256 674224368cb2be6f72655cd67ee19d4d2d0f3425d560aff22b698269e0adc6d8
MD5 488aea6fbdb7537394cc049b0ff9e5d5 metadata.xml 384
RMD160 f5de78add5676233b8e0b9e111eab08970443582 metadata.xml 384
SHA256 674224368cb2be6f72655cd67ee19d4d2d0f3425d560aff22b698269e0adc6d8 metadata.xml 384
-MD5 d8267e6ad0a9178ad5e15e895eb32a80 files/digest-asterisk-1.0.10-r1 771
-RMD160 e1ba15ae1d64c51eab07601e30259349db81f9b1 files/digest-asterisk-1.0.10-r1 771
-SHA256 fea682fa710edc8f776545915572fba777f7485de0d71f6697d8f8eda28a068e files/digest-asterisk-1.0.10-r1 771
-MD5 d8267e6ad0a9178ad5e15e895eb32a80 files/digest-asterisk-1.0.10-r2 771
-RMD160 e1ba15ae1d64c51eab07601e30259349db81f9b1 files/digest-asterisk-1.0.10-r2 771
-SHA256 fea682fa710edc8f776545915572fba777f7485de0d71f6697d8f8eda28a068e files/digest-asterisk-1.0.10-r2 771
+MD5 c4df1f7c307b1ed6df4b93df7c307e51 files/digest-asterisk-1.0.10-r2 771
+RMD160 60a2e12b251bdb8a705ca7ea8ee72722354c9a30 files/digest-asterisk-1.0.10-r2 771
+SHA256 6c71c00347d2cacf6f8e95659172808b3c9b318a0545bea3cbb6810a431cc933 files/digest-asterisk-1.0.10-r2 771
MD5 a1cb599e43d7a6860d2d0eab179a6f4d files/digest-asterisk-1.0.11_p1 777
RMD160 58fe4ccfe603352e58e0313db4aea5e3168ea109 files/digest-asterisk-1.0.11_p1 777
SHA256 2788abc5e3bbeadfb4c580ecf8d9188b50b10815609ae1e7035a2196d435edab files/digest-asterisk-1.0.11_p1 777
-MD5 225681e768dff47ab88ef2cec2e4bac8 files/digest-asterisk-1.0.7-r2 768
-RMD160 9e242d71839e4b588bcfbe34eab4c68016d30e4f files/digest-asterisk-1.0.7-r2 768
-SHA256 74a99fd42f3e18b7cd55e8f17c38d03128aeb6590b2cd5070e8f52e7cf987294 files/digest-asterisk-1.0.7-r2 768
-MD5 225681e768dff47ab88ef2cec2e4bac8 files/digest-asterisk-1.0.7-r3 768
-RMD160 9e242d71839e4b588bcfbe34eab4c68016d30e4f files/digest-asterisk-1.0.7-r3 768
-SHA256 74a99fd42f3e18b7cd55e8f17c38d03128aeb6590b2cd5070e8f52e7cf987294 files/digest-asterisk-1.0.7-r3 768
MD5 225681e768dff47ab88ef2cec2e4bac8 files/digest-asterisk-1.0.7-r4 768
RMD160 9e242d71839e4b588bcfbe34eab4c68016d30e4f files/digest-asterisk-1.0.7-r4 768
SHA256 74a99fd42f3e18b7cd55e8f17c38d03128aeb6590b2cd5070e8f52e7cf987294 files/digest-asterisk-1.0.7-r4 768
-MD5 c3c4ac188c4448a2f681a43f882d50b2 files/digest-asterisk-1.0.8-r1 768
-RMD160 9e9ae7b4c200e294ec3c2a47b8f2337d3bc6190c files/digest-asterisk-1.0.8-r1 768
-SHA256 c9c331989779b72908a891abb8204fe36a9294c6100480446e417f5110e5fd65 files/digest-asterisk-1.0.8-r1 768
-MD5 c3c4ac188c4448a2f681a43f882d50b2 files/digest-asterisk-1.0.8-r2 768
-RMD160 9e9ae7b4c200e294ec3c2a47b8f2337d3bc6190c files/digest-asterisk-1.0.8-r2 768
-SHA256 c9c331989779b72908a891abb8204fe36a9294c6100480446e417f5110e5fd65 files/digest-asterisk-1.0.8-r2 768
MD5 c3c4ac188c4448a2f681a43f882d50b2 files/digest-asterisk-1.0.8-r3 768
RMD160 9e9ae7b4c200e294ec3c2a47b8f2337d3bc6190c files/digest-asterisk-1.0.8-r3 768
SHA256 c9c331989779b72908a891abb8204fe36a9294c6100480446e417f5110e5fd65 files/digest-asterisk-1.0.8-r3 768
-MD5 e9e9701fad77824bcfdff1f02b9634e3 files/digest-asterisk-1.0.9-r3 768
-RMD160 a3a8772f22b856f9f1cea758a10caecca24c326f files/digest-asterisk-1.0.9-r3 768
-SHA256 4a05fc2f217e415d6c30a83923be93e674c46727935eaa9abcdb72220b8cdd43 files/digest-asterisk-1.0.9-r3 768
MD5 e9e9701fad77824bcfdff1f02b9634e3 files/digest-asterisk-1.0.9-r4 768
RMD160 a3a8772f22b856f9f1cea758a10caecca24c326f files/digest-asterisk-1.0.9-r4 768
SHA256 4a05fc2f217e415d6c30a83923be93e674c46727935eaa9abcdb72220b8cdd43 files/digest-asterisk-1.0.9-r4 768
diff --git a/net-misc/asterisk/asterisk-1.0.10-r1.ebuild b/net-misc/asterisk/asterisk-1.0.10-r1.ebuild
deleted file mode 100644
index 852071c39f97..000000000000
--- a/net-misc/asterisk/asterisk-1.0.10-r1.ebuild
+++ /dev/null
@@ -1,502 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.10-r1.ebuild,v 1.2 2006/03/06 14:25:49 gustavoz Exp $
-
-inherit eutils perl-app
-
-ADDONS_VERSION="1.0.9"
-BRI_VERSION="0.2.0-RC8q"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://ftp1.digium.com/pub/telephony/${PN}/old-releases/${P}.tar.gz
- http://ftp1.digium.com/pub/telephony/${PN}/old-releases/${PN}-addons-${ADDONS_VERSION}.tar.gz
- bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )"
-
-S_ADDONS=${WORKDIR}/${PN}-addons-${ADDONS_VERSION}
-S_BRI=${WORKDIR}/bristuff-${BRI_VERSION}
-
-IUSE="alsa bri debug doc gtk hardened mmx mysql mysqlfriends postgres pri resperl speex ukcid vmdbmysql vmdbpostgres zaptel"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~hppa ~ppc sparc ~x86"
-
-DEPEND="dev-libs/newt
- dev-libs/openssl
- media-sound/mpg123
- media-sound/sox
- doc? ( app-doc/doxygen )
- gtk? ( =x11-libs/gtk+-1.2* )
- pri? ( >=net-libs/libpri-1.0.9 )
- bri? ( >=net-libs/libpri-1.0.9
- >=net-misc/zaptel-1.0.10 )
- alsa? ( media-libs/alsa-lib )
- mysql? ( dev-db/mysql )
- speex? ( media-libs/speex )
- zaptel? ( >=net-misc/zaptel-1.0.10 )
- postgres? ( dev-db/postgresql )
- vmdbmysql? ( dev-db/mysql )
- mysqlfriends? ( dev-db/mysql )
- vmdbpostgres? ( dev-db/postgresql )
- resperl? ( dev-lang/perl
- >=net-misc/zaptel-1.0.10 )"
-
-pkg_setup() {
- local n
-
- #
- # Warning about security changes...
- #
- ewarn "****************** Important changes warning! *********************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/asterisk"
- ewarn
- ewarn "- More information at the end of this emerge"
- ewarn
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
- ewarn
- einfo "Press Ctrl+C to abort"
- echo
- ebeep
-
- n=15
- while [[ $n -gt 0 ]]; do
- echo -en " Waiting $n seconds...\r"
- sleep 1
- (( n-- ))
- done
-
- #
- # Regular checks
- #
- einfo "Running some pre-flight checks..."
- if use resperl; then
- # res_perl pre-flight check...
- if ! $(perl -V | grep -q "usemultiplicity=define") ||\
- ! built_with_use dev-lang/perl ithreads || ! built_with_use sys-devel/libperl ithreads
- then
- eerror "Embedded perl add-on needs Perl and libperl with built-in threads support"
- eerror "(rebuild perl and libperl with ithreads use-flag enabled)"
- die "Perl w/o threads support..."
- fi
- einfo "Perl with ithreads support found"
- fi
-
-
- # mysql and postgres voicemail support are mutually exclusive..
- if use vmdbmysql && use vmdbpostgres; then
- eerror "MySQL and PostgreSQL Voicemail support are mutually exclusive... choose one!"
- die "Conflicting use-flags"
- fi
-
- # check if zaptel and libpri have been built with bri enabled
- if use bri; then
- if ! built_with_use net-misc/zaptel bri; then
- eerror "Re-emerge zaptel with bri use-flag enabled!"
- die "Zaptel without bri support detected"
- fi
-
- if ! built_with_use net-libs/libpri bri; then
- eerror "Re-emerge libpri with bri use-flag enabled!"
- die "Libpri without bri support detected"
- fi
- fi
-
- # check if zaptel has been built with ukcid
- if use ukcid && ! built_with_use net-misc/zaptel ukcid; then
- eerror "Re-emerge zaptel with ukcid useflag enabled!"
- die "Zaptel missing ukcid support"
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- # set cflags & mmx optimization
- sed -i -e "s:^\(OPTIMIZE+=\).*:\1 ${CFLAGS}:" \
- -e "s:^\(CFLAGS+=\$(shell if \$(CC)\):#\1:" \
- Makefile
-
- # hppa patch for gsm codec
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-hppa.patch
-
- # mark adsi functions as weak references, things will blow
- # on hardened otherwise (bug #100697 and #85655)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-weak-references.diff
-
- # gsm codec still uses -fomit-frame-pointer, and other codecs have their
- # own flags. We only change the arch.
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \
- -e "s:^CFLAGS[\t ]\++=:CFLAGS =:" \
- codecs/gsm/Makefile
-
- if use mmx; then
- if ! use hardened; then
- einfo "Enabling mmx optimization"
- sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \
- codecs/gsm/Makefile
- else
- ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!"
-
- fi
- fi
- if ! use mmx || use hardened; then
- # don't build + link asm mmx object file
- # without this codec_gsm.so will include text relocations
- sed -i -e "/k6opt\.\(s\|o\)/ d" \
- codecs/gsm/Makefile
- fi
-
- if ! use debug; then
- einfo "Disabling debugging"
- sed -i -e "s:^\(DEBUG=\):#\1:" Makefile
- fi
-
- # change image path in voicemail cgi
- sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
-
- #
- # embedded perl
- #
- if use resperl; then
- einfo "Patching asterisk for embedded perl support..."
- epatch ${S_ADDONS}/res_perl/astmake.diff
-
- # create necessary .c file
- /usr/bin/perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c"
-
- cd ${S_ADDONS}
-
- # fix perl path, source location and remove res_musiconhold
- sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
- res_perl/Makefile \
- ${S}/Makefile \
- res_perl/INC/*.pm
- sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
- -e "s:\$(ASTLIBDIR)/modules/res_musiconhold.so::" \
- res_perl/Makefile
-
- if use bri; then
- epatch ${FILESDIR}/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff
- fi
-
- cd ${S}
- fi
-
- #
- # uclibc patch
- #
- if use elibc_uclibc; then
- einfo "Patching asterisk for uclibc..."
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-uclibc-dns.diff
- fi
-
- #
- # other patches
- #
-
- # fix lpc10 Makefile, remove the
- # CFLAGS+=-march=$(shell uname -m) part
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-lpc10flags.diff
-
- # asterisk-config
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-astcfg-0.0.2.diff
-
- #
- # database voicemail support
- #
- if use postgres; then
- sed -i -e "s:^#\(APPS+=app_sql_postgres.so\):\1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
- fi
-
- if use vmdbpostgres; then
- einfo "Enabling PostgreSQL voicemail support"
- sed -i -e "s:^\(USE_POSTGRES_VM_INTERFACE\).*:\1=1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
-
- # patch app_voicemail.c
- sed -i -e "s:^#include <postgresql/libpq-fe\.h>:#include \"libpq-fe\.h\":" \
- apps/app_voicemail.c
-
- elif use vmdbmysql; then
- einfo "Enabling MySQL voicemail support"
- sed -i -e "s:^\(USE_MYSQL_VM_INTERFACE\).*:\1=1:" \
- -e "s:^\(CFLAGS+=-DUSEMYSQLVM\):\1 -I${S_ADDONS}:" \
- apps/Makefile
- fi
-
- #
- # MySQL friends support
- #
- if use mysqlfriends; then
- einfo "Enabling MySQL friends support for SIP and IAX"
- sed -i -e "s:^\(USE_MYSQL_FRIENDS\)=.*:\1=1:" \
- -e "s:^\(USE_SIP_MYSQL_FRIENDS\)=.*:\1=1:" \
- channels/Makefile
- fi
-
- #
- # asterisk add-ons
- #
- cd ${S_ADDONS}
- sed -i -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" \
- -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include -fPIC \2:" \
- format_mp3/Makefile
-
-
- #
- # BRI patches
- #
- if use bri; then
- cd ${S}
- einfo "Patching asterisk w/ BRI stuff"
-
- # remove after new patch has been released
- sed -i -e "s:^\([+-]\)1\.0\.9:\11.0.10:" \
- ${S_BRI}/patches/asterisk.patch
-
- epatch ${S_BRI}/patches/asterisk.patch
- fi
-
- #
- # Revived snmp plugin support
- #
-# if use snmp; then
-# cd ${S}
-# einfo "Patching snmp plugin helper functions"
-# epatch ${FILESDIR}/1.0.0/ast-ax-snmp-1.0.6.diff
-# fi
-
- # fix path for non-root
- cd ${S}
- sed -i -e "s:^\(ASTVARRUNDIR=\).*:\1\$(INSTALL_PREFIX)/var/run/asterisk:" \
- Makefile
-
- # fix contrib scripts for non-root
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.7-scripts.diff
-
- # add initgroups support to asterisk, this is needed
- # to support supplementary groups for the asterisk
- # user (start-stop-daemons --chguid breaks realtime priority support)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-initgroups.diff
-
- # UK callerid patch, adds support for british-telecoms callerid to x100p cards
- # see http://www.lusyn.com/asterisk/patches.html for more information
- use ukcid && \
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-ukcid.patch
-
- # needed for >=freetds-0.63
- if has_version ">=dev-db/freetds-0.63"; then
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-freetds.diff
- fi
-
- # security fix, bug #111836
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-vmail.cgi.patch
-
- # patch for mISDN
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-misdn.patch
-}
-
-src_compile() {
- # build asterisk first...
- einfo "Building Asterisk..."
- cd ${S}
- emake -j1 || die "Make failed"
-
- # create api docs
- use doc && \
- emake -j1 progdocs
-
- #
- # add-ons
- #
- einfo "Building additional stuff..."
- cd ${S_ADDONS}
- emake -j1 || die "Make failed"
-
- if use resperl; then
- cd ${S_ADDONS}/res_perl
- emake -j1 || die "Building embedded perl failed"
- fi
-}
-
-src_install() {
- make DESTDIR=${D} install || die "Make install failed"
- make DESTDIR=${D} samples || die "Make install samples failed"
-
- # install astconf.h, a lot of external modules need this
- insinto /usr/include/asterisk
- doins astconf.h
-
- # install addmailbox and astgenkey
- dosbin contrib/scripts/addmailbox
- dosbin contrib/scripts/astgenkey
-
- newinitd ${FILESDIR}/1.0.0/asterisk.rc6.sec asterisk
- newconfd ${FILESDIR}/1.0.0/asterisk.confd.sec asterisk
-
- # don't delete these, even if they are empty
- keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
- keepdir /var/spool/asterisk/tmp
- keepdir /var/log/asterisk/cdr-csv
- keepdir /var/run/asterisk
-
- # install standard docs...
- dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm
- dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README
- dodoc doc/README.*
- dodoc doc/*.txt
-
- docinto scripts
- dodoc contrib/scripts/*
- docinto firmware/iax
- dodoc contrib/firmware/iax/*
-
- # 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
-
- #
- # add-ons
- #
-
- # install additional modules...
- einfo "Installing additional modules..."
- cd ${S_ADDONS}
- make INSTALL_PREFIX=${D} install || die "Make install failed"
-
- if use resperl; then
- perlinfo
-
- cd ${S_ADDONS}/res_perl
- make INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed"
-
- # move AstApiBase.so to a proper place
- dodir ${VENDOR_LIB}/auto/AstAPIBase
- mv ${D}/etc/asterisk/perl/AstAPIBase.so ${D}${VENDOR_LIB}/auto/AstAPIBase
-
- # move *.pm files to other location
- dodir ${VENDOR_LIB}/AstAPI
- dodir ${VENDOR_LIB}/AstAPIBase
- for x in AstAPI.pm AstConfig.pm LoadFile.pm PerlSwitch.pm WebServer.pm; do
- mv ${D}/etc/asterisk/perl/${x} ${D}${VENDOR_LIB}/AstAPI
- dosed "s/^use[\t ]\+${x/.pm/};/use AstAPI::${x/.pm/};/" /etc/asterisk/perl/asterisk_init.pm
- done
- mv ${D}/etc/asterisk/perl/AstAPIBase.pm ${D}${VENDOR_LIB}/AstAPIBase
- dosed "s/^use[\t ]\+AstAPI;/use AstAPI::AstAPI;/" /etc/asterisk/perl/asterisk_init.pm
- dosed "s/^use[\t ]\+AstAPIBase;/use AstAPIBase::AstAPIBase;/" ${VENDOR_LIB}/AstAPI/AstAPI.pm
-
- # move apps + htdocs to a proper place
- dodir /var/lib/asterisk/perl
- mv ${D}/etc/asterisk/perl/{apps,htdocs} ${D}/var/lib/asterisk/perl
-
- # fix locations
- sed -i -e "s:/etc/asterisk/perl:/var/lib/asterisk/perl:" \
- ${D}${VENDOR_LIB}/AstAPI/LoadFile.pm ${D}${VENDOR_LIB}/AstAPI/WebServer.pm
- fi
-}
-
-pkg_preinst() {
- einfo "Adding asterisk user and group"
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk asterisk
-}
-
-pkg_postinst() {
- #
- # Change permissions and ownerships of asterisk
- # directories and files
- #
- einfo "Fixing permissions and ownerships"
- # fix permissions in /var/...
- 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
-
- #
- # Fix locations for old installations (pre-non-root versions)
- #
- if [[ -z "$(grep "/var/run/asterisk" ${ROOT}etc/asterisk/asterisk.conf)" ]]
- then
- einfo "Fixing astrundir in ${ROOT}etc/asterisk/asterisk.conf"
- mv -f ${ROOT}etc/asterisk/asterisk.conf \
- ${ROOT}etc/asterisk/asterisk.conf.bak
- sed -e "s:^\(astrundir[\t ]=>\).*:\1 /var/run/asterisk:" \
- ${ROOT}etc/asterisk/asterisk.conf.bak >\
- ${ROOT}etc/asterisk/asterisk.conf
- einfo "Backup has been saved as ${ROOT}etc/asterisk/asterisk.conf.bak"
- fi
-
- #
- # Some messages
- #
- einfo "Asterisk has been installed"
- einfo ""
- einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
- einfo ""
- einfo "If you want to know more about asterisk, visit these sites:"
- einfo "http://www.asteriskdocs.org/"
- einfo "http://www.voip-info.org/wiki-Asterisk"
- echo
- einfo "http://asterisk.xvoip.com/"
- einfo "http://junghanns.net/asterisk/"
- einfo "http://www.automated.it/guidetoasterisk.htm"
- echo
- einfo "Gentoo VoIP IRC Channel:"
- einfo "#gentoo-voip @ irc.freenode.net"
-
- #
- # Warning about security changes...
- #
- ewarn "*********************** Important changes **************************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Make sure the asterisk user is a member of the proper groups if you want it"
- ewarn " to have access to hardware devices, e.g. \"audio\" for Alsa and OSS sound or"
- ewarn " \"dialout\" for zaptel!"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (rwxr-x--- directories) / 640 (rw-r----- files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 / 640"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/astrisk"
- ewarn
- ewarn "- Asterisk cannot set the IP ToS bits when run as user,"
- ewarn " use something like this to make iptables set them for you:"
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28\""
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28\""
- ewarn " (taken from voip-info.org comments (see below), thanks andrewid)"
- ewarn
- ewarn "For more details:"
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
-}
diff --git a/net-misc/asterisk/asterisk-1.0.7-r2.ebuild b/net-misc/asterisk/asterisk-1.0.7-r2.ebuild
deleted file mode 100644
index fdd11dea36ed..000000000000
--- a/net-misc/asterisk/asterisk-1.0.7-r2.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.7-r2.ebuild,v 1.3 2006/03/06 03:45:05 stkn Exp $
-
-inherit eutils perl-app
-
-ADDONS_VERSION="1.0.7"
-BRI_VERSION="0.2.0-RC8g"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${P}.tar.gz
- ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${PN}-addons-${ADDONS_VERSION}.tar.gz
- bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )"
-
-S_ADDONS=${WORKDIR}/${PN}-addons-${ADDONS_VERSION}
-
-IUSE="alsa doc gtk mmx mysql pri zaptel debug postgres vmdbmysql vmdbpostgres bri hardened speex resperl"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~hppa ~ppc ~sparc x86"
-
-DEPEND="dev-libs/newt
- dev-libs/openssl
- media-sound/mpg123
- media-sound/sox
- doc? ( app-doc/doxygen )
- gtk? ( =x11-libs/gtk+-1.2* )
- pri? ( >=net-libs/libpri-1.0.7-r1 )
- bri? ( >=net-libs/libpri-1.0.7-r1
- >=net-misc/zaptel-1.0.7-r1 )
- alsa? ( media-libs/alsa-lib )
- mysql? ( dev-db/mysql )
- speex? ( media-libs/speex )
- zaptel? ( >=net-misc/zaptel-1.0.7-r1 )
- postgres? ( dev-db/postgresql )
- vmdbmysql? ( dev-db/mysql )
- vmdbpostgres? ( dev-db/postgresql )
- resperl? ( dev-lang/perl
- >=net-misc/zaptel-1.0.7-r1 )"
-
-pkg_setup() {
- local n
-
- #
- # Warning about security changes...
- #
- ewarn "****************** Important changes warning! *********************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/asterisk"
- ewarn
- ewarn "- More information at the end of this emerge"
- ewarn
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
- ewarn
- einfo "Press Ctrl+C to abort"
- echo
- ebeep
-
- n=15
- while [[ $n -gt 0 ]]; do
- echo -en " Waiting $n seconds...\r"
- sleep 1
- (( n-- ))
- done
-
- #
- # Regular checks
- #
- einfo "Running some pre-flight checks..."
- if use resperl; then
- # res_perl pre-flight check...
- if ! $(perl -V | grep -q "usemultiplicity=define") ||\
- ! built_with_use dev-lang/perl ithreads || ! built_with_use sys-devel/libperl ithreads
- then
- eerror "Embedded perl add-on needs Perl and libperl with built-in threads support"
- eerror "(rebuild perl and libperl with ithreads use-flag enabled)"
- die "Perl w/o threads support..."
- fi
- einfo "Perl with ithreads support found"
- fi
-
-
- # mysql and postgres voicemail support are mutually exclusive..
- if use vmdbmysql && use vmdbpostgres; then
- eerror "MySQL and PostgreSQL Voicemail support are mutually exclusive... choose one!"
- die "Conflicting use-flags"
- fi
-
- # check if zaptel and libpri have been built with bri enabled
- if use bri; then
- if ! built_with_use net-misc/zaptel bri; then
- eerror "Re-emerge zaptel with bri use-flag enabled!"
- die "Zaptel without bri support detected"
- fi
-
- if ! built_with_use net-libs/libpri bri; then
- eerror "Re-emerge libpri with bri use-flag enabled!"
- die "Libpri without bri support detected"
- fi
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- # set cflags & mmx optimization
- sed -i -e "s:^\(OPTIMIZE+=\).*:\1 ${CFLAGS}:" \
- -e "s:^\(CFLAGS+=\$(shell if \$(CC)\):#\1:" \
- Makefile
-
- # gsm codec still uses -fomit-frame-pointer, and other codecs have their
- # own flags. We only change the arch.
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \
- -e "s:^CFLAGS[\t ]\++=:CFLAGS =:" \
- codecs/gsm/Makefile
-
- # hppa patch for gsm codec
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-hppa.patch
-
- if use mmx; then
- if ! use hardened; then
- einfo "Enabling mmx optimization"
- sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \
- codecs/gsm/Makefile
- else
- ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!"
-
- fi
- fi
- if ! use mmx || use hardened; then
- # don't build + link asm mmx object file
- # without this codec_gsm.so will include text relocations
- sed -i -e "/k6opt\.\(s\|o\)/ d" \
- codecs/gsm/Makefile
- fi
-
- if ! use debug; then
- einfo "Disabling debugging"
- sed -i -e "s:^\(DEBUG=\):#\1:" Makefile
- fi
-
- # change image path in voicemail cgi
- sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
-
- #
- # embedded perl
- #
- if use resperl; then
- einfo "Patching asterisk for embedded perl support..."
- epatch ${S_ADDONS}/res_perl/astmake.diff
-
- # create necessary .c file
- /usr/bin/perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c"
-
- cd ${S_ADDONS}
-
- # fix perl path, source location and remove res_musiconhold
- sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
- res_perl/Makefile \
- ${S}/Makefile \
- res_perl/INC/*.pm
- sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
- -e "s:\$(ASTLIBDIR)/modules/res_musiconhold.so::" \
- res_perl/Makefile
-
- if use bri; then
- epatch ${FILESDIR}/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff
- fi
-
- cd ${S}
- fi
-
- #
- # uclibc patch
- #
- if use elibc_uclibc; then
- einfo "Patching asterisk for uclibc..."
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-uclibc-dns.diff
- fi
-
- #
- # other patches
- #
-
- # fix lpc10 Makefile, remove the
- # CFLAGS+=-march=$(shell uname -m) part
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-lpc10flags.diff
-
- # asterisk-config
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-astcfg-0.0.2.diff
-
- #
- # database voicemail support
- #
- if use postgres; then
- sed -i -e "s:^#\(APPS+=app_sql_postgres.so\):\1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
- fi
-
- if use vmdbpostgres; then
- einfo "Enabling PostgreSQL voicemail support"
- sed -i -e "s:^\(USE_POSTGRES_VM_INTERFACE\).*:\1=1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
-
- # patch app_voicemail.c
- sed -i -e "s:^#include <postgresql/libpq-fe\.h>:#include \"libpq-fe\.h\":" \
- apps/app_voicemail.c
-
- elif use vmdbmysql; then
- einfo "Enabling MySQL voicemail support"
- sed -i -e "s:^\(USE_MYSQL_VM_INTERFACE\).*:\1=1:" \
- -e "s:^\(CFLAGS+=-DUSEMYSQLVM\):\1 -I${S_ADDONS}:" \
- apps/Makefile
- fi
-
- #
- # asterisk add-ons
- #
- cd ${S_ADDONS}
- sed -i -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" \
- -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include -fPIC \2:" \
- format_mp3/Makefile
-
-
- #
- # BRI patches
- #
- if use bri; then
- cd ${S}
- einfo "Patching asterisk w/ BRI stuff"
-
- epatch ${WORKDIR}/bristuff-${BRI_VERSION}/patches/asterisk.patch
- fi
-
- #
- # Revived snmp plugin support
- #
-# if use snmp; then
-# cd ${S}
-# einfo "Patching snmp plugin helper functions"
-# epatch ${FILESDIR}/1.0.0/ast-ax-snmp-1.0.6.diff
-# fi
-
- # fix path for non-root
- cd ${S}
- sed -i -e "s:^\(ASTVARRUNDIR=\).*:\1\$(INSTALL_PREFIX)/var/run/asterisk:" \
- Makefile
-
- # fix contrib scripts for non-root
- epatch ${FILESDIR}/1.0.0/${P}-scripts.diff
-
- # add initgroups support to asterisk, this is needed
- # to support supplementary groups for the asterisk
- # user (start-stop-daemons --chguid breaks realtime priority support)
- epatch ${FILESDIR}/1.0.0/${P}-initgroups.diff
-
- # security fix (www.portcullis-security.com/advisory/advisory-05-013.txt)
- epatch ${FILESDIR}/1.0.0/${P}-manager-cli-segv.patch
-
- # fix segfault on amd64 and possibly other 64bit systems (#105762)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-ptr64fix.diff
-
- # security fix, bug #11836
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-vmail.cgi.patch
-}
-
-src_compile() {
- # build asterisk first...
- einfo "Building Asterisk..."
- cd ${S}
- emake -j1 || die "Make failed"
-
- # create api docs
- use doc && \
- emake -j1 progdocs
-
- #
- # add-ons
- #
- einfo "Building additional stuff..."
- cd ${S_ADDONS}
- emake -j1 || die "Make failed"
-
- if use resperl; then
- cd ${S_ADDONS}/res_perl
- emake -j1 || die "Building embedded perl failed"
- fi
-}
-
-src_install() {
- make DESTDIR=${D} install || die "Make install failed"
- make DESTDIR=${D} samples || die "Make install samples failed"
-
- # install astconf.h, a lot of external modules need this
- insinto /usr/include/asterisk
- doins astconf.h
-
- # install addmailbox and astgenkey
- dosbin contrib/scripts/addmailbox
- dosbin contrib/scripts/astgenkey
-
- newinitd ${FILESDIR}/1.0.0/asterisk.rc6.sec asterisk
- newconfd ${FILESDIR}/1.0.0/asterisk.confd.sec asterisk
-
- # don't delete these, even if they are empty
- keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
- keepdir /var/spool/asterisk/tmp
- keepdir /var/log/asterisk/cdr-csv
- keepdir /var/run/asterisk
-
- # install standard docs...
- dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm
- dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README
- dodoc doc/README.*
- dodoc doc/*.txt
-
- docinto scripts
- dodoc contrib/scripts/*
- docinto firmware/iax
- dodoc contrib/firmware/iax/*
-
- # 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
-
- #
- # add-ons
- #
-
- # install additional modules...
- einfo "Installing additional modules..."
- cd ${S_ADDONS}
- make INSTALL_PREFIX=${D} install || die "Make install failed"
-
- if use resperl; then
- perlinfo
-
- cd ${S_ADDONS}/res_perl
- make INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed"
-
- # move AstApiBase.so to a proper place
- dodir ${VENDOR_LIB}/auto/AstAPIBase
- mv ${D}/etc/asterisk/perl/AstAPIBase.so ${D}${VENDOR_LIB}/auto/AstAPIBase
-
- # move *.pm files to other location
- dodir ${VENDOR_LIB}/AstAPI
- dodir ${VENDOR_LIB}/AstAPIBase
- for x in AstAPI.pm AstConfig.pm LoadFile.pm PerlSwitch.pm WebServer.pm; do
- mv ${D}/etc/asterisk/perl/${x} ${D}${VENDOR_LIB}/AstAPI
- dosed "s/^use[\t ]\+${x/.pm/};/use AstAPI::${x/.pm/};/" /etc/asterisk/perl/asterisk_init.pm
- done
- mv ${D}/etc/asterisk/perl/AstAPIBase.pm ${D}${VENDOR_LIB}/AstAPIBase
- dosed "s/^use[\t ]\+AstAPI;/use AstAPI::AstAPI;/" /etc/asterisk/perl/asterisk_init.pm
- dosed "s/^use[\t ]\+AstAPIBase;/use AstAPIBase::AstAPIBase;/" ${VENDOR_LIB}/AstAPI/AstAPI.pm
-
- # move apps + htdocs to a proper place
- dodir /var/lib/asterisk/perl
- mv ${D}/etc/asterisk/perl/{apps,htdocs} ${D}/var/lib/asterisk/perl
-
- # fix locations
- sed -i -e "s:/etc/asterisk/perl:/var/lib/asterisk/perl:" \
- ${D}${VENDOR_LIB}/AstAPI/LoadFile.pm ${D}${VENDOR_LIB}/AstAPI/WebServer.pm
- fi
-}
-
-pkg_preinst() {
- einfo "Adding asterisk user and group"
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk asterisk
-}
-
-pkg_postinst() {
- #
- # Change permissions and ownerships of asterisk
- # directories and files
- #
- einfo "Fixing permissions and ownerships"
- # fix permissions in /var/...
- 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
-
- #
- # Fix locations of old installations (pre-non-root versions)
- #
- if [[ -z "$(grep "/var/run/asterisk" ${ROOT}etc/asterisk/asterisk.conf)" ]]
- then
- einfo "Fixing astrundir in ${ROOT}etc/asterisk/asterisk.conf"
- mv -f ${ROOT}etc/asterisk/asterisk.conf \
- ${ROOT}etc/asterisk/asterisk.conf.bak
- sed -e "s:^\(astrundir[\t ]=>\).*:\1 /var/run/asterisk:" \
- ${ROOT}etc/asterisk/asterisk.conf.bak >\
- ${ROOT}etc/asterisk/asterisk.conf
- einfo "Backup has been saved as ${ROOT}etc/asterisk/asterisk.conf.bak"
- fi
-
- #
- # Some messages
- #
- einfo "Asterisk has been installed"
- einfo ""
- einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
- einfo ""
- einfo "If you want to know more about asterisk, visit these sites:"
- einfo "http://www.asteriskdocs.org/"
- einfo "http://www.voip-info.org/wiki-Asterisk"
- echo
- einfo "http://asterisk.xvoip.com/"
- einfo "http://junghanns.net/asterisk/"
- einfo "http://www.automated.it/guidetoasterisk.htm"
- echo
- einfo "Gentoo VoIP IRC Channel:"
- einfo "#gentoo-voip @ irc.freenode.net"
-
- #
- # Warning about security changes...
- #
- ewarn "*********************** Important changes **************************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Make sure the asterisk user is a member of the proper groups if you want it"
- ewarn " to have access to hardware devices, e.g. \"audio\" for Alsa and OSS sound or"
- ewarn " \"dialout\" for zaptel!"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (rwxr-x--- directories) / 640 (rw-r----- files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 / 640"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/astrisk"
- ewarn
- ewarn "- Asterisk cannot set the IP ToS bits when run as user,"
- ewarn " use something like this to make iptables set them for you:"
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28\""
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28\""
- ewarn " (taken from voip-info.org comments (see below), thanks andrewid)"
- ewarn
- ewarn "For more details:"
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
-}
diff --git a/net-misc/asterisk/asterisk-1.0.7-r3.ebuild b/net-misc/asterisk/asterisk-1.0.7-r3.ebuild
deleted file mode 100644
index 4d22eb581425..000000000000
--- a/net-misc/asterisk/asterisk-1.0.7-r3.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.7-r3.ebuild,v 1.1 2006/03/06 04:41:15 rajiv Exp $
-
-inherit eutils perl-app
-
-ADDONS_VERSION="1.0.7"
-BRI_VERSION="0.2.0-RC8g"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${P}.tar.gz
- ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${PN}-addons-${ADDONS_VERSION}.tar.gz
- bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )"
-
-S_ADDONS=${WORKDIR}/${PN}-addons-${ADDONS_VERSION}
-
-IUSE="alsa doc gtk mmx mysql pri zaptel debug postgres vmdbmysql vmdbpostgres bri hardened speex resperl"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
-
-DEPEND="dev-libs/newt
- dev-libs/openssl
- media-sound/mpg123
- media-sound/sox
- doc? ( app-doc/doxygen )
- gtk? ( =x11-libs/gtk+-1.2* )
- pri? ( >=net-libs/libpri-1.0.7-r1 )
- bri? ( >=net-libs/libpri-1.0.7-r1
- >=net-misc/zaptel-1.0.7-r1 )
- alsa? ( media-libs/alsa-lib )
- mysql? ( dev-db/mysql )
- speex? ( media-libs/speex )
- zaptel? ( >=net-misc/zaptel-1.0.7-r1 )
- postgres? ( dev-db/postgresql )
- vmdbmysql? ( dev-db/mysql )
- vmdbpostgres? ( dev-db/postgresql )
- resperl? ( dev-lang/perl
- >=net-misc/zaptel-1.0.7-r1 )"
-
-pkg_setup() {
- local n
-
- #
- # Warning about security changes...
- #
- ewarn "****************** Important changes warning! *********************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/asterisk"
- ewarn
- ewarn "- More information at the end of this emerge"
- ewarn
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
- ewarn
- einfo "Press Ctrl+C to abort"
- echo
- ebeep
-
- n=15
- while [[ $n -gt 0 ]]; do
- echo -en " Waiting $n seconds...\r"
- sleep 1
- (( n-- ))
- done
-
- #
- # Regular checks
- #
- einfo "Running some pre-flight checks..."
- if use resperl; then
- # res_perl pre-flight check...
- if ! $(perl -V | grep -q "usemultiplicity=define") ||\
- ! built_with_use dev-lang/perl ithreads || ! built_with_use sys-devel/libperl ithreads
- then
- eerror "Embedded perl add-on needs Perl and libperl with built-in threads support"
- eerror "(rebuild perl and libperl with ithreads use-flag enabled)"
- die "Perl w/o threads support..."
- fi
- einfo "Perl with ithreads support found"
- fi
-
-
- # mysql and postgres voicemail support are mutually exclusive..
- if use vmdbmysql && use vmdbpostgres; then
- eerror "MySQL and PostgreSQL Voicemail support are mutually exclusive... choose one!"
- die "Conflicting use-flags"
- fi
-
- # check if zaptel and libpri have been built with bri enabled
- if use bri; then
- if ! built_with_use net-misc/zaptel bri; then
- eerror "Re-emerge zaptel with bri use-flag enabled!"
- die "Zaptel without bri support detected"
- fi
-
- if ! built_with_use net-libs/libpri bri; then
- eerror "Re-emerge libpri with bri use-flag enabled!"
- die "Libpri without bri support detected"
- fi
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- # set cflags & mmx optimization
- sed -i -e "s:^\(OPTIMIZE+=\).*:\1 ${CFLAGS}:" \
- -e "s:^\(CFLAGS+=\$(shell if \$(CC)\):#\1:" \
- Makefile
-
- # gsm codec still uses -fomit-frame-pointer, and other codecs have their
- # own flags. We only change the arch.
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \
- -e "s:^CFLAGS[\t ]\++=:CFLAGS =:" \
- codecs/gsm/Makefile
-
- # hppa patch for gsm codec
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-hppa.patch
-
- if use mmx; then
- if ! use hardened; then
- einfo "Enabling mmx optimization"
- sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \
- codecs/gsm/Makefile
- else
- ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!"
-
- fi
- fi
- if ! use mmx || use hardened; then
- # don't build + link asm mmx object file
- # without this codec_gsm.so will include text relocations
- sed -i -e "/k6opt\.\(s\|o\)/ d" \
- codecs/gsm/Makefile
- fi
-
- if ! use debug; then
- einfo "Disabling debugging"
- sed -i -e "s:^\(DEBUG=\):#\1:" Makefile
- fi
-
- # change image path in voicemail cgi
- sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
-
- #
- # embedded perl
- #
- if use resperl; then
- einfo "Patching asterisk for embedded perl support..."
- epatch ${S_ADDONS}/res_perl/astmake.diff
-
- # create necessary .c file
- /usr/bin/perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c"
-
- cd ${S_ADDONS}
-
- # fix perl path, source location and remove res_musiconhold
- sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
- res_perl/Makefile \
- ${S}/Makefile \
- res_perl/INC/*.pm
- sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
- -e "s:\$(ASTLIBDIR)/modules/res_musiconhold.so::" \
- res_perl/Makefile
-
- if use bri; then
- epatch ${FILESDIR}/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff
- fi
-
- cd ${S}
- fi
-
- #
- # uclibc patch
- #
- if use elibc_uclibc; then
- einfo "Patching asterisk for uclibc..."
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-uclibc-dns.diff
- fi
-
- #
- # other patches
- #
-
- # fix lpc10 Makefile, remove the
- # CFLAGS+=-march=$(shell uname -m) part
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-lpc10flags.diff
-
- # asterisk-config
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-astcfg-0.0.2.diff
-
- #
- # database voicemail support
- #
- if use postgres; then
- sed -i -e "s:^#\(APPS+=app_sql_postgres.so\):\1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
- fi
-
- if use vmdbpostgres; then
- einfo "Enabling PostgreSQL voicemail support"
- sed -i -e "s:^\(USE_POSTGRES_VM_INTERFACE\).*:\1=1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
-
- # patch app_voicemail.c
- sed -i -e "s:^#include <postgresql/libpq-fe\.h>:#include \"libpq-fe\.h\":" \
- apps/app_voicemail.c
-
- elif use vmdbmysql; then
- einfo "Enabling MySQL voicemail support"
- sed -i -e "s:^\(USE_MYSQL_VM_INTERFACE\).*:\1=1:" \
- -e "s:^\(CFLAGS+=-DUSEMYSQLVM\):\1 -I${S_ADDONS}:" \
- apps/Makefile
- fi
-
- #
- # asterisk add-ons
- #
- cd ${S_ADDONS}
- sed -i -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" \
- -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include -fPIC \2:" \
- format_mp3/Makefile
-
-
- #
- # BRI patches
- #
- if use bri; then
- cd ${S}
- einfo "Patching asterisk w/ BRI stuff"
-
- epatch ${WORKDIR}/bristuff-${BRI_VERSION}/patches/asterisk.patch
- fi
-
- #
- # Revived snmp plugin support
- #
-# if use snmp; then
-# cd ${S}
-# einfo "Patching snmp plugin helper functions"
-# epatch ${FILESDIR}/1.0.0/ast-ax-snmp-1.0.6.diff
-# fi
-
- # fix path for non-root
- cd ${S}
- sed -i -e "s:^\(ASTVARRUNDIR=\).*:\1\$(INSTALL_PREFIX)/var/run/asterisk:" \
- Makefile
-
- # fix contrib scripts for non-root
- epatch ${FILESDIR}/1.0.0/${P}-scripts.diff
-
- # add initgroups support to asterisk, this is needed
- # to support supplementary groups for the asterisk
- # user (start-stop-daemons --chguid breaks realtime priority support)
- epatch ${FILESDIR}/1.0.0/${P}-initgroups.diff
-
- # security fix (www.portcullis-security.com/advisory/advisory-05-013.txt)
- epatch ${FILESDIR}/1.0.0/${P}-manager-cli-segv.patch
-
- # fix segfault on amd64 and possibly other 64bit systems (#105762)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-ptr64fix.diff
-
- # security fix, bug #111836
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-vmail.cgi.patch
-}
-
-src_compile() {
- # build asterisk first...
- einfo "Building Asterisk..."
- cd ${S}
- emake -j1 || die "Make failed"
-
- # create api docs
- use doc && \
- emake -j1 progdocs
-
- #
- # add-ons
- #
- einfo "Building additional stuff..."
- cd ${S_ADDONS}
- emake -j1 || die "Make failed"
-
- if use resperl; then
- cd ${S_ADDONS}/res_perl
- emake -j1 || die "Building embedded perl failed"
- fi
-}
-
-src_install() {
- make DESTDIR=${D} install || die "Make install failed"
- make DESTDIR=${D} samples || die "Make install samples failed"
-
- # install astconf.h, a lot of external modules need this
- insinto /usr/include/asterisk
- doins astconf.h
-
- # install addmailbox and astgenkey
- dosbin contrib/scripts/addmailbox
- dosbin contrib/scripts/astgenkey
-
- newinitd ${FILESDIR}/1.0.0/asterisk.rc6.sec asterisk
- newconfd ${FILESDIR}/1.0.0/asterisk.confd.sec asterisk
-
- # don't delete these, even if they are empty
- keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
- keepdir /var/spool/asterisk/tmp
- keepdir /var/log/asterisk/cdr-csv
- keepdir /var/run/asterisk
-
- # install standard docs...
- dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm
- dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README
- dodoc doc/README.*
- dodoc doc/*.txt
-
- docinto scripts
- dodoc contrib/scripts/*
- docinto firmware/iax
- dodoc contrib/firmware/iax/*
-
- # 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
-
- #
- # add-ons
- #
-
- # install additional modules...
- einfo "Installing additional modules..."
- cd ${S_ADDONS}
- make INSTALL_PREFIX=${D} install || die "Make install failed"
-
- if use resperl; then
- perlinfo
-
- cd ${S_ADDONS}/res_perl
- make INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed"
-
- # move AstApiBase.so to a proper place
- dodir ${VENDOR_LIB}/auto/AstAPIBase
- mv ${D}/etc/asterisk/perl/AstAPIBase.so ${D}${VENDOR_LIB}/auto/AstAPIBase
-
- # move *.pm files to other location
- dodir ${VENDOR_LIB}/AstAPI
- dodir ${VENDOR_LIB}/AstAPIBase
- for x in AstAPI.pm AstConfig.pm LoadFile.pm PerlSwitch.pm WebServer.pm; do
- mv ${D}/etc/asterisk/perl/${x} ${D}${VENDOR_LIB}/AstAPI
- dosed "s/^use[\t ]\+${x/.pm/};/use AstAPI::${x/.pm/};/" /etc/asterisk/perl/asterisk_init.pm
- done
- mv ${D}/etc/asterisk/perl/AstAPIBase.pm ${D}${VENDOR_LIB}/AstAPIBase
- dosed "s/^use[\t ]\+AstAPI;/use AstAPI::AstAPI;/" /etc/asterisk/perl/asterisk_init.pm
- dosed "s/^use[\t ]\+AstAPIBase;/use AstAPIBase::AstAPIBase;/" ${VENDOR_LIB}/AstAPI/AstAPI.pm
-
- # move apps + htdocs to a proper place
- dodir /var/lib/asterisk/perl
- mv ${D}/etc/asterisk/perl/{apps,htdocs} ${D}/var/lib/asterisk/perl
-
- # fix locations
- sed -i -e "s:/etc/asterisk/perl:/var/lib/asterisk/perl:" \
- ${D}${VENDOR_LIB}/AstAPI/LoadFile.pm ${D}${VENDOR_LIB}/AstAPI/WebServer.pm
- fi
-}
-
-pkg_preinst() {
- einfo "Adding asterisk user and group"
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk asterisk
-}
-
-pkg_postinst() {
- #
- # Change permissions and ownerships of asterisk
- # directories and files
- #
- einfo "Fixing permissions and ownerships"
- # fix permissions in /var/...
- 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
-
- #
- # Fix locations of old installations (pre-non-root versions)
- #
- if [[ -z "$(grep "/var/run/asterisk" ${ROOT}etc/asterisk/asterisk.conf)" ]]
- then
- einfo "Fixing astrundir in ${ROOT}etc/asterisk/asterisk.conf"
- mv -f ${ROOT}etc/asterisk/asterisk.conf \
- ${ROOT}etc/asterisk/asterisk.conf.bak
- sed -e "s:^\(astrundir[\t ]=>\).*:\1 /var/run/asterisk:" \
- ${ROOT}etc/asterisk/asterisk.conf.bak >\
- ${ROOT}etc/asterisk/asterisk.conf
- einfo "Backup has been saved as ${ROOT}etc/asterisk/asterisk.conf.bak"
- fi
-
- #
- # Some messages
- #
- einfo "Asterisk has been installed"
- einfo ""
- einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
- einfo ""
- einfo "If you want to know more about asterisk, visit these sites:"
- einfo "http://www.asteriskdocs.org/"
- einfo "http://www.voip-info.org/wiki-Asterisk"
- echo
- einfo "http://asterisk.xvoip.com/"
- einfo "http://junghanns.net/asterisk/"
- einfo "http://www.automated.it/guidetoasterisk.htm"
- echo
- einfo "Gentoo VoIP IRC Channel:"
- einfo "#gentoo-voip @ irc.freenode.net"
-
- #
- # Warning about security changes...
- #
- ewarn "*********************** Important changes **************************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Make sure the asterisk user is a member of the proper groups if you want it"
- ewarn " to have access to hardware devices, e.g. \"audio\" for Alsa and OSS sound or"
- ewarn " \"dialout\" for zaptel!"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (rwxr-x--- directories) / 640 (rw-r----- files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 / 640"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/astrisk"
- ewarn
- ewarn "- Asterisk cannot set the IP ToS bits when run as user,"
- ewarn " use something like this to make iptables set them for you:"
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28\""
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28\""
- ewarn " (taken from voip-info.org comments (see below), thanks andrewid)"
- ewarn
- ewarn "For more details:"
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
-}
diff --git a/net-misc/asterisk/asterisk-1.0.8-r1.ebuild b/net-misc/asterisk/asterisk-1.0.8-r1.ebuild
deleted file mode 100644
index b4332dd14cb1..000000000000
--- a/net-misc/asterisk/asterisk-1.0.8-r1.ebuild
+++ /dev/null
@@ -1,473 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.8-r1.ebuild,v 1.3 2006/03/06 03:45:05 stkn Exp $
-
-inherit eutils perl-app
-
-ADDONS_VERSION="1.0.8"
-BRI_VERSION="0.2.0-RC8h"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${P}.tar.gz
- ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${PN}-addons-${ADDONS_VERSION}.tar.gz
- bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )"
-
-S_ADDONS=${WORKDIR}/${PN}-addons-${ADDONS_VERSION}
-
-IUSE="alsa doc gtk mmx mysql pri zaptel debug postgres vmdbmysql vmdbpostgres bri hardened speex resperl"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="x86 sparc ~hppa ~amd64 ~ppc"
-
-DEPEND="dev-libs/newt
- dev-libs/openssl
- media-sound/mpg123
- media-sound/sox
- doc? ( app-doc/doxygen )
- gtk? ( =x11-libs/gtk+-1.2* )
- pri? ( >=net-libs/libpri-1.0.8 )
- bri? ( >=net-libs/libpri-1.0.8
- >=net-misc/zaptel-1.0.8 )
- alsa? ( media-libs/alsa-lib )
- mysql? ( dev-db/mysql )
- speex? ( media-libs/speex )
- zaptel? ( >=net-misc/zaptel-1.0.8 )
- postgres? ( dev-db/postgresql )
- vmdbmysql? ( dev-db/mysql )
- vmdbpostgres? ( dev-db/postgresql )
- resperl? ( dev-lang/perl
- >=net-misc/zaptel-1.0.8 )"
-
-pkg_setup() {
- local n
-
- #
- # Warning about security changes...
- #
- ewarn "****************** Important changes warning! *********************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/asterisk"
- ewarn
- ewarn "- More information at the end of this emerge"
- ewarn
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
- ewarn
- einfo "Press Ctrl+C to abort"
- echo
- ebeep
-
- n=15
- while [[ $n -gt 0 ]]; do
- echo -en " Waiting $n seconds...\r"
- sleep 1
- (( n-- ))
- done
-
- #
- # Regular checks
- #
- einfo "Running some pre-flight checks..."
- if use resperl; then
- # res_perl pre-flight check...
- if ! $(perl -V | grep -q "usemultiplicity=define") ||\
- ! built_with_use dev-lang/perl ithreads || ! built_with_use sys-devel/libperl ithreads
- then
- eerror "Embedded perl add-on needs Perl and libperl with built-in threads support"
- eerror "(rebuild perl and libperl with ithreads use-flag enabled)"
- die "Perl w/o threads support..."
- fi
- einfo "Perl with ithreads support found"
- fi
-
-
- # mysql and postgres voicemail support are mutually exclusive..
- if use vmdbmysql && use vmdbpostgres; then
- eerror "MySQL and PostgreSQL Voicemail support are mutually exclusive... choose one!"
- die "Conflicting use-flags"
- fi
-
- # check if zaptel and libpri have been built with bri enabled
- if use bri; then
- if ! built_with_use net-misc/zaptel bri; then
- eerror "Re-emerge zaptel with bri use-flag enabled!"
- die "Zaptel without bri support detected"
- fi
-
- if ! built_with_use net-libs/libpri bri; then
- eerror "Re-emerge libpri with bri use-flag enabled!"
- die "Libpri without bri support detected"
- fi
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- # set cflags & mmx optimization
- sed -i -e "s:^\(OPTIMIZE+=\).*:\1 ${CFLAGS}:" \
- -e "s:^\(CFLAGS+=\$(shell if \$(CC)\):#\1:" \
- Makefile
-
- # hppa patch for gsm codec
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-hppa.patch
-
- # mark adsi functions as weak references, things will blow
- # on hardened otherwise (bug #100697 and possibly #85655)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-weak-references.diff
-
- # gsm codec still uses -fomit-frame-pointer, and other codecs have their
- # own flags. We only change the arch.
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \
- -e "s:^CFLAGS[\t ]\++=:CFLAGS =:" \
- codecs/gsm/Makefile
-
- if use mmx; then
- if ! use hardened; then
- einfo "Enabling mmx optimization"
- sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \
- codecs/gsm/Makefile
- else
- ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!"
-
- fi
- fi
- if ! use mmx || use hardened; then
- # don't build + link asm mmx object file
- # without this codec_gsm.so will include text relocations
- sed -i -e "/k6opt\.\(s\|o\)/ d" \
- codecs/gsm/Makefile
- fi
-
- if ! use debug; then
- einfo "Disabling debugging"
- sed -i -e "s:^\(DEBUG=\):#\1:" Makefile
- fi
-
- # change image path in voicemail cgi
- sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
-
- #
- # embedded perl
- #
- if use resperl; then
- einfo "Patching asterisk for embedded perl support..."
- epatch ${S_ADDONS}/res_perl/astmake.diff
-
- # create necessary .c file
- /usr/bin/perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c"
-
- cd ${S_ADDONS}
-
- # fix perl path, source location and remove res_musiconhold
- sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
- res_perl/Makefile \
- ${S}/Makefile \
- res_perl/INC/*.pm
- sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
- -e "s:\$(ASTLIBDIR)/modules/res_musiconhold.so::" \
- res_perl/Makefile
-
- if use bri; then
- epatch ${FILESDIR}/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff
- fi
-
- cd ${S}
- fi
-
- #
- # uclibc patch
- #
- if use elibc_uclibc; then
- einfo "Patching asterisk for uclibc..."
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-uclibc-dns.diff
- fi
-
- #
- # other patches
- #
-
- # fix lpc10 Makefile, remove the
- # CFLAGS+=-march=$(shell uname -m) part
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-lpc10flags.diff
-
- # asterisk-config
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-astcfg-0.0.2.diff
-
- #
- # database voicemail support
- #
- if use postgres; then
- sed -i -e "s:^#\(APPS+=app_sql_postgres.so\):\1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
- fi
-
- if use vmdbpostgres; then
- einfo "Enabling PostgreSQL voicemail support"
- sed -i -e "s:^\(USE_POSTGRES_VM_INTERFACE\).*:\1=1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
-
- # patch app_voicemail.c
- sed -i -e "s:^#include <postgresql/libpq-fe\.h>:#include \"libpq-fe\.h\":" \
- apps/app_voicemail.c
-
- elif use vmdbmysql; then
- einfo "Enabling MySQL voicemail support"
- sed -i -e "s:^\(USE_MYSQL_VM_INTERFACE\).*:\1=1:" \
- -e "s:^\(CFLAGS+=-DUSEMYSQLVM\):\1 -I${S_ADDONS}:" \
- apps/Makefile
- fi
-
- #
- # asterisk add-ons
- #
- cd ${S_ADDONS}
- sed -i -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" \
- -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include -fPIC \2:" \
- format_mp3/Makefile
-
-
- #
- # BRI patches
- #
- if use bri; then
- cd ${S}
- einfo "Patching asterisk w/ BRI stuff"
-
- epatch ${WORKDIR}/bristuff-${BRI_VERSION}/patches/asterisk.patch
- fi
-
- #
- # Revived snmp plugin support
- #
-# if use snmp; then
-# cd ${S}
-# einfo "Patching snmp plugin helper functions"
-# epatch ${FILESDIR}/1.0.0/ast-ax-snmp-1.0.6.diff
-# fi
-
- # fix path for non-root
- cd ${S}
- sed -i -e "s:^\(ASTVARRUNDIR=\).*:\1\$(INSTALL_PREFIX)/var/run/asterisk:" \
- Makefile
-
- # fix contrib scripts for non-root
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.7-scripts.diff
-
- # add initgroups support to asterisk, this is needed
- # to support supplementary groups for the asterisk
- # user (start-stop-daemons --chguid breaks realtime priority support)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-initgroups.diff
-
- # fix callerid matching bug in dialplan
- epatch ${FILESDIR}/1.0.0/${P}-callerid.patch
-
- # fix segfault on amd64 and possibly other 64bit systems (#105762)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-ptr64fix.diff
-
- # security fix, bug #11836
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-vmail.cgi.patch
-}
-
-src_compile() {
- # build asterisk first...
- einfo "Building Asterisk..."
- cd ${S}
- emake -j1 || die "Make failed"
-
- # create api docs
- use doc && \
- emake -j1 progdocs
-
- #
- # add-ons
- #
- einfo "Building additional stuff..."
- cd ${S_ADDONS}
- emake -j1 || die "Make failed"
-
- if use resperl; then
- cd ${S_ADDONS}/res_perl
- emake -j1 || die "Building embedded perl failed"
- fi
-}
-
-src_install() {
- make DESTDIR=${D} install || die "Make install failed"
- make DESTDIR=${D} samples || die "Make install samples failed"
-
- # install astconf.h, a lot of external modules need this
- insinto /usr/include/asterisk
- doins astconf.h
-
- # install addmailbox and astgenkey
- dosbin contrib/scripts/addmailbox
- dosbin contrib/scripts/astgenkey
-
- newinitd ${FILESDIR}/1.0.0/asterisk.rc6.sec asterisk
- newconfd ${FILESDIR}/1.0.0/asterisk.confd.sec asterisk
-
- # don't delete these, even if they are empty
- keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
- keepdir /var/spool/asterisk/tmp
- keepdir /var/log/asterisk/cdr-csv
- keepdir /var/run/asterisk
-
- # install standard docs...
- dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm
- dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README
- dodoc doc/README.*
- dodoc doc/*.txt
-
- docinto scripts
- dodoc contrib/scripts/*
- docinto firmware/iax
- dodoc contrib/firmware/iax/*
-
- # 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
-
- #
- # add-ons
- #
-
- # install additional modules...
- einfo "Installing additional modules..."
- cd ${S_ADDONS}
- make INSTALL_PREFIX=${D} install || die "Make install failed"
-
- if use resperl; then
- perlinfo
-
- cd ${S_ADDONS}/res_perl
- make INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed"
-
- # move AstApiBase.so to a proper place
- dodir ${VENDOR_LIB}/auto/AstAPIBase
- mv ${D}/etc/asterisk/perl/AstAPIBase.so ${D}${VENDOR_LIB}/auto/AstAPIBase
-
- # move *.pm files to other location
- dodir ${VENDOR_LIB}/AstAPI
- dodir ${VENDOR_LIB}/AstAPIBase
- for x in AstAPI.pm AstConfig.pm LoadFile.pm PerlSwitch.pm WebServer.pm; do
- mv ${D}/etc/asterisk/perl/${x} ${D}${VENDOR_LIB}/AstAPI
- dosed "s/^use[\t ]\+${x/.pm/};/use AstAPI::${x/.pm/};/" /etc/asterisk/perl/asterisk_init.pm
- done
- mv ${D}/etc/asterisk/perl/AstAPIBase.pm ${D}${VENDOR_LIB}/AstAPIBase
- dosed "s/^use[\t ]\+AstAPI;/use AstAPI::AstAPI;/" /etc/asterisk/perl/asterisk_init.pm
- dosed "s/^use[\t ]\+AstAPIBase;/use AstAPIBase::AstAPIBase;/" ${VENDOR_LIB}/AstAPI/AstAPI.pm
-
- # move apps + htdocs to a proper place
- dodir /var/lib/asterisk/perl
- mv ${D}/etc/asterisk/perl/{apps,htdocs} ${D}/var/lib/asterisk/perl
-
- # fix locations
- sed -i -e "s:/etc/asterisk/perl:/var/lib/asterisk/perl:" \
- ${D}${VENDOR_LIB}/AstAPI/LoadFile.pm ${D}${VENDOR_LIB}/AstAPI/WebServer.pm
- fi
-}
-
-pkg_preinst() {
- einfo "Adding asterisk user and group"
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk asterisk
-}
-
-pkg_postinst() {
- #
- # Change permissions and ownerships of asterisk
- # directories and files
- #
- einfo "Fixing permissions and ownerships"
- # fix permissions in /var/...
- 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
-
- #
- # Fix locations for old installations (pre-non-root versions)
- #
- if [[ -z "$(grep "/var/run/asterisk" ${ROOT}etc/asterisk/asterisk.conf)" ]]
- then
- einfo "Fixing astrundir in ${ROOT}etc/asterisk/asterisk.conf"
- mv -f ${ROOT}etc/asterisk/asterisk.conf \
- ${ROOT}etc/asterisk/asterisk.conf.bak
- sed -e "s:^\(astrundir[\t ]=>\).*:\1 /var/run/asterisk:" \
- ${ROOT}etc/asterisk/asterisk.conf.bak >\
- ${ROOT}etc/asterisk/asterisk.conf
- einfo "Backup has been saved as ${ROOT}etc/asterisk/asterisk.conf.bak"
- fi
-
- #
- # Some messages
- #
- einfo "Asterisk has been installed"
- einfo ""
- einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
- einfo ""
- einfo "If you want to know more about asterisk, visit these sites:"
- einfo "http://www.asteriskdocs.org/"
- einfo "http://www.voip-info.org/wiki-Asterisk"
- echo
- einfo "http://asterisk.xvoip.com/"
- einfo "http://junghanns.net/asterisk/"
- einfo "http://www.automated.it/guidetoasterisk.htm"
- echo
- einfo "Gentoo VoIP IRC Channel:"
- einfo "#gentoo-voip @ irc.freenode.net"
-
- #
- # Warning about security changes...
- #
- ewarn "*********************** Important changes **************************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Make sure the asterisk user is a member of the proper groups if you want it"
- ewarn " to have access to hardware devices, e.g. \"audio\" for Alsa and OSS sound or"
- ewarn " \"dialout\" for zaptel!"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (rwxr-x--- directories) / 640 (rw-r----- files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 / 640"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/astrisk"
- ewarn
- ewarn "- Asterisk cannot set the IP ToS bits when run as user,"
- ewarn " use something like this to make iptables set them for you:"
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28\""
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28\""
- ewarn " (taken from voip-info.org comments (see below), thanks andrewid)"
- ewarn
- ewarn "For more details:"
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
-}
diff --git a/net-misc/asterisk/asterisk-1.0.8-r2.ebuild b/net-misc/asterisk/asterisk-1.0.8-r2.ebuild
deleted file mode 100644
index fd708a520828..000000000000
--- a/net-misc/asterisk/asterisk-1.0.8-r2.ebuild
+++ /dev/null
@@ -1,473 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.8-r2.ebuild,v 1.3 2006/03/06 14:25:49 gustavoz Exp $
-
-inherit eutils perl-app
-
-ADDONS_VERSION="1.0.8"
-BRI_VERSION="0.2.0-RC8h"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${P}.tar.gz
- ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${PN}-addons-${ADDONS_VERSION}.tar.gz
- bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )"
-
-S_ADDONS=${WORKDIR}/${PN}-addons-${ADDONS_VERSION}
-
-IUSE="alsa doc gtk mmx mysql pri zaptel debug postgres vmdbmysql vmdbpostgres bri hardened speex resperl"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~x86 sparc ~hppa ~amd64 ~ppc"
-
-DEPEND="dev-libs/newt
- dev-libs/openssl
- media-sound/mpg123
- media-sound/sox
- doc? ( app-doc/doxygen )
- gtk? ( =x11-libs/gtk+-1.2* )
- pri? ( >=net-libs/libpri-1.0.8 )
- bri? ( >=net-libs/libpri-1.0.8
- >=net-misc/zaptel-1.0.8 )
- alsa? ( media-libs/alsa-lib )
- mysql? ( dev-db/mysql )
- speex? ( media-libs/speex )
- zaptel? ( >=net-misc/zaptel-1.0.8 )
- postgres? ( dev-db/postgresql )
- vmdbmysql? ( dev-db/mysql )
- vmdbpostgres? ( dev-db/postgresql )
- resperl? ( dev-lang/perl
- >=net-misc/zaptel-1.0.8 )"
-
-pkg_setup() {
- local n
-
- #
- # Warning about security changes...
- #
- ewarn "****************** Important changes warning! *********************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/asterisk"
- ewarn
- ewarn "- More information at the end of this emerge"
- ewarn
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
- ewarn
- einfo "Press Ctrl+C to abort"
- echo
- ebeep
-
- n=15
- while [[ $n -gt 0 ]]; do
- echo -en " Waiting $n seconds...\r"
- sleep 1
- (( n-- ))
- done
-
- #
- # Regular checks
- #
- einfo "Running some pre-flight checks..."
- if use resperl; then
- # res_perl pre-flight check...
- if ! $(perl -V | grep -q "usemultiplicity=define") ||\
- ! built_with_use dev-lang/perl ithreads || ! built_with_use sys-devel/libperl ithreads
- then
- eerror "Embedded perl add-on needs Perl and libperl with built-in threads support"
- eerror "(rebuild perl and libperl with ithreads use-flag enabled)"
- die "Perl w/o threads support..."
- fi
- einfo "Perl with ithreads support found"
- fi
-
-
- # mysql and postgres voicemail support are mutually exclusive..
- if use vmdbmysql && use vmdbpostgres; then
- eerror "MySQL and PostgreSQL Voicemail support are mutually exclusive... choose one!"
- die "Conflicting use-flags"
- fi
-
- # check if zaptel and libpri have been built with bri enabled
- if use bri; then
- if ! built_with_use net-misc/zaptel bri; then
- eerror "Re-emerge zaptel with bri use-flag enabled!"
- die "Zaptel without bri support detected"
- fi
-
- if ! built_with_use net-libs/libpri bri; then
- eerror "Re-emerge libpri with bri use-flag enabled!"
- die "Libpri without bri support detected"
- fi
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- # set cflags & mmx optimization
- sed -i -e "s:^\(OPTIMIZE+=\).*:\1 ${CFLAGS}:" \
- -e "s:^\(CFLAGS+=\$(shell if \$(CC)\):#\1:" \
- Makefile
-
- # hppa patch for gsm codec
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-hppa.patch
-
- # mark adsi functions as weak references, things will blow
- # on hardened otherwise (bug #100697 and possibly #85655)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-weak-references.diff
-
- # gsm codec still uses -fomit-frame-pointer, and other codecs have their
- # own flags. We only change the arch.
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \
- -e "s:^CFLAGS[\t ]\++=:CFLAGS =:" \
- codecs/gsm/Makefile
-
- if use mmx; then
- if ! use hardened; then
- einfo "Enabling mmx optimization"
- sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \
- codecs/gsm/Makefile
- else
- ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!"
-
- fi
- fi
- if ! use mmx || use hardened; then
- # don't build + link asm mmx object file
- # without this codec_gsm.so will include text relocations
- sed -i -e "/k6opt\.\(s\|o\)/ d" \
- codecs/gsm/Makefile
- fi
-
- if ! use debug; then
- einfo "Disabling debugging"
- sed -i -e "s:^\(DEBUG=\):#\1:" Makefile
- fi
-
- # change image path in voicemail cgi
- sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
-
- #
- # embedded perl
- #
- if use resperl; then
- einfo "Patching asterisk for embedded perl support..."
- epatch ${S_ADDONS}/res_perl/astmake.diff
-
- # create necessary .c file
- /usr/bin/perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c"
-
- cd ${S_ADDONS}
-
- # fix perl path, source location and remove res_musiconhold
- sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
- res_perl/Makefile \
- ${S}/Makefile \
- res_perl/INC/*.pm
- sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
- -e "s:\$(ASTLIBDIR)/modules/res_musiconhold.so::" \
- res_perl/Makefile
-
- if use bri; then
- epatch ${FILESDIR}/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff
- fi
-
- cd ${S}
- fi
-
- #
- # uclibc patch
- #
- if use elibc_uclibc; then
- einfo "Patching asterisk for uclibc..."
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-uclibc-dns.diff
- fi
-
- #
- # other patches
- #
-
- # fix lpc10 Makefile, remove the
- # CFLAGS+=-march=$(shell uname -m) part
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-lpc10flags.diff
-
- # asterisk-config
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-astcfg-0.0.2.diff
-
- #
- # database voicemail support
- #
- if use postgres; then
- sed -i -e "s:^#\(APPS+=app_sql_postgres.so\):\1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
- fi
-
- if use vmdbpostgres; then
- einfo "Enabling PostgreSQL voicemail support"
- sed -i -e "s:^\(USE_POSTGRES_VM_INTERFACE\).*:\1=1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
-
- # patch app_voicemail.c
- sed -i -e "s:^#include <postgresql/libpq-fe\.h>:#include \"libpq-fe\.h\":" \
- apps/app_voicemail.c
-
- elif use vmdbmysql; then
- einfo "Enabling MySQL voicemail support"
- sed -i -e "s:^\(USE_MYSQL_VM_INTERFACE\).*:\1=1:" \
- -e "s:^\(CFLAGS+=-DUSEMYSQLVM\):\1 -I${S_ADDONS}:" \
- apps/Makefile
- fi
-
- #
- # asterisk add-ons
- #
- cd ${S_ADDONS}
- sed -i -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" \
- -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include -fPIC \2:" \
- format_mp3/Makefile
-
-
- #
- # BRI patches
- #
- if use bri; then
- cd ${S}
- einfo "Patching asterisk w/ BRI stuff"
-
- epatch ${WORKDIR}/bristuff-${BRI_VERSION}/patches/asterisk.patch
- fi
-
- #
- # Revived snmp plugin support
- #
-# if use snmp; then
-# cd ${S}
-# einfo "Patching snmp plugin helper functions"
-# epatch ${FILESDIR}/1.0.0/ast-ax-snmp-1.0.6.diff
-# fi
-
- # fix path for non-root
- cd ${S}
- sed -i -e "s:^\(ASTVARRUNDIR=\).*:\1\$(INSTALL_PREFIX)/var/run/asterisk:" \
- Makefile
-
- # fix contrib scripts for non-root
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.7-scripts.diff
-
- # add initgroups support to asterisk, this is needed
- # to support supplementary groups for the asterisk
- # user (start-stop-daemons --chguid breaks realtime priority support)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-initgroups.diff
-
- # fix callerid matching bug in dialplan
- epatch ${FILESDIR}/1.0.0/${P}-callerid.patch
-
- # fix segfault on amd64 and possibly other 64bit systems (#105762)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-ptr64fix.diff
-
- # security fix, bug #111836
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-vmail.cgi.patch
-}
-
-src_compile() {
- # build asterisk first...
- einfo "Building Asterisk..."
- cd ${S}
- emake -j1 || die "Make failed"
-
- # create api docs
- use doc && \
- emake -j1 progdocs
-
- #
- # add-ons
- #
- einfo "Building additional stuff..."
- cd ${S_ADDONS}
- emake -j1 || die "Make failed"
-
- if use resperl; then
- cd ${S_ADDONS}/res_perl
- emake -j1 || die "Building embedded perl failed"
- fi
-}
-
-src_install() {
- make DESTDIR=${D} install || die "Make install failed"
- make DESTDIR=${D} samples || die "Make install samples failed"
-
- # install astconf.h, a lot of external modules need this
- insinto /usr/include/asterisk
- doins astconf.h
-
- # install addmailbox and astgenkey
- dosbin contrib/scripts/addmailbox
- dosbin contrib/scripts/astgenkey
-
- newinitd ${FILESDIR}/1.0.0/asterisk.rc6.sec asterisk
- newconfd ${FILESDIR}/1.0.0/asterisk.confd.sec asterisk
-
- # don't delete these, even if they are empty
- keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
- keepdir /var/spool/asterisk/tmp
- keepdir /var/log/asterisk/cdr-csv
- keepdir /var/run/asterisk
-
- # install standard docs...
- dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm
- dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README
- dodoc doc/README.*
- dodoc doc/*.txt
-
- docinto scripts
- dodoc contrib/scripts/*
- docinto firmware/iax
- dodoc contrib/firmware/iax/*
-
- # 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
-
- #
- # add-ons
- #
-
- # install additional modules...
- einfo "Installing additional modules..."
- cd ${S_ADDONS}
- make INSTALL_PREFIX=${D} install || die "Make install failed"
-
- if use resperl; then
- perlinfo
-
- cd ${S_ADDONS}/res_perl
- make INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed"
-
- # move AstApiBase.so to a proper place
- dodir ${VENDOR_LIB}/auto/AstAPIBase
- mv ${D}/etc/asterisk/perl/AstAPIBase.so ${D}${VENDOR_LIB}/auto/AstAPIBase
-
- # move *.pm files to other location
- dodir ${VENDOR_LIB}/AstAPI
- dodir ${VENDOR_LIB}/AstAPIBase
- for x in AstAPI.pm AstConfig.pm LoadFile.pm PerlSwitch.pm WebServer.pm; do
- mv ${D}/etc/asterisk/perl/${x} ${D}${VENDOR_LIB}/AstAPI
- dosed "s/^use[\t ]\+${x/.pm/};/use AstAPI::${x/.pm/};/" /etc/asterisk/perl/asterisk_init.pm
- done
- mv ${D}/etc/asterisk/perl/AstAPIBase.pm ${D}${VENDOR_LIB}/AstAPIBase
- dosed "s/^use[\t ]\+AstAPI;/use AstAPI::AstAPI;/" /etc/asterisk/perl/asterisk_init.pm
- dosed "s/^use[\t ]\+AstAPIBase;/use AstAPIBase::AstAPIBase;/" ${VENDOR_LIB}/AstAPI/AstAPI.pm
-
- # move apps + htdocs to a proper place
- dodir /var/lib/asterisk/perl
- mv ${D}/etc/asterisk/perl/{apps,htdocs} ${D}/var/lib/asterisk/perl
-
- # fix locations
- sed -i -e "s:/etc/asterisk/perl:/var/lib/asterisk/perl:" \
- ${D}${VENDOR_LIB}/AstAPI/LoadFile.pm ${D}${VENDOR_LIB}/AstAPI/WebServer.pm
- fi
-}
-
-pkg_preinst() {
- einfo "Adding asterisk user and group"
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk asterisk
-}
-
-pkg_postinst() {
- #
- # Change permissions and ownerships of asterisk
- # directories and files
- #
- einfo "Fixing permissions and ownerships"
- # fix permissions in /var/...
- 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
-
- #
- # Fix locations for old installations (pre-non-root versions)
- #
- if [[ -z "$(grep "/var/run/asterisk" ${ROOT}etc/asterisk/asterisk.conf)" ]]
- then
- einfo "Fixing astrundir in ${ROOT}etc/asterisk/asterisk.conf"
- mv -f ${ROOT}etc/asterisk/asterisk.conf \
- ${ROOT}etc/asterisk/asterisk.conf.bak
- sed -e "s:^\(astrundir[\t ]=>\).*:\1 /var/run/asterisk:" \
- ${ROOT}etc/asterisk/asterisk.conf.bak >\
- ${ROOT}etc/asterisk/asterisk.conf
- einfo "Backup has been saved as ${ROOT}etc/asterisk/asterisk.conf.bak"
- fi
-
- #
- # Some messages
- #
- einfo "Asterisk has been installed"
- einfo ""
- einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
- einfo ""
- einfo "If you want to know more about asterisk, visit these sites:"
- einfo "http://www.asteriskdocs.org/"
- einfo "http://www.voip-info.org/wiki-Asterisk"
- echo
- einfo "http://asterisk.xvoip.com/"
- einfo "http://junghanns.net/asterisk/"
- einfo "http://www.automated.it/guidetoasterisk.htm"
- echo
- einfo "Gentoo VoIP IRC Channel:"
- einfo "#gentoo-voip @ irc.freenode.net"
-
- #
- # Warning about security changes...
- #
- ewarn "*********************** Important changes **************************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Make sure the asterisk user is a member of the proper groups if you want it"
- ewarn " to have access to hardware devices, e.g. \"audio\" for Alsa and OSS sound or"
- ewarn " \"dialout\" for zaptel!"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (rwxr-x--- directories) / 640 (rw-r----- files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 / 640"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/astrisk"
- ewarn
- ewarn "- Asterisk cannot set the IP ToS bits when run as user,"
- ewarn " use something like this to make iptables set them for you:"
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28\""
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28\""
- ewarn " (taken from voip-info.org comments (see below), thanks andrewid)"
- ewarn
- ewarn "For more details:"
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
-}
diff --git a/net-misc/asterisk/asterisk-1.0.9-r3.ebuild b/net-misc/asterisk/asterisk-1.0.9-r3.ebuild
deleted file mode 100644
index 9e21dd77a636..000000000000
--- a/net-misc/asterisk/asterisk-1.0.9-r3.ebuild
+++ /dev/null
@@ -1,475 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.0.9-r3.ebuild,v 1.1 2006/03/06 04:41:15 rajiv Exp $
-
-inherit eutils perl-app
-
-ADDONS_VERSION="1.0.9"
-BRI_VERSION="0.2.0-RC8n"
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${P}.tar.gz
- ftp://ftp.digium.com/pub/telephony/${PN}/old-releases/${PN}-addons-${ADDONS_VERSION}.tar.gz
- bri? ( http://www.junghanns.net/downloads/bristuff-${BRI_VERSION}.tar.gz )"
-
-S_ADDONS=${WORKDIR}/${PN}-addons-${ADDONS_VERSION}
-
-IUSE="alsa doc gtk mmx mysql pri zaptel debug postgres vmdbmysql vmdbpostgres bri hardened speex resperl"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~x86 ~sparc ~hppa ~amd64 ~ppc"
-
-DEPEND="dev-libs/newt
- dev-libs/openssl
- media-sound/mpg123
- media-sound/sox
- doc? ( app-doc/doxygen )
- gtk? ( =x11-libs/gtk+-1.2* )
- pri? ( >=net-libs/libpri-1.0.9 )
- bri? ( >=net-libs/libpri-1.0.9
- >=net-misc/zaptel-1.0.9 )
- alsa? ( media-libs/alsa-lib )
- mysql? ( dev-db/mysql )
- speex? ( media-libs/speex )
- zaptel? ( >=net-misc/zaptel-1.0.9 )
- postgres? ( dev-db/postgresql )
- vmdbmysql? ( dev-db/mysql )
- vmdbpostgres? ( dev-db/postgresql )
- resperl? ( dev-lang/perl
- >=net-misc/zaptel-1.0.9 )"
-
-pkg_setup() {
- local n
-
- #
- # Warning about security changes...
- #
- ewarn "****************** Important changes warning! *********************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 (directories) / 640 (files)"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/asterisk"
- ewarn
- ewarn "- More information at the end of this emerge"
- ewarn
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
- ewarn
- einfo "Press Ctrl+C to abort"
- echo
- ebeep
-
- n=15
- while [[ $n -gt 0 ]]; do
- echo -en " Waiting $n seconds...\r"
- sleep 1
- (( n-- ))
- done
-
- #
- # Regular checks
- #
- einfo "Running some pre-flight checks..."
- if use resperl; then
- # res_perl pre-flight check...
- if ! $(perl -V | grep -q "usemultiplicity=define") ||\
- ! built_with_use dev-lang/perl ithreads || ! built_with_use sys-devel/libperl ithreads
- then
- eerror "Embedded perl add-on needs Perl and libperl with built-in threads support"
- eerror "(rebuild perl and libperl with ithreads use-flag enabled)"
- die "Perl w/o threads support..."
- fi
- einfo "Perl with ithreads support found"
- fi
-
-
- # mysql and postgres voicemail support are mutually exclusive..
- if use vmdbmysql && use vmdbpostgres; then
- eerror "MySQL and PostgreSQL Voicemail support are mutually exclusive... choose one!"
- die "Conflicting use-flags"
- fi
-
- # check if zaptel and libpri have been built with bri enabled
- if use bri; then
- if ! built_with_use net-misc/zaptel bri; then
- eerror "Re-emerge zaptel with bri use-flag enabled!"
- die "Zaptel without bri support detected"
- fi
-
- if ! built_with_use net-libs/libpri bri; then
- eerror "Re-emerge libpri with bri use-flag enabled!"
- die "Libpri without bri support detected"
- fi
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- # set cflags & mmx optimization
- sed -i -e "s:^\(OPTIMIZE+=\).*:\1 ${CFLAGS}:" \
- -e "s:^\(CFLAGS+=\$(shell if \$(CC)\):#\1:" \
- Makefile
-
- # hppa patch for gsm codec
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-hppa.patch
-
- # mark adsi functions as weak references, things will blow
- # on hardened otherwise (bug #100697 and #85655)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.9-weak-references.diff
-
- # gsm codec still uses -fomit-frame-pointer, and other codecs have their
- # own flags. We only change the arch.
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE=${CFLAGS}:" \
- -e "s:^CFLAGS[\t ]\++=:CFLAGS =:" \
- codecs/gsm/Makefile
-
- if use mmx; then
- if ! use hardened; then
- einfo "Enabling mmx optimization"
- sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \
- codecs/gsm/Makefile
- else
- ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!"
-
- fi
- fi
- if ! use mmx || use hardened; then
- # don't build + link asm mmx object file
- # without this codec_gsm.so will include text relocations
- sed -i -e "/k6opt\.\(s\|o\)/ d" \
- codecs/gsm/Makefile
- fi
-
- if ! use debug; then
- einfo "Disabling debugging"
- sed -i -e "s:^\(DEBUG=\):#\1:" Makefile
- fi
-
- # change image path in voicemail cgi
- sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
-
- #
- # embedded perl
- #
- if use resperl; then
- einfo "Patching asterisk for embedded perl support..."
- epatch ${S_ADDONS}/res_perl/astmake.diff
-
- # create necessary .c file
- /usr/bin/perl -MExtUtils::Embed -e xsinit || die "Could not create perlxsi.c"
-
- cd ${S_ADDONS}
-
- # fix perl path, source location and remove res_musiconhold
- sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:" \
- res_perl/Makefile \
- ${S}/Makefile \
- res_perl/INC/*.pm
- sed -i -e "s:^ASTSRC.*:ASTSRC = ${S}:" \
- -e "s:\$(ASTLIBDIR)/modules/res_musiconhold.so::" \
- res_perl/Makefile
-
- if use bri; then
- epatch ${FILESDIR}/1.0.0/res_perl-1.0.7-bristuff-0.2.0.diff
- fi
-
- cd ${S}
- fi
-
- #
- # uclibc patch
- #
- if use elibc_uclibc; then
- einfo "Patching asterisk for uclibc..."
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-uclibc-dns.diff
- fi
-
- #
- # other patches
- #
-
- # fix lpc10 Makefile, remove the
- # CFLAGS+=-march=$(shell uname -m) part
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-lpc10flags.diff
-
- # asterisk-config
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.5-astcfg-0.0.2.diff
-
- #
- # database voicemail support
- #
- if use postgres; then
- sed -i -e "s:^#\(APPS+=app_sql_postgres.so\):\1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
- fi
-
- if use vmdbpostgres; then
- einfo "Enabling PostgreSQL voicemail support"
- sed -i -e "s:^\(USE_POSTGRES_VM_INTERFACE\).*:\1=1:" \
- -e "s:/usr/local/pgsql/include:/usr/include/postgresql/pgsql:" \
- -e "s:/usr/local/pgsql/lib:/usr/lib/postgresql:" \
- apps/Makefile
-
- # patch app_voicemail.c
- sed -i -e "s:^#include <postgresql/libpq-fe\.h>:#include \"libpq-fe\.h\":" \
- apps/app_voicemail.c
-
- elif use vmdbmysql; then
- einfo "Enabling MySQL voicemail support"
- sed -i -e "s:^\(USE_MYSQL_VM_INTERFACE\).*:\1=1:" \
- -e "s:^\(CFLAGS+=-DUSEMYSQLVM\):\1 -I${S_ADDONS}:" \
- apps/Makefile
- fi
-
- #
- # asterisk add-ons
- #
- cd ${S_ADDONS}
- sed -i -e "s:-I../asterisk:-I${S} -I${S}/include:" Makefile
- sed -i -e "s:^OPTIMIZE+=.*:OPTIMIZE+=${CFLAGS}:" \
- -e "s:^\(CFLAGS=\)\(.*\):\1-I${S}/include -fPIC \2:" \
- format_mp3/Makefile
-
-
- #
- # BRI patches
- #
- if use bri; then
- cd ${S}
- einfo "Patching asterisk w/ BRI stuff"
-
- epatch ${WORKDIR}/bristuff-${BRI_VERSION}/patches/asterisk.patch
- fi
-
- #
- # Revived snmp plugin support
- #
-# if use snmp; then
-# cd ${S}
-# einfo "Patching snmp plugin helper functions"
-# epatch ${FILESDIR}/1.0.0/ast-ax-snmp-1.0.6.diff
-# fi
-
- # fix path for non-root
- cd ${S}
- sed -i -e "s:^\(ASTVARRUNDIR=\).*:\1\$(INSTALL_PREFIX)/var/run/asterisk:" \
- Makefile
-
- # fix contrib scripts for non-root
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.7-scripts.diff
-
- # add initgroups support to asterisk, this is needed
- # to support supplementary groups for the asterisk
- # user (start-stop-daemons --chguid breaks realtime priority support)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-initgroups.diff
-
- # fix segfault on amd64 and possibly other 64bit systems (#105762)
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.8-ptr64fix.diff
-
- # needed for >=freetds-0.63
- if has_version ">=dev-db/freetds-0.63"; then
- epatch ${FILESDIR}/1.0.0/${P}-freetds.diff
- fi
-
- # security fix, bug #111836
- epatch ${FILESDIR}/1.0.0/${PN}-1.0.10-vmail.cgi.patch
-}
-
-src_compile() {
- # build asterisk first...
- einfo "Building Asterisk..."
- cd ${S}
- emake -j1 || die "Make failed"
-
- # create api docs
- use doc && \
- emake -j1 progdocs
-
- #
- # add-ons
- #
- einfo "Building additional stuff..."
- cd ${S_ADDONS}
- emake -j1 || die "Make failed"
-
- if use resperl; then
- cd ${S_ADDONS}/res_perl
- emake -j1 || die "Building embedded perl failed"
- fi
-}
-
-src_install() {
- make DESTDIR=${D} install || die "Make install failed"
- make DESTDIR=${D} samples || die "Make install samples failed"
-
- # install astconf.h, a lot of external modules need this
- insinto /usr/include/asterisk
- doins astconf.h
-
- # install addmailbox and astgenkey
- dosbin contrib/scripts/addmailbox
- dosbin contrib/scripts/astgenkey
-
- newinitd ${FILESDIR}/1.0.0/asterisk.rc6.sec asterisk
- newconfd ${FILESDIR}/1.0.0/asterisk.confd.sec asterisk
-
- # don't delete these, even if they are empty
- keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
- keepdir /var/spool/asterisk/tmp
- keepdir /var/log/asterisk/cdr-csv
- keepdir /var/run/asterisk
-
- # install standard docs...
- dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README README.fpm
- dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README
- dodoc doc/README.*
- dodoc doc/*.txt
-
- docinto scripts
- dodoc contrib/scripts/*
- docinto firmware/iax
- dodoc contrib/firmware/iax/*
-
- # 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
-
- #
- # add-ons
- #
-
- # install additional modules...
- einfo "Installing additional modules..."
- cd ${S_ADDONS}
- make INSTALL_PREFIX=${D} install || die "Make install failed"
-
- if use resperl; then
- perlinfo
-
- cd ${S_ADDONS}/res_perl
- make INSTALL_PREFIX=${D} install || die "Installation of perl AST_API failed"
-
- # move AstApiBase.so to a proper place
- dodir ${VENDOR_LIB}/auto/AstAPIBase
- mv ${D}/etc/asterisk/perl/AstAPIBase.so ${D}${VENDOR_LIB}/auto/AstAPIBase
-
- # move *.pm files to other location
- dodir ${VENDOR_LIB}/AstAPI
- dodir ${VENDOR_LIB}/AstAPIBase
- for x in AstAPI.pm AstConfig.pm LoadFile.pm PerlSwitch.pm WebServer.pm; do
- mv ${D}/etc/asterisk/perl/${x} ${D}${VENDOR_LIB}/AstAPI
- dosed "s/^use[\t ]\+${x/.pm/};/use AstAPI::${x/.pm/};/" /etc/asterisk/perl/asterisk_init.pm
- done
- mv ${D}/etc/asterisk/perl/AstAPIBase.pm ${D}${VENDOR_LIB}/AstAPIBase
- dosed "s/^use[\t ]\+AstAPI;/use AstAPI::AstAPI;/" /etc/asterisk/perl/asterisk_init.pm
- dosed "s/^use[\t ]\+AstAPIBase;/use AstAPIBase::AstAPIBase;/" ${VENDOR_LIB}/AstAPI/AstAPI.pm
-
- # move apps + htdocs to a proper place
- dodir /var/lib/asterisk/perl
- mv ${D}/etc/asterisk/perl/{apps,htdocs} ${D}/var/lib/asterisk/perl
-
- # fix locations
- sed -i -e "s:/etc/asterisk/perl:/var/lib/asterisk/perl:" \
- ${D}${VENDOR_LIB}/AstAPI/LoadFile.pm ${D}${VENDOR_LIB}/AstAPI/WebServer.pm
- fi
-}
-
-pkg_preinst() {
- einfo "Adding asterisk user and group"
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk asterisk
-}
-
-pkg_postinst() {
- #
- # Change permissions and ownerships of asterisk
- # directories and files
- #
- einfo "Fixing permissions and ownerships"
- # fix permissions in /var/...
- 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
-
- #
- # Fix locations for old installations (pre-non-root versions)
- #
- if [[ -z "$(grep "/var/run/asterisk" ${ROOT}etc/asterisk/asterisk.conf)" ]]
- then
- einfo "Fixing astrundir in ${ROOT}etc/asterisk/asterisk.conf"
- mv -f ${ROOT}etc/asterisk/asterisk.conf \
- ${ROOT}etc/asterisk/asterisk.conf.bak
- sed -e "s:^\(astrundir[\t ]=>\).*:\1 /var/run/asterisk:" \
- ${ROOT}etc/asterisk/asterisk.conf.bak >\
- ${ROOT}etc/asterisk/asterisk.conf
- einfo "Backup has been saved as ${ROOT}etc/asterisk/asterisk.conf.bak"
- fi
-
- #
- # Some messages
- #
- einfo "Asterisk has been installed"
- einfo ""
- einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
- einfo ""
- einfo "If you want to know more about asterisk, visit these sites:"
- einfo "http://www.asteriskdocs.org/"
- einfo "http://www.voip-info.org/wiki-Asterisk"
- echo
- einfo "http://asterisk.xvoip.com/"
- einfo "http://junghanns.net/asterisk/"
- einfo "http://www.automated.it/guidetoasterisk.htm"
- echo
- einfo "Gentoo VoIP IRC Channel:"
- einfo "#gentoo-voip @ irc.freenode.net"
-
- #
- # Warning about security changes...
- #
- ewarn "*********************** Important changes **************************"
- ewarn
- ewarn "- Asterisk runs as user asterisk, group asterisk by default"
- ewarn
- ewarn "- Make sure the asterisk user is a member of the proper groups if you want it"
- ewarn " to have access to hardware devices, e.g. \"audio\" for Alsa and OSS sound or"
- ewarn " \"dialout\" for zaptel!"
- ewarn
- ewarn "- Permissions of /etc/asterisk have been changed to root:asterisk"
- ewarn " 750 (rwxr-x--- directories) / 640 (rw-r----- files)"
- ewarn
- ewarn "- Permissions of /var/{log,lib,run,spool}/asterisk have been changed"
- ewarn " to asterisk:asterisk 750 / 640"
- ewarn
- ewarn "- Asterisk's unix socket and pidfile are now in /var/run/astrisk"
- ewarn
- ewarn "- Asterisk cannot set the IP ToS bits when run as user,"
- ewarn " use something like this to make iptables set them for you:"
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28\""
- ewarn " \"iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28\""
- ewarn " (taken from voip-info.org comments (see below), thanks andrewid)"
- ewarn
- ewarn "For more details:"
- ewarn " http://bugs.gentoo.org/show_bug.cgi?id=88732"
- ewarn " http://www.voip-info.org/wiki-Asterisk+non-root"
-}
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.10-r1 b/net-misc/asterisk/files/digest-asterisk-1.0.10-r1
deleted file mode 100644
index 15a355eb0e04..000000000000
--- a/net-misc/asterisk/files/digest-asterisk-1.0.10-r1
+++ /dev/null
@@ -1,9 +0,0 @@
-MD5 f60f4c4edc36fa61dc55a5385fd82e71 asterisk-1.0.10.tar.gz 9609302
-RMD160 fa85ccd0a84de0eb4596dcc97ddd680b9aa72e1c asterisk-1.0.10.tar.gz 9609302
-SHA256 3f10fe074fe1469b13046493ee43efc2c9b2e1fa0896abeb2eb09e381d7c9f92 asterisk-1.0.10.tar.gz 9609302
-MD5 2b6e1da3ff097f9792d3123e7e5a0059 asterisk-addons-1.0.9.tar.gz 73716
-RMD160 98156861f790987fb4bf86b14c902aeca90b380b asterisk-addons-1.0.9.tar.gz 73716
-SHA256 4c878a4e5b5aabbdd93116ccbca5cf6465d55f480f4aa1e6438e9fc49c1f11fe asterisk-addons-1.0.9.tar.gz 73716
-MD5 215dd795ce8ea72370b2e9d1bb7d8f6a bristuff-0.2.0-RC8q.tar.gz 152037
-RMD160 aaa9ca23eaeb74abc96dd7240f67e7886d4d6ad9 bristuff-0.2.0-RC8q.tar.gz 152037
-SHA256 8ba7a1e1e6ee8e9d77853d6d790d0de5deced7c11679b9b0e108cca817ed9728 bristuff-0.2.0-RC8q.tar.gz 152037
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.7-r2 b/net-misc/asterisk/files/digest-asterisk-1.0.7-r2
deleted file mode 100644
index 6de4491b805b..000000000000
--- a/net-misc/asterisk/files/digest-asterisk-1.0.7-r2
+++ /dev/null
@@ -1,9 +0,0 @@
-MD5 4cc3c1e4a1b12e0e4c748326ad153291 asterisk-1.0.7.tar.gz 9591705
-RMD160 bb738f0e3d100314fa7497c9ee81f8a022e536bb asterisk-1.0.7.tar.gz 9591705
-SHA256 552dd71917475eaf1866665d091909c2c50865d84c62ab35383f443141e08a74 asterisk-1.0.7.tar.gz 9591705
-MD5 e2a94a7c2e97de18b3cdc4dd42709c11 asterisk-addons-1.0.7.tar.gz 73646
-RMD160 52d73f32bcd1717b5cf057c5930a9aefae1040cf asterisk-addons-1.0.7.tar.gz 73646
-SHA256 22d5839b851ed83590bf670f0c958ec5103178f80706ce4b4b235c837adf0433 asterisk-addons-1.0.7.tar.gz 73646
-MD5 7a5ff01d3befff1fbd3de1c303cb10d1 bristuff-0.2.0-RC8g.tar.gz 139013
-RMD160 c0a037e0819b8985be2df60a010309335527f203 bristuff-0.2.0-RC8g.tar.gz 139013
-SHA256 19a0a7fdbb192fed4ea086251d5653abbe8525232dd5b613f9366400c97b213b bristuff-0.2.0-RC8g.tar.gz 139013
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.7-r3 b/net-misc/asterisk/files/digest-asterisk-1.0.7-r3
deleted file mode 100644
index 6de4491b805b..000000000000
--- a/net-misc/asterisk/files/digest-asterisk-1.0.7-r3
+++ /dev/null
@@ -1,9 +0,0 @@
-MD5 4cc3c1e4a1b12e0e4c748326ad153291 asterisk-1.0.7.tar.gz 9591705
-RMD160 bb738f0e3d100314fa7497c9ee81f8a022e536bb asterisk-1.0.7.tar.gz 9591705
-SHA256 552dd71917475eaf1866665d091909c2c50865d84c62ab35383f443141e08a74 asterisk-1.0.7.tar.gz 9591705
-MD5 e2a94a7c2e97de18b3cdc4dd42709c11 asterisk-addons-1.0.7.tar.gz 73646
-RMD160 52d73f32bcd1717b5cf057c5930a9aefae1040cf asterisk-addons-1.0.7.tar.gz 73646
-SHA256 22d5839b851ed83590bf670f0c958ec5103178f80706ce4b4b235c837adf0433 asterisk-addons-1.0.7.tar.gz 73646
-MD5 7a5ff01d3befff1fbd3de1c303cb10d1 bristuff-0.2.0-RC8g.tar.gz 139013
-RMD160 c0a037e0819b8985be2df60a010309335527f203 bristuff-0.2.0-RC8g.tar.gz 139013
-SHA256 19a0a7fdbb192fed4ea086251d5653abbe8525232dd5b613f9366400c97b213b bristuff-0.2.0-RC8g.tar.gz 139013
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.8-r1 b/net-misc/asterisk/files/digest-asterisk-1.0.8-r1
deleted file mode 100644
index 88ae55242b46..000000000000
--- a/net-misc/asterisk/files/digest-asterisk-1.0.8-r1
+++ /dev/null
@@ -1,9 +0,0 @@
-MD5 8400ebbd46e41cd772c7814b361de05a asterisk-1.0.8.tar.gz 9604563
-RMD160 6f1e63804ce4a2ec90a61571bf946d6b64dcea76 asterisk-1.0.8.tar.gz 9604563
-SHA256 26807ac82aa45758e538276301273c4493e1f4fdb2ba433bd732ab21d2340e9a asterisk-1.0.8.tar.gz 9604563
-MD5 07af0488fde431278fc840f39a9b38f2 asterisk-addons-1.0.8.tar.gz 73702
-RMD160 66c6ab0ab2941cb657828d45ab379ecbfb385a5d asterisk-addons-1.0.8.tar.gz 73702
-SHA256 3f5c9d03fd257781ec6c59189d37c492fbdf457a1d267bb509f3c852693a7dae asterisk-addons-1.0.8.tar.gz 73702
-MD5 3b264a75b1a17735572920655bf1a0f8 bristuff-0.2.0-RC8h.tar.gz 150270
-RMD160 a958bc8418618ca892f0fbdb8d8cf203375d3865 bristuff-0.2.0-RC8h.tar.gz 150270
-SHA256 74c2e40cd665a2a9ac29d5ddd31892c8ca15ca9b55e2a08523e9db5ca75ba207 bristuff-0.2.0-RC8h.tar.gz 150270
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.8-r2 b/net-misc/asterisk/files/digest-asterisk-1.0.8-r2
deleted file mode 100644
index 88ae55242b46..000000000000
--- a/net-misc/asterisk/files/digest-asterisk-1.0.8-r2
+++ /dev/null
@@ -1,9 +0,0 @@
-MD5 8400ebbd46e41cd772c7814b361de05a asterisk-1.0.8.tar.gz 9604563
-RMD160 6f1e63804ce4a2ec90a61571bf946d6b64dcea76 asterisk-1.0.8.tar.gz 9604563
-SHA256 26807ac82aa45758e538276301273c4493e1f4fdb2ba433bd732ab21d2340e9a asterisk-1.0.8.tar.gz 9604563
-MD5 07af0488fde431278fc840f39a9b38f2 asterisk-addons-1.0.8.tar.gz 73702
-RMD160 66c6ab0ab2941cb657828d45ab379ecbfb385a5d asterisk-addons-1.0.8.tar.gz 73702
-SHA256 3f5c9d03fd257781ec6c59189d37c492fbdf457a1d267bb509f3c852693a7dae asterisk-addons-1.0.8.tar.gz 73702
-MD5 3b264a75b1a17735572920655bf1a0f8 bristuff-0.2.0-RC8h.tar.gz 150270
-RMD160 a958bc8418618ca892f0fbdb8d8cf203375d3865 bristuff-0.2.0-RC8h.tar.gz 150270
-SHA256 74c2e40cd665a2a9ac29d5ddd31892c8ca15ca9b55e2a08523e9db5ca75ba207 bristuff-0.2.0-RC8h.tar.gz 150270
diff --git a/net-misc/asterisk/files/digest-asterisk-1.0.9-r3 b/net-misc/asterisk/files/digest-asterisk-1.0.9-r3
deleted file mode 100644
index a1637fb67395..000000000000
--- a/net-misc/asterisk/files/digest-asterisk-1.0.9-r3
+++ /dev/null
@@ -1,9 +0,0 @@
-MD5 0d7f1c680ae53a739f26a069ef8b580a asterisk-1.0.9.tar.gz 9604582
-RMD160 2e48dc00a3c290cc6b418ab0aee42feb93d9e76a asterisk-1.0.9.tar.gz 9604582
-SHA256 27e9437b3e6297f1a5e171b96e818c1ffa51dba78afe61277f5c3540809d2653 asterisk-1.0.9.tar.gz 9604582
-MD5 2b6e1da3ff097f9792d3123e7e5a0059 asterisk-addons-1.0.9.tar.gz 73716
-RMD160 98156861f790987fb4bf86b14c902aeca90b380b asterisk-addons-1.0.9.tar.gz 73716
-SHA256 4c878a4e5b5aabbdd93116ccbca5cf6465d55f480f4aa1e6438e9fc49c1f11fe asterisk-addons-1.0.9.tar.gz 73716
-MD5 a6b5c61c16b35f02c616c8abadb9999d bristuff-0.2.0-RC8n.tar.gz 143979
-RMD160 922b6b807bb48aa690412de3916eeb54c1454486 bristuff-0.2.0-RC8n.tar.gz 143979
-SHA256 a92d9d8e9777c0637d2db0375794fe011fd8ecf1461f0b8e6587c74670da637c bristuff-0.2.0-RC8n.tar.gz 143979