/[gentoo-x86]/net-misc/asterisk-g729/asterisk-g729-11.0.3.1.5.ebuild
Gentoo

Contents of /net-misc/asterisk-g729/asterisk-g729-11.0.3.1.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Jan 14 12:17:33 2013 UTC (5 years ago) by chainsaw
Branch: MAIN
CVS Tags: HEAD
Use QA_PREBUILT instead of QA_EXECSTACK, as requested by Diego Elio "Flameeyes" Pettenò in bug #438654. Bump to Asterisk 11 compatible release and remove Asterisk 10, as requested by Vincent Brillault & Jaco Kroon in bug #447190.

(Portage version: 2.1.11.40/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-g729/asterisk-g729-10.0.3.1.5.ebuild,v 1.3 2012/09/24 00:46:53 vapier Exp $
4
5 EAPI="4"
6
7 inherit versionator multilib
8
9 DESCRIPTION="G.729 codec and supporting files for asterisk"
10 HOMEPAGE="http://store.digium.com/productview.php?product_code=G729CODEC"
11
12 BENCH_PV=1.0.8
13
14 AST_PV=11.0
15 MY_PV=$(replace_version_separator 2 _)
16
17 SRC_URI="x86? (
18 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_32.tar.gz
19 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_xp_32.tar.gz
20 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-barcelona_32.tar.gz
21 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_2_32.tar.gz
22 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_32.tar.gz
23 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-core2_32.tar.gz
24 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-generic_32.tar.gz
25 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-i686_32.tar.gz
26 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-k6_3_32.tar.gz
27 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-nocona_32.tar.gz
28 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_32.tar.gz
29 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_sse3_32.tar.gz
30 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium3m_32.tar.gz
31 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium4m_32.tar.gz
32 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium_m_32.tar.gz
33 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-prescott_32.tar.gz
34 http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-32/benchg729-${BENCH_PV}-x86_32 -> benchg729-x86_32
35 http://downloads.digium.com/pub/register/x86-32/register -> astregister-x86_32
36 http://downloads.digium.com/pub/register/x86-32/asthostid -> asthostid-x86_32
37 )
38 amd64? (
39 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-barcelona_64.tar.gz
40 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-core2_64.tar.gz
41 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-generic_64.tar.gz
42 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-nocona_64.tar.gz
43 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_64.tar.gz
44 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_sse3_64.tar.gz
45 http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-64/benchg729-${BENCH_PV}-x86_64 -> benchg729-x86_64
46 http://downloads.digium.com/pub/register/x86-64/register -> astregister-x86_64
47 http://downloads.digium.com/pub/register/x86-64/asthostid -> asthostid-x86_64
48 )
49 http://g729.uls.co.za/static/g729-stats-collector/collect-g729-stats.sh"
50
51 LICENSE="Digium"
52 SLOT="0"
53 KEYWORDS="~amd64 ~x86"
54 IUSE=""
55
56 DEPEND=""
57 RDEPEND="${DEPEND} =net-misc/asterisk-11*"
58
59 RESTRICT="mirror strip"
60
61 QA_FLAGS_IGNORED_amd64="usr/lib64/asterisk/modules/codec_g729a.so usr/sbin/benchg729"
62 QA_FLAGS_IGNORED_x86="usr/lib/asterisk/modules/codec_g729a.so usr/sbin/benchg729"
63 QA_PREBUILT="usr/sbin/benchg729 usr/sbin/asthostid usr/sbin/astregister"
64
65 S="${WORKDIR}"
66
67 src_prepare() {
68 local binsuffix
69 local b
70
71 if use x86; then
72 binsuffix=x86_32
73 elif use amd64; then
74 binsuffix=x86_64
75 else
76 die "Ebuild only functions for x86 and amd64."
77 fi
78
79 for b in astregister asthostid benchg729; do
80 cp "${DISTDIR}/${b}-${binsuffix}" "${WORKDIR}/${b}" || die
81 fperms 755 ${b}
82 done
83
84 cp "${DISTDIR}/collect-g729-stats.sh" "${WORKDIR}" || die
85 }
86
87 src_compile() {
88 ./benchg729 | tee benchdata
89 variant=$(sed -nre "s/^Recommended flavor for this system is '([^']*)'.*/\1/p" < benchdata)
90 [ -d codec_g729a-${MY_PV}-${variant}_${size} ] || variant=generic
91 [ -z $variant ] && variant=generic
92 }
93
94 src_install() {
95 local size
96
97 if use x86; then
98 size=32
99 elif use amd64; then
100 size=64
101 else
102 die "Ebuild only functions for x86 and amd64."
103 fi
104
105 dosbin astregister
106 dosbin asthostid
107 dosbin benchg729
108 dosbin collect-g729-stats.sh
109
110 dodoc codec_g729a-${MY_PV}-${variant}_${size}/LICENSE
111 dodoc codec_g729a-${MY_PV}-${variant}_${size}/README
112 insinto usr/$(get_libdir)/asterisk/modules/
113 doins "codec_g729a-${MY_PV}-${variant}_${size}/codec_g729a.so"
114 }
115
116 pkg_postinst() {
117 einfo "Please note that Digium's register utility has been installed as astregister"
118 einfo
119 einfo "Please consider participating in the G.729 stats collection that ULS"
120 einfo "is performing. This will assist in picking better variants for more"
121 einfo "processors as we gather more statistics. All you need to do is run"
122 einfo "the collect-g729-stats.sh command."
123 [ "${variant}" = "generic" ] && einfo "You are using the generic flavor of the codec, in order to install a more appropriate one please install a G.729 license and remerge this package (${PN})."
124 }

  ViewVC Help
Powered by ViewVC 1.1.20