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

Contents of /net-misc/asterisk-g729/asterisk-g729-1.8.4.3.1.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jan 26 10:02:37 2012 UTC (6 years, 10 months ago) by chainsaw
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Updated ebuild by Jaco Kroon, closes bug #399535.

(Portage version: 2.1.10.44/cvs/Linux x86_64)

1 # Copyright 1999-2012 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-1.8.4.3.1.5-r1.ebuild,v 1.1 2012/01/03 13:07:36 chainsaw 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_DPV=1.8.7
15 AST_PV=1.8.7
16 MY_PV=$(replace_version_separator 3 _)
17
18 SRC_URI="x86? (
19 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_32.tar.gz
20 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_xp_32.tar.gz
21 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-barcelona_32.tar.gz
22 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_2_32.tar.gz
23 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_32.tar.gz
24 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-core2_32.tar.gz
25 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-generic_32.tar.gz
26 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-i686_32.tar.gz
27 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-k6_3_32.tar.gz
28 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-nocona_32.tar.gz
29 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_32.tar.gz
30 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_sse3_32.tar.gz
31 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium3m_32.tar.gz
32 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium4m_32.tar.gz
33 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium_m_32.tar.gz
34 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-prescott_32.tar.gz
35 http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-32/benchg729-${BENCH_PV}-x86_32 -> benchg729-x86_32
36 http://downloads.digium.com/pub/register/x86-32/register -> astregister-x86_32
37 http://downloads.digium.com/pub/register/x86-32/asthostid -> asthostid-x86_32
38 )
39 amd64? (
40 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-barcelona_64.tar.gz
41 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-core2_64.tar.gz
42 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-generic_64.tar.gz
43 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-nocona_64.tar.gz
44 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_64.tar.gz
45 http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_sse3_64.tar.gz
46 http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-64/benchg729-${BENCH_PV}-x86_64 -> benchg729-x86_64
47 http://downloads.digium.com/pub/register/x86-64/register -> astregister-x86_64
48 http://downloads.digium.com/pub/register/x86-64/asthostid -> asthostid-x86_64
49 )
50 http://g729.uls.co.za/static/g729-stats-collector/collect-g729-stats.sh"
51
52 LICENSE="Digium"
53 SLOT="0"
54 KEYWORDS="~amd64 ~x86"
55 IUSE=""
56
57 DEPEND=""
58 RDEPEND="${DEPEND} =net-misc/asterisk-${AST_DPV-${AST_PV}}*"
59
60 RESTRICT="mirror strip"
61
62 QA_DT_HASH_amd64="usr/lib64/codec_g729a.so usr/sbin/benchg729"
63 QA_DT_HASH_x86="usr/lib/codec_g729a.so usr/sbin/benchg729"
64
65 QA_EXECSTACK="usr/sbin/benchg729 usr/sbin/asthostid usr/sbin/astregister"
66
67 S="${WORKDIR}"
68
69 src_prepare() {
70 local binsuffix
71 local b
72
73 if use x86; then
74 binsuffix=x86_32
75 elif use amd64; then
76 binsuffix=x86_64
77 else
78 die "Ebuild only functions for x86 and amd64."
79 fi
80
81 for b in astregister asthostid benchg729; do
82 cp "${DISTDIR}/${b}-${binsuffix}" "${WORKDIR}/${b}" || die
83 fperms 755 ${b}
84 done
85
86 cp "${DISTDIR}/collect-g729-stats.sh" "${WORKDIR}" || die
87 }
88
89 src_compile() {
90 ./benchg729 | tee benchdata
91 variant=$(sed -nre "s/^Recommended flavor for this system is '([^']*)'.*/\1/p" < benchdata)
92 [ -d codec_g729a-${MY_PV}-${variant}_${size} ] || variant=generic
93 [ -z $variant ] && variant=generic
94 }
95
96 src_install() {
97 local size
98
99 if use x86; then
100 size=32
101 elif use amd64; then
102 size=64
103 else
104 die "Ebuild only functions for x86 and amd64."
105 fi
106
107 dosbin astregister
108 dosbin asthostid
109 dosbin benchg729
110 dosbin collect-g729-stats.sh
111
112 dodoc codec_g729a-${MY_PV}-${variant}_${size}/LICENSE
113 dodoc codec_g729a-${MY_PV}-${variant}_${size}/README
114 insinto usr/$(get_libdir)/asterisk/modules/
115 doins "codec_g729a-${MY_PV}-${variant}_${size}/codec_g729a.so"
116 }
117
118 pkg_postinst() {
119 einfo "Please note that Digium's register utility has been installed as astregister"
120 einfo
121 einfo "Please consider participating in the G.729 stats collection that ULS"
122 einfo "is performing. This will assist in picking better variants for more"
123 einfo "processors as we gather more statistics. All you need to do is run"
124 einfo "the collect-g729-stats.sh command."
125 [ "${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})."
126 }

  ViewVC Help
Powered by ViewVC 1.1.20