From: | "Tony Vroon (chainsaw)" <chainsaw@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-misc/asterisk-g729: metadata.xml ChangeLog asterisk-g729-1.8.4.3.1.5.ebuild |
Date: | Fri, 02 Sep 2011 13:01:01 |
Message-Id: | 20110902130051.487482004C@flycatcher.gentoo.org |
1 | chainsaw 11/09/02 13:00:51 |
2 | |
3 | Added: metadata.xml ChangeLog |
4 | asterisk-g729-1.8.4.3.1.5.ebuild |
5 | Log: |
6 | Initial commit. Ebuild by Jaco Kroon, subsequently ported to EAPI 4 and further improved by Agostino "ago" Sarubbo. Closes bug #33277. |
7 | |
8 | (Portage version: 2.1.10.11/cvs/Linux x86_64) |
9 | |
10 | Revision Changes Path |
11 | 1.1 net-misc/asterisk-g729/metadata.xml |
12 | |
13 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk-g729/metadata.xml?rev=1.1&view=markup |
14 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk-g729/metadata.xml?rev=1.1&content-type=text/plain |
15 | |
16 | Index: metadata.xml |
17 | =================================================================== |
18 | <?xml version="1.0" encoding="UTF-8"?> |
19 | <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
20 | <pkgmetadata> |
21 | <herd>voip</herd> |
22 | <maintainer> |
23 | <email>chainsaw@g.o</email> |
24 | <name>Tony Vroon</name> |
25 | </maintainer> |
26 | </pkgmetadata> |
27 | |
28 | |
29 | |
30 | 1.1 net-misc/asterisk-g729/ChangeLog |
31 | |
32 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk-g729/ChangeLog?rev=1.1&view=markup |
33 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk-g729/ChangeLog?rev=1.1&content-type=text/plain |
34 | |
35 | Index: ChangeLog |
36 | =================================================================== |
37 | # ChangeLog for net-misc/asterisk-g729 |
38 | # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
39 | # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-g729/ChangeLog,v 1.1 2011/09/02 13:00:51 chainsaw Exp $ |
40 | |
41 | *asterisk-g729-1.8.4.3.1.5 (02 Sep 2011) |
42 | |
43 | 02 Sep 2011; Tony Vroon <chainsaw@g.o> |
44 | +asterisk-g729-1.8.4.3.1.5.ebuild, +metadata.xml: |
45 | Initial commit. Ebuild by Jaco Kroon, subsequently ported to EAPI 4 and |
46 | further improved by Agostino "ago" Sarubbo. Closes bug #33277. |
47 | |
48 | |
49 | |
50 | |
51 | 1.1 net-misc/asterisk-g729/asterisk-g729-1.8.4.3.1.5.ebuild |
52 | |
53 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk-g729/asterisk-g729-1.8.4.3.1.5.ebuild?rev=1.1&view=markup |
54 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk-g729/asterisk-g729-1.8.4.3.1.5.ebuild?rev=1.1&content-type=text/plain |
55 | |
56 | Index: asterisk-g729-1.8.4.3.1.5.ebuild |
57 | =================================================================== |
58 | # Copyright 1999-2011 Gentoo Foundation |
59 | # Distributed under the terms of the GNU General Public License v2 |
60 | # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-g729/asterisk-g729-1.8.4.3.1.5.ebuild,v 1.1 2011/09/02 13:00:51 chainsaw Exp $ |
61 | |
62 | EAPI="4" |
63 | |
64 | inherit versionator |
65 | |
66 | DESCRIPTION="G.729 codec and supporting files for asterisk" |
67 | HOMEPAGE="http://store.digium.com/productview.php?product_code=G729CODEC" |
68 | |
69 | BENCH_PV=1.0.8 |
70 | PV_C=($(get_version_components)) |
71 | |
72 | case ${PV_C[1]} in |
73 | 4) |
74 | AST_PV=1.4 |
75 | MY_PV=$(replace_version_separator 2 _) |
76 | ;; |
77 | 6) |
78 | AST_DPV=1.6.${PV_C[2]} |
79 | case ${PV_C[2]} in |
80 | 0|1) |
81 | AST_PV=1.6.${PV_C[2]} |
82 | MY_PV=$(replace_version_separator 3 _) |
83 | ;; |
84 | 2) |
85 | AST_PV=1.6.${PV_C[2]}.${PV_C[3]} |
86 | MY_PV=$(replace_version_separator 4 _) |
87 | ;; |
88 | esac |
89 | ;; |
90 | 8) |
91 | AST_DPV=1.8 |
92 | AST_PV=1.8.${PV_C[2]} |
93 | MY_PV=$(replace_version_separator 3 _) |
94 | ;; |
95 | esac |
96 | |
97 | SRC_URI="x86? ( |
98 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_32.tar.gz |
99 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_xp_32.tar.gz |
100 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-barcelona_32.tar.gz |
101 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_2_32.tar.gz |
102 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_32.tar.gz |
103 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-core2_32.tar.gz |
104 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-generic_32.tar.gz |
105 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-i686_32.tar.gz |
106 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-k6_3_32.tar.gz |
107 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-nocona_32.tar.gz |
108 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_32.tar.gz |
109 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_sse3_32.tar.gz |
110 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium3m_32.tar.gz |
111 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium4m_32.tar.gz |
112 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium_m_32.tar.gz |
113 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-prescott_32.tar.gz |
114 | http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-32/benchg729-${BENCH_PV}-x86_32 -> benchg729-x86_32 |
115 | http://downloads.digium.com/pub/register/x86-32/register -> astregister-x86_32 |
116 | http://downloads.digium.com/pub/register/x86-32/asthostid -> asthostid-x86_32 |
117 | ) |
118 | amd64? ( |
119 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-barcelona_64.tar.gz |
120 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-core2_64.tar.gz |
121 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-generic_64.tar.gz |
122 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-nocona_64.tar.gz |
123 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_64.tar.gz |
124 | http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_sse3_64.tar.gz |
125 | http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-64/benchg729-${BENCH_PV}-x86_64 -> benchg729-x86_64 |
126 | http://downloads.digium.com/pub/register/x86-64/register -> astregister-x86_64 |
127 | http://downloads.digium.com/pub/register/x86-64/asthostid -> asthostid-x86_64 |
128 | ) |
129 | http://g729.uls.co.za/static/g729-stats-collector/collect-g729-stats.sh" |
130 | |
131 | LICENSE="Digium" |
132 | SLOT="0" |
133 | KEYWORDS="~amd64 ~x86" |
134 | IUSE="" |
135 | |
136 | DEPEND="" |
137 | RDEPEND="${DEPEND} =net-misc/asterisk-${AST_DPV-${AST_PV}}*" |
138 | |
139 | RESTRICT="mirror strip" |
140 | |
141 | QA_DT_HASH_amd64="usr/lib64/codec_g729a.so usr/sbin/benchg729" |
142 | QA_DT_HASH_x86="usr/lib/codec_g729a.so usr/sbin/benchg729" |
143 | |
144 | QA_EXECSTACK="usr/sbin/benchg729 usr/sbin/asthostid usr/sbin/astregister" |
145 | |
146 | S=${WORKDIR} |
147 | |
148 | src_prepare() { |
149 | if use x86; then |
150 | binsuffix=x86_32 |
151 | elif use amd64; then |
152 | binsuffix=x86_64 |
153 | else |
154 | die "Ebuild only functions for x86 and amd64." |
155 | fi |
156 | |
157 | for b in astregister asthostid benchg729; do |
158 | cp "${DISTDIR}/${b}-${binsuffix}" "${WORKDIR}/${b}" || die |
159 | fperms 755 ${b} |
160 | done |
161 | |
162 | cp "${DISTDIR}/collect-g729-stats.sh" "${WORKDIR}" || die |
163 | } |
164 | |
165 | src_compile() { |
166 | ./benchg729 | tee benchdata |
167 | variant=$(sed -nre "s/^Recommended flavor for this system is '([^']*)'.*/\1/p" < benchdata) |
168 | [ -d codec_g729a-${MY_PV}-${variant}_${size} ] || variant=generic |
169 | [ -z $variant ] && variant=generic |
170 | } |
171 | |
172 | src_install() { |
173 | local size |
174 | |
175 | if use x86; then |
176 | size=32 |
177 | elif use amd64; then |
178 | size=64 |
179 | else |
180 | die "Ebuild only functions for x86 and amd64." |
181 | fi |
182 | |
183 | dosbin astregister |
184 | dosbin asthostid |
185 | dosbin benchg729 |
186 | dosbin collect-g729-stats.sh |
187 | |
188 | dodoc codec_g729a-${MY_PV}-${variant}_${size}/LICENSE |
189 | dodoc codec_g729a-${MY_PV}-${variant}_${size}/README |
190 | insinto /usr/lib/asterisk/modules/ |
191 | dolib.so codec_g729a-${MY_PV}-${variant}_${size}/codec_g729a.so |
192 | } |
193 | |
194 | pkg_postinst() { |
195 | einfo "Please note that Digium's register utility has been installed as astregister" |
196 | einfo |
197 | einfo "Please consider participating in the G.729 stats collection that ULS" |
198 | einfo "is performing. This will assist in picking better variants for more" |
199 | einfo "processors as we gather more statistics. All you need to do is run" |
200 | einfo "the collect-g729-stats.sh command." |
201 | [ "${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})." |
202 | } |