1 |
chainsaw 09/08/04 17:29:04 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-1.2.33-r1.ebuild |
5 |
Log: |
6 |
Revision bump, now applies patches correctly and adds missed dialout group to enewuser statement. Closes bug #279988 by Robin Johnson <robbat2@g.o>. Do not optimize if USE="debug" as requested by Vieri, closes bug #192966. |
7 |
(Portage version: 2.1.6.13/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.205 net-misc/asterisk/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.205&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.205&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.204&r2=1.205 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
19 |
retrieving revision 1.204 |
20 |
retrieving revision 1.205 |
21 |
diff -u -r1.204 -r1.205 |
22 |
--- ChangeLog 21 Jul 2009 13:36:22 -0000 1.204 |
23 |
+++ ChangeLog 4 Aug 2009 17:29:04 -0000 1.205 |
24 |
@@ -1,6 +1,14 @@ |
25 |
# ChangeLog for net-misc/asterisk |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.204 2009/07/21 13:36:22 chainsaw Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.205 2009/08/04 17:29:04 chainsaw Exp $ |
29 |
+ |
30 |
+*asterisk-1.2.33-r1 (04 Aug 2009) |
31 |
+ |
32 |
+ 04 Aug 2009; <chainsaw@g.o> +asterisk-1.2.33-r1.ebuild: |
33 |
+ Revision bump, now applies patches correctly and adds missed dialout group |
34 |
+ to enewuser statement. Closes bug #279988 by Robin Johnson |
35 |
+ <robbat2@g.o>. Do not optimize if USE="debug" as requested by |
36 |
+ Vieri, closes bug #192966. |
37 |
|
38 |
21 Jul 2009; <chainsaw@g.o> asterisk-1.2.32.ebuild: |
39 |
Add the new asterisk user to the dialout group as well as the asterisk |
40 |
|
41 |
|
42 |
|
43 |
1.1 net-misc/asterisk/asterisk-1.2.33-r1.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.2.33-r1.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.2.33-r1.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: asterisk-1.2.33-r1.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2009 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.2.33-r1.ebuild,v 1.1 2009/08/04 17:29:04 chainsaw Exp $ |
53 |
|
54 |
EAPI=2 |
55 |
inherit eutils multilib toolchain-funcs |
56 |
|
57 |
IUSE="alsa curl debug doc gtk h323 hardened lowmem mmx nosamples \ |
58 |
odbc osp postgres pri sqlite ssl speex zaptel elibc_uclibc" |
59 |
|
60 |
AST_PATCHES="1.2.27-patches-1.0" |
61 |
|
62 |
MY_P="${P/_p/.}" |
63 |
|
64 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
65 |
HOMEPAGE="http://www.asterisk.org/" |
66 |
SRC_URI="http://downloads.digium.com/pub/asterisk/releases/${MY_P}.tar.gz |
67 |
mirror://gentoo/${PN}-${AST_PATCHES}.tar.bz2" |
68 |
|
69 |
S="${WORKDIR}/${MY_P}" |
70 |
|
71 |
SLOT="0" |
72 |
LICENSE="GPL-2" |
73 |
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" |
74 |
|
75 |
RDEPEND="dev-libs/newt |
76 |
media-sound/sox |
77 |
ssl? ( dev-libs/openssl ) |
78 |
gtk? ( =x11-libs/gtk+-1.2* ) |
79 |
pri? ( >=net-libs/libpri-1.2.5[-bri] ) |
80 |
h323? ( >=dev-libs/pwlib-1.8.3 |
81 |
>=net-libs/openh323-1.15.0 ) |
82 |
alsa? ( media-libs/alsa-lib ) |
83 |
curl? ( net-misc/curl ) |
84 |
odbc? ( dev-db/unixODBC ) |
85 |
speex? ( media-libs/speex ) |
86 |
sqlite? ( <dev-db/sqlite-3.0.0 ) |
87 |
zaptel? ( >=net-misc/zaptel-1.2.16 ) |
88 |
postgres? ( virtual/postgresql-base ) |
89 |
osp? ( >=net-libs/osptoolkit-3.3.4 )" |
90 |
|
91 |
DEPEND="${RDEPEND} |
92 |
sys-devel/flex |
93 |
sys-devel/bison |
94 |
doc? ( app-doc/doxygen ) |
95 |
virtual/logger" |
96 |
|
97 |
#asterisk uses special mpg123 functions and does not work with mpeg321, bug #42703 |
98 |
PDEPEND="|| ( media-sound/mpg123 net-misc/asterisk-addons )" |
99 |
|
100 |
QA_TEXTRELS_x86="usr/lib/asterisk/modules/codec_gsm.so" |
101 |
QA_EXECSTACK_x86="usr/lib/asterisk/modules/codec_gsm.so" |
102 |
|
103 |
# |
104 |
# List of modules to ignore during scan (because they have been removed in 1.2.x) |
105 |
# |
106 |
SCAN_IGNORE_MODS=" |
107 |
app_qcall |
108 |
chan_modem |
109 |
chan_modem_i4l |
110 |
chan_modem_bestdata |
111 |
chan_modme_aopen" |
112 |
|
113 |
# |
114 |
# shortcuts |
115 |
# |
116 |
is_ast10update() { |
117 |
return $(has_version "=net-misc/asterisk-1.0*") |
118 |
} |
119 |
|
120 |
is_astupdate() { |
121 |
if ! is_ast10update; then |
122 |
return $(has_version "<net-misc/asterisk-${PV}") |
123 |
fi |
124 |
return 0 |
125 |
} |
126 |
|
127 |
# |
128 |
# Scan for asterisk-1.0.x modules that will have to be updated |
129 |
# |
130 |
scan_modules() { |
131 |
local modules_list="" |
132 |
local n |
133 |
|
134 |
for x in $(ls -1 "${ROOT}"usr/$(get_libdir)/asterisk/modules/*.so); do |
135 |
echo -en "Scanning.... $(basename ${x}) \r" |
136 |
|
137 |
# skip blacklisted modules |
138 |
hasq $(basename ${x//.so}) ${SCAN_IGNORE_MODS} && continue |
139 |
|
140 |
if $(readelf -s "${x}" | grep -q "\(ast_load\|ast_destroy\)$"); then |
141 |
modules_list="${modules_list} $(basename ${x//.so})" |
142 |
fi |
143 |
done |
144 |
|
145 |
if [[ -n "${modules_list}" ]]; then |
146 |
echo " ========================================================" |
147 |
ewarn "Please update or unmerge the following modules:" |
148 |
echo |
149 |
|
150 |
n=0 |
151 |
for x in ${modules_list}; do |
152 |
ewarn " - ${x}" |
153 |
(( n++ )) |
154 |
done |
155 |
|
156 |
echo |
157 |
ewarn "Warning: $n outdated module(s) found!" |
158 |
ewarn "Warning: asterisk may not work if you don't update them!" |
159 |
echo " ========================================================" |
160 |
echo |
161 |
einfo "You can use the \"asterisk-updater\" script to update the modules" |
162 |
epause |
163 |
echo |
164 |
return 1 |
165 |
else |
166 |
einfo "No asterisk-1.0.x modules found!" |
167 |
return 0 |
168 |
fi |
169 |
} |
170 |
|
171 |
pkg_setup() { |
172 |
local checkfailed=0 waitaftermsg=0 |
173 |
|
174 |
if is_ast10update; then |
175 |
ewarn " Asterisk UPGRADE Warning" |
176 |
ewarn "" |
177 |
ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.gz after the installation!" |
178 |
ewarn "" |
179 |
ewarn " Asterisk UPGRADE Warning" |
180 |
echo |
181 |
waitaftermsg=1 |
182 |
fi |
183 |
|
184 |
# |
185 |
# Regular checks |
186 |
# |
187 |
einfo "Running some pre-flight checks..." |
188 |
echo |
189 |
|
190 |
} |
191 |
|
192 |
src_prepare() { |
193 |
# |
194 |
# gentoo patchset |
195 |
# |
196 |
for x in $(grep -v "^#\| \+" "${WORKDIR}"/patches/patches.list); do |
197 |
epatch "${WORKDIR}"/patches/${x} |
198 |
done |
199 |
|
200 |
if use mmx; then |
201 |
if ! use hardened; then |
202 |
einfo "Enabling mmx optimization" |
203 |
sed -i -e "s:^#\(K6OPT[\t ]\+= -DK6OPT\):\1:" \ |
204 |
Makefile |
205 |
else |
206 |
ewarn "Hardened use-flag is set, not enabling mmx optimization for codec_gsm!" |
207 |
fi |
208 |
fi |
209 |
|
210 |
if ! use debug; then |
211 |
einfo "Disabling debug support" |
212 |
sed -i -e "s:^\(DEBUG=\):#\1:" \ |
213 |
Makefile |
214 |
fi |
215 |
|
216 |
if ! use ssl; then |
217 |
einfo "Disabling crypto support" |
218 |
sed -i -e 's:^#\(NOCRYPTO=yes\):\1:' \ |
219 |
-e '/^LIBS+=-lssl/d' Makefile || die |
220 |
fi |
221 |
|
222 |
epatch "${FILESDIR}/1.2.0/${PN}-1.2.21.1-h323-dumb-makefile.diff" |
223 |
|
224 |
# |
225 |
# uclibc patch |
226 |
# |
227 |
if use elibc_uclibc; then |
228 |
einfo "Patching asterisk for uclibc..." |
229 |
epatch "${FILESDIR}"/1.0.0/${PN}-1.0.5-uclibc-dns.diff |
230 |
epatch "${FILESDIR}"/1.2.0/${PN}-1.2.1-uclibc-getloadavg.diff |
231 |
fi |
232 |
|
233 |
# |
234 |
# Disable AEL, security bug #171884 |
235 |
# Re-enable at your own risk (no USE since it can be critical) |
236 |
# |
237 |
sed -i -e 's/pbx_ael.so//' pbx/Makefile || die |
238 |
|
239 |
# codecs/Makefile does not add -lspeexdsp needed for speex 1.2, bug #206463 |
240 |
if use speex && has_version ">=media-libs/speex-1.2"; then |
241 |
sed -i -e "s/-lspeex/-lspeex -lspeexdsp/" codecs/Makefile \ |
242 |
|| die "patching codecs/Makefile failed" |
243 |
fi |
244 |
} |
245 |
|
246 |
src_compile() { |
247 |
local myopts |
248 |
|
249 |
use lowmem && \ |
250 |
myopts="-DLOW_MEMORY" |
251 |
|
252 |
if use h323; then |
253 |
einfo "Building H.323 wrapper lib..." |
254 |
make -C channels/h323 \ |
255 |
NOTRACE=1 \ |
256 |
PWLIBDIR=/usr/share/pwlib \ |
257 |
OPENH323DIR=/usr/share/openh323 \ |
258 |
libchanh323.a Makefile.ast || die "Make h323 failed" |
259 |
fi |
260 |
|
261 |
einfo "Building Asterisk..." |
262 |
if use debug; then |
263 |
unset CFLAGS |
264 |
make \ |
265 |
CC=$(tc-getCC) \ |
266 |
NOTRACE=1 \ |
267 |
PWLIBDIR=/usr/share/pwlib \ |
268 |
OPENH323DIR=/usr/share/openh323 \ |
269 |
OPTIONS="${myopts}" \ |
270 |
dont-optimize=1 || die "Make failed" |
271 |
else |
272 |
make \ |
273 |
CC=$(tc-getCC) \ |
274 |
NOTRACE=1 \ |
275 |
OPTIMIZE="${CFLAGS}" \ |
276 |
PWLIBDIR=/usr/share/pwlib \ |
277 |
OPENH323DIR=/usr/share/openh323 \ |
278 |
OPTIONS="${myopts}" || die "Make failed" |
279 |
fi |
280 |
|
281 |
# create api docs |
282 |
use doc && \ |
283 |
make progdocs |
284 |
} |
285 |
|
286 |
src_install() { |
287 |
|
288 |
# install asterisk |
289 |
make DESTDIR="${D}" ASTLIBDIR="\$(INSTALL_PREFIX)/usr/$(get_libdir)/asterisk" install || die "Make install failed" |
290 |
make DESTDIR="${D}" ASTLIBDIR="\$(INSTALL_PREFIX)/usr/$(get_libdir)/asterisk" samples || die "Failed to create sample files" |
291 |
|
292 |
# remove installed sample files if nosamples flag is set |
293 |
if use nosamples; then |
294 |
einfo "Skipping installation of sample files..." |
295 |
rm -rf "${D}"var/spool/asterisk/voicemail/default |
296 |
rm -f "${D}"var/lib/asterisk/mohmp3/* |
297 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* |
298 |
rm -f "${D}"var/lib/asterisk/agi-bin/* |
299 |
else |
300 |
einfo "Sample files have been installed" |
301 |
keepdir /var/spool/asterisk/voicemail/default/1234/INBOX |
302 |
fi |
303 |
|
304 |
# move sample configuration files to doc directory |
305 |
if is_ast10update; then |
306 |
elog "Updating from old (pre-1.2) asterisk version, new configuration files have been installed" |
307 |
elog "into "${ROOT}"etc/asterisk, use etc-update or dispatch-conf to update them" |
308 |
elif has_version "net-misc/asterisk"; then |
309 |
elog "Configuration samples have been moved to: $ROOT/usr/share/doc/${PF}/conf" |
310 |
insinto /usr/share/doc/${PF}/conf |
311 |
doins "${D}"etc/asterisk/*.conf* |
312 |
rm -f "${D}"etc/asterisk/*.conf* 2>/dev/null |
313 |
fi |
314 |
|
315 |
# don't delete these directories, even if they are empty |
316 |
for x in voicemail meetme system dictate monitor tmp; do |
317 |
keepdir /var/spool/asterisk/${x} |
318 |
done |
319 |
keepdir /var/lib/asterisk/sounds/priv-callerintros |
320 |
keepdir /var/lib/asterisk/mohmp3 |
321 |
keepdir /var/lib/asterisk/agi-bin |
322 |
keepdir /var/log/asterisk/cdr-csv |
323 |
keepdir /var/log/asterisk/cdr-custom |
324 |
keepdir /var/run/asterisk |
325 |
|
326 |
# install astxs |
327 |
dobin contrib/scripts/astxs |
328 |
|
329 |
newinitd "${FILESDIR}"/1.2.0/asterisk.rc6 asterisk |
330 |
newconfd "${FILESDIR}"/1.2.0/asterisk.confd asterisk |
331 |
|
332 |
# install standard docs... |
333 |
dodoc BUGS CREDITS ChangeLog HARDWARE README README.fpm |
334 |
dodoc SECURITY doc/CODING-GUIDELINES doc/linkedlists.README UPGRADE.txt |
335 |
dodoc doc/README.* |
336 |
dodoc doc/*.txt |
337 |
|
338 |
docinto scripts |
339 |
dodoc contrib/scripts/* |
340 |
|
341 |
docinto utils |
342 |
dodoc contrib/utils/* |
343 |
|
344 |
docinto configs |
345 |
dodoc configs/* |
346 |
|
347 |
# install api docs |
348 |
if use doc; then |
349 |
insinto /usr/share/doc/${PF}/api/html |
350 |
doins doc/api/html/* |
351 |
fi |
352 |
|
353 |
insinto /usr/share/doc/${PF}/cgi |
354 |
doins contrib/scripts/vmail.cgi |
355 |
doins images/*.gif |
356 |
|
357 |
# install asterisk-updater |
358 |
dosbin "${FILESDIR}"/1.2.0/asterisk-updater |
359 |
|
360 |
# install asterisk.h, a lot of external modules need this |
361 |
insinto /usr/include/asterisk |
362 |
doins include/asterisk.h |
363 |
|
364 |
# make sure misdn/capi stuff is not installed, provided by asterisk-chan_.. |
365 |
rm -f "${D}"/etc/asterisk/misdn.conf "${D}"/usr/lib/asterisk/modules/chan_misdn.so \ |
366 |
"${D}"/usr/share/doc/${PF}/{conf/misdn.conf,configs/misdn.conf.sample.gz,README.misdn.gz} |
367 |
rm -f "${D}"/usr/include/asterisk/chan_capi{,_app}.h \ |
368 |
"${D}"/usr/share/doc/${PF}/{conf/capi.conf,configs/capi.conf.sample.gz} |
369 |
|
370 |
# make sure the broken speex support does not keep Asterisk from starting up |
371 |
# bug #206463 if you care about this. solution needs to work with --as-needed |
372 |
rm -f "${D}"usr/$(get_libdir)/asterisk/modules/codec_speex.so || die "Unable to remove fatally flawed codec_speex.so" |
373 |
} |
374 |
|
375 |
pkg_preinst() { |
376 |
enewgroup asterisk |
377 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
378 |
} |
379 |
|
380 |
pkg_postinst() { |
381 |
einfo "Fixing permissions" |
382 |
chown -R asterisk:asterisk "${ROOT}"var/log/asterisk |
383 |
chmod -R u=rwX,g=rX,o= "${ROOT}"var/log/asterisk |
384 |
|
385 |
for x in lib run spool; do |
386 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
387 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
388 |
done |
389 |
|
390 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/ |
391 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/*.adsi |
392 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/extensions.ael |
393 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/ |
394 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/*.adsi |
395 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/extensions.ael |
396 |
echo |
397 |
|
398 |
# |
399 |
# Announcements, warnings, reminders... |
400 |
# |
401 |
einfo "Asterisk has been installed" |
402 |
einfo "" |
403 |
elog "If you want to know more about asterisk, visit these sites:" |
404 |
elog "http://www.asteriskdocs.org/" |
405 |
elog "http://www.voip-info.org/wiki-Asterisk" |
406 |
elog |
407 |
elog "http://www.automated.it/guidetoasterisk.htm" |
408 |
elog |
409 |
elog "Gentoo VoIP IRC Channel:" |
410 |
elog "#gentoo-voip @ irc.freenode.net" |
411 |
elog |
412 |
elog "Please note that AEL is no longer built because of security bugs" |
413 |
elog "See http://bugs.gentoo.org/show_bug.cgi?id=171884" |
414 |
elog |
415 |
echo |
416 |
echo |
417 |
|
418 |
# |
419 |
# Warning about 1.0 -> 1.2 changes... |
420 |
# |
421 |
if is_ast10update; then |
422 |
ewarn "" |
423 |
ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.gz before continuing" |
424 |
ewarn "" |
425 |
fi |
426 |
|
427 |
if is_astupdate; then |
428 |
ewarn "" |
429 |
ewarn " - The initgroups patch has been dropped, please update your" |
430 |
ewarn " \"conf.d/asterisk\" and \"init.d/asterisk\" file!" |
431 |
ewarn "" |
432 |
fi |
433 |
|
434 |
# scan for old modules |
435 |
if is_ast10update; then |
436 |
einfo "Asterisk has been updated from pre-1.2.x, scanning for old modules" |
437 |
scan_modules |
438 |
fi |
439 |
} |
440 |
|
441 |
pkg_config() { |
442 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
443 |
|
444 |
read tmp |
445 |
tmp="$(echo $tmp | tr [:upper:] [:lower:])" |
446 |
|
447 |
if [[ "$tmp" = "y" ]] ||\ |
448 |
[[ "$tmp" = "yes" ]] |
449 |
then |
450 |
einfo "Resetting permissions to defaults..." |
451 |
|
452 |
for x in spool run lib log; do |
453 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
454 |
chmod -R u=rwX,g=rX,o= "${ROOT}"var/${x}/asterisk |
455 |
done |
456 |
|
457 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
458 |
chmod -R u=rwX,g=rX,o= "${ROOT}"etc/asterisk |
459 |
|
460 |
einfo "done" |
461 |
else |
462 |
einfo "skipping" |
463 |
fi |
464 |
} |