1 |
chainsaw 09/04/02 11:28:22 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-1.6.0.7.ebuild |
5 |
Log: |
6 |
Version bump, mostly bugfixes. SNMP-related build fix still needed, updated upstream bug report. |
7 |
(Portage version: 2.1.6.11/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.193 net-misc/asterisk/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.193&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.193&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.192&r2=1.193 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
19 |
retrieving revision 1.192 |
20 |
retrieving revision 1.193 |
21 |
diff -u -r1.192 -r1.193 |
22 |
--- ChangeLog 23 Mar 2009 16:00:33 -0000 1.192 |
23 |
+++ ChangeLog 2 Apr 2009 11:28:22 -0000 1.193 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for net-misc/asterisk |
26 |
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.192 2009/03/23 16:00:33 chainsaw Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.193 2009/04/02 11:28:22 chainsaw Exp $ |
29 |
+ |
30 |
+*asterisk-1.6.0.7 (02 Apr 2009) |
31 |
+ |
32 |
+ 02 Apr 2009; <chainsaw@g.o> +asterisk-1.6.0.7.ebuild: |
33 |
+ Version bump, mostly bugfixes. SNMP-related build fix still needed, |
34 |
+ updated upstream bug report. |
35 |
|
36 |
23 Mar 2009; <chainsaw@g.o> -asterisk-1.2.27.ebuild: |
37 |
Remove vulnerable 1.2.27 version now that arch keywording is complete. For |
38 |
|
39 |
|
40 |
|
41 |
1.1 net-misc/asterisk/asterisk-1.6.0.7.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.0.7.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.0.7.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: asterisk-1.6.0.7.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2009 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.0.7.ebuild,v 1.1 2009/04/02 11:28:22 chainsaw Exp $ |
51 |
|
52 |
EAPI=1 |
53 |
inherit eutils autotools |
54 |
|
55 |
MY_P="${PN}-${PV/_/-}" |
56 |
|
57 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
58 |
HOMEPAGE="http://www.asterisk.org/" |
59 |
SRC_URI="http://downloads.digium.com/pub/asterisk/releases/${MY_P}.tar.gz" |
60 |
LICENSE="GPL-2" |
61 |
SLOT="0" |
62 |
KEYWORDS="~amd64 ~x86" |
63 |
|
64 |
IUSE="alsa +caps curl dahdi debug freetds h323 iconv imap jabber ldap keepsrc misdn newt nosamples odbc oss postgres radius snmp span speex ssl sqlite static vorbis" |
65 |
|
66 |
RDEPEND="virtual/libc |
67 |
sys-libs/ncurses |
68 |
dev-libs/popt |
69 |
sys-libs/zlib |
70 |
alsa? ( media-libs/alsa-lib ) |
71 |
caps? ( sys-libs/libcap ) |
72 |
curl? ( net-misc/curl ) |
73 |
dahdi? ( >=net-libs/libpri-1.4.7 |
74 |
net-misc/dahdi-tools ) |
75 |
freetds? ( dev-db/freetds ) |
76 |
h323? ( dev-libs/pwlib |
77 |
net-libs/openh323 ) |
78 |
iconv? ( virtual/libiconv ) |
79 |
imap? ( virtual/imap-c-client ) |
80 |
jabber? ( dev-libs/iksemel ) |
81 |
ldap? ( net-nds/openldap ) |
82 |
misdn? ( net-dialup/misdnuser ) |
83 |
newt? ( dev-libs/newt ) |
84 |
odbc? ( dev-db/unixODBC ) |
85 |
postgres? ( virtual/postgresql-base ) |
86 |
radius? ( net-dialup/radiusclient-ng ) |
87 |
snmp? ( net-analyzer/net-snmp ) |
88 |
span? ( media-libs/spandsp ) |
89 |
speex? ( media-libs/speex ) |
90 |
sqlite? ( dev-db/sqlite ) |
91 |
ssl? ( dev-libs/openssl ) |
92 |
vorbis? ( media-libs/libvorbis )" |
93 |
|
94 |
DEPEND="${RDEPEND} |
95 |
!<net-misc/asterisk-addons-1.6" |
96 |
|
97 |
S="${WORKDIR}/${MY_P}" |
98 |
|
99 |
# |
100 |
# shortcuts |
101 |
# |
102 |
|
103 |
# update from asterisk-1.0.x |
104 |
is_ast10update() { |
105 |
return $(has_version "=net-misc/asterisk-1.0*") |
106 |
} |
107 |
|
108 |
# update from asterisk-1.2.x |
109 |
is_ast12update() { |
110 |
return $(has_version "=net-misc/asterisk-1.2*") |
111 |
} |
112 |
|
113 |
# update from asterisk 1.4.x |
114 |
is_ast14update() { |
115 |
return $(has_version "=net-misc/asterisk-1.4*") |
116 |
} |
117 |
|
118 |
# update in the asterisk-1.6.x line |
119 |
is_astupdate() { |
120 |
if ! is_ast10update && ! is_ast12update && !is_ast14update; then |
121 |
return $(has_version "<net-misc/asterisk-${PV}") |
122 |
fi |
123 |
return 0 |
124 |
} |
125 |
|
126 |
get_available_modules() { |
127 |
local modules mod x |
128 |
|
129 |
# build list of available modules... |
130 |
for x in app cdr codec format func pbx res; do |
131 |
|
132 |
for mod in $(find "${S}" -type f -name "${x}_*.c*" -print) |
133 |
do |
134 |
modules="${modules} $(basename ${mod/%.c*})" |
135 |
done |
136 |
done |
137 |
|
138 |
echo "${modules}" |
139 |
} |
140 |
|
141 |
pkg_setup() { |
142 |
local checkfailed=0 waitaftermsg=0 |
143 |
|
144 |
if is_ast10update || is_ast12update || is_ast14update ; then |
145 |
ewarn " Asterisk UPGRADE Warning" |
146 |
ewarn "" |
147 |
ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 after the installation!" |
148 |
ewarn "" |
149 |
ewarn " Asterisk UPGRADE Warning" |
150 |
echo |
151 |
waitaftermsg=1 |
152 |
fi |
153 |
|
154 |
if [[ $waitaftermsg -eq 1 ]]; then |
155 |
einfo "Press Ctrl+C to abort" |
156 |
echo |
157 |
ebeep 10 |
158 |
fi |
159 |
|
160 |
# |
161 |
# Regular checks |
162 |
# |
163 |
einfo "Running some pre-flight checks..." |
164 |
echo |
165 |
|
166 |
# imap requires ssl if imap-c-client was built with ssl, |
167 |
# conversely if ssl and imap are both on then imap-c-client needs ssl |
168 |
if use imap; then |
169 |
if use ssl && ! built_with_use virtual/imap-c-client ssl; then |
170 |
eerror |
171 |
eerror "IMAP with SSL requested, but your IMAP C-Client libraries" |
172 |
eerror "are built without SSL!" |
173 |
eerror |
174 |
die "Please recompile the IMAP C-Client libraries with SSL support enabled" |
175 |
elif ! use ssl && built_with_use virtual/imap-c-client ssl; then |
176 |
eerror |
177 |
eerror "IMAP without SSL requested, but your IMAP C-Client" |
178 |
eerror "libraries are built with SSL!" |
179 |
eerror |
180 |
die "Please recompile the IMAP C-Client libraries without SSL support enabled" |
181 |
fi |
182 |
fi |
183 |
|
184 |
if [[ -n "${ASTERISK_MODULES}" ]] ; then |
185 |
ewarn "You are overriding ASTERISK_MODULES. We will assume you know what you are doing. There is no support for this option, try without if you see breakage." |
186 |
fi |
187 |
} |
188 |
|
189 |
src_unpack() { |
190 |
unpack ${A} |
191 |
cd "${S}" |
192 |
|
193 |
# |
194 |
# comment about h323 issues |
195 |
# |
196 |
if use h323 ; then |
197 |
ewarn "h323 useflag: It is known that the h323 module doesn't compile |
198 |
the \"normal\" way: For a workaround, asterisk will be built two times |
199 |
without cleaning the build dir." |
200 |
fi |
201 |
|
202 |
# |
203 |
# put pid file(s) into /var/run/asterisk |
204 |
# |
205 |
epatch "${FILESDIR}"/1.6.0/${PN}-1.6.0-var_rundir.patch || die "patch failed" |
206 |
|
207 |
# |
208 |
# fix gsm codec cflags (e.g. i586 core epias) and disable |
209 |
# assembler optimizations |
210 |
# |
211 |
epatch "${FILESDIR}"/1.6.0/${PN}-1.6.0-gsm-pic.patch || die "patch failed" |
212 |
|
213 |
# |
214 |
# add missing LIBS for uclibc |
215 |
# |
216 |
epatch "${FILESDIR}"/1.6.0/${PN}-1.6.0-uclibc.patch || die "patch failed" |
217 |
|
218 |
# |
219 |
# try to tame the custom build system a little so make likes it better |
220 |
# patch credit: Diego E. 'Flameeyes' Pettenò <flameeyes@×××××.org> |
221 |
# |
222 |
epatch "${FILESDIR}"/1.6.0/asterisk-1.6.0.6-parallelmake.patch || die "patch failed" |
223 |
|
224 |
# |
225 |
# do not try to pass libraries in ldflags but use libs properly |
226 |
# keeps NET-SNMP configure test from failing horribly on --as-needed |
227 |
# http://bugs.digium.com/view.php?id=14671 |
228 |
# |
229 |
epatch "${FILESDIR}"/1.6.0/asterisk-1.6.0.6-toolcheck-libs-not-ldflags.patch || die "patch failed" |
230 |
|
231 |
# |
232 |
# link UW-IMAP with Kerberos5 if necessary |
233 |
# |
234 |
epatch "${FILESDIR}"/1.6.0/asterisk-1.6.0.6-imap-kerberos.patch || die "patch failed" |
235 |
|
236 |
AT_M4DIR=autoconf eautoreconf |
237 |
|
238 |
# parse modules list |
239 |
if [[ -n "${ASTERISK_MODULES}" ]]; then |
240 |
local x modules="$(get_available_modules)" |
241 |
|
242 |
einfo "Custom list of modules specified, checking..." |
243 |
|
244 |
use debug && { |
245 |
einfo "Available modules: ${modules}" |
246 |
einfo " Selected modules: ${ASTERISK_MODULES}" |
247 |
} |
248 |
|
249 |
for x in ${ASTERISK_MODULES}; do |
250 |
if [[ "${x}" = "-*" ]]; then |
251 |
MODULES_LIST="" |
252 |
else |
253 |
if has ${x} ${modules} |
254 |
then |
255 |
MODULES_LIST="${MODULES_LIST} ${x}" |
256 |
else |
257 |
eerror "Unknown module: ${x}" |
258 |
fi |
259 |
fi |
260 |
done |
261 |
|
262 |
export MODULES_LIST |
263 |
fi |
264 |
} |
265 |
|
266 |
src_compile() { |
267 |
# |
268 |
# start with configure |
269 |
# |
270 |
econf \ |
271 |
--libdir="/usr/$(get_libdir)" \ |
272 |
--localstatedir="/var" \ |
273 |
--with-gsm=internal \ |
274 |
--with-popt \ |
275 |
--with-z \ |
276 |
$(use_with alsa asound) \ |
277 |
$(use_with caps cap) \ |
278 |
$(use_with curl) \ |
279 |
$(use_with dahdi pri) \ |
280 |
$(use_with dahdi tonezone) \ |
281 |
$(use_with dahdi) \ |
282 |
$(use_with freetds tds) \ |
283 |
$(use_with h323 h323 "/usr/share/openh323") \ |
284 |
$(use_with h323 pwlib "/usr/share/pwlib") \ |
285 |
$(use_with iconv) \ |
286 |
$(use_with imap) \ |
287 |
$(use_with jabber iksemel) \ |
288 |
$(use_with misdn isdnnet) \ |
289 |
$(use_with misdn suppserv) \ |
290 |
$(use_with misdn) \ |
291 |
$(use_with newt) \ |
292 |
$(use_with odbc) \ |
293 |
$(use_with oss) \ |
294 |
$(use_with postgres) \ |
295 |
$(use_with radius) \ |
296 |
$(use_with snmp netsnmp) \ |
297 |
$(use_with span spandsp) \ |
298 |
$(use_with speex) \ |
299 |
$(use_with speex speexdsp) \ |
300 |
$(use_with sqlite sqlite3) \ |
301 |
$(use_with ssl crypto) \ |
302 |
$(use_with ssl) \ |
303 |
$(use_with vorbis ogg) \ |
304 |
$(use_with vorbis) || die "econf failed" |
305 |
|
306 |
# |
307 |
# custom module filter |
308 |
# run menuselect to evaluate the list of modules |
309 |
# and rewrite the list afterwards |
310 |
# |
311 |
if [[ -n "${MODULES_LIST}" ]] |
312 |
then |
313 |
local mod category tmp_list failed_list |
314 |
|
315 |
### |
316 |
# run menuselect |
317 |
|
318 |
emake menuselect.makeopts || die "emake menuselect.makeopts failed" |
319 |
|
320 |
### |
321 |
# get list of modules with failed dependencies |
322 |
|
323 |
failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)" |
324 |
|
325 |
### |
326 |
# traverse our list of modules |
327 |
|
328 |
for category in app cdr codec format func pbx res; do |
329 |
tmp_list="" |
330 |
|
331 |
# search list of modules for matching ones first... |
332 |
for mod in ${MODULES_LIST}; do |
333 |
# module is from current category? |
334 |
if [[ "${mod/%_*}" = "${category}" ]] |
335 |
then |
336 |
# check menuselect thinks the dependencies are met |
337 |
if has ${mod} ${failed_list} |
338 |
then |
339 |
eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!" |
340 |
else |
341 |
tmp_list="${tmp_list} ${mod}" |
342 |
fi |
343 |
fi |
344 |
done |
345 |
|
346 |
use debug && echo "${category} tmp: ${tmp_list}" |
347 |
|
348 |
# replace the module list for $category with our custom one |
349 |
if [[ -n "${tmp_list}" ]] |
350 |
then |
351 |
category="$(echo ${category} | tr '[:lower:]' '[:upper:]')" |
352 |
sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \ |
353 |
menuselect.makeopts || die "failed to set list of ${category} applications" |
354 |
fi |
355 |
done |
356 |
fi |
357 |
|
358 |
# |
359 |
# fasten your seatbelts (and start praying) |
360 |
# |
361 |
if use h323 ; then |
362 |
# emake one time to get h323 to make.... yea not "clean" but works |
363 |
emake |
364 |
fi |
365 |
|
366 |
emake || die "emake failed" |
367 |
} |
368 |
|
369 |
src_install() { |
370 |
# setup directory structure |
371 |
# |
372 |
mkdir -p "${D}"usr/lib/pkgconfig |
373 |
|
374 |
emake DESTDIR="${D}" install || die "emake install failed" |
375 |
emake DESTDIR="${D}" samples || die "emake samples failed" |
376 |
|
377 |
# remove installed sample files if nosamples flag is set |
378 |
if use nosamples; then |
379 |
einfo "Skipping installation of sample files..." |
380 |
rm -f "${D}"var/lib/asterisk/mohmp3/* |
381 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* |
382 |
rm -f "${D}"var/lib/asterisk/agi-bin/* |
383 |
else |
384 |
einfo "Sample files have been installed" |
385 |
fi |
386 |
rm -rf "${D}"var/spool/asterisk/voicemail/default |
387 |
|
388 |
# move sample configuration files to doc directory |
389 |
if is_ast10update || is_ast12update || is_ast14update; then |
390 |
einfo "Updating from old (pre-1.6) asterisk version, new configuration files have been installed" |
391 |
einfo "into "${ROOT}"etc/asterisk, use etc-update or dispatch-conf to update them" |
392 |
fi |
393 |
|
394 |
einfo "Configuration samples have been moved to: "${ROOT}"/usr/share/doc/${PF}/conf" |
395 |
insinto /usr/share/doc/${PF}/conf |
396 |
doins "${D}"etc/asterisk/*.conf* |
397 |
|
398 |
# keep directories |
399 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
400 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
401 |
|
402 |
newinitd "${FILESDIR}"/1.6.0/asterisk.rc6 asterisk |
403 |
newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk |
404 |
|
405 |
# some people like to keep the sources around for custom patching |
406 |
# copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there |
407 |
if use keepsrc |
408 |
then |
409 |
einfo "keepsrc useflag enabled, copying source..." |
410 |
dodir /usr/src |
411 |
|
412 |
cp -dPR "${S}" "${D}"/usr/src/${PF} || die "copying source tree failed" |
413 |
|
414 |
ebegin "running make clean..." |
415 |
emake -C "${D}"/usr/src/${PF} clean >/dev/null || die "make clean failed" |
416 |
eend $? |
417 |
|
418 |
einfo "Source files have been saved to "${ROOT}"usr/src/${PF}" |
419 |
fi |
420 |
|
421 |
# install the upgrade documentation |
422 |
# |
423 |
dodoc README UPGRADE* BUGS CREDITS |
424 |
|
425 |
# install snmp mib files |
426 |
# |
427 |
if use snmp |
428 |
then |
429 |
insinto /usr/share/snmp/mibs/ |
430 |
doins doc/digium-mib.txt doc/asterisk-mib.txt |
431 |
fi |
432 |
} |
433 |
|
434 |
pkg_preinst() { |
435 |
enewgroup asterisk |
436 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
437 |
} |
438 |
|
439 |
pkg_postinst() { |
440 |
ebegin "Fixing up permissions" |
441 |
chown -R asterisk:asterisk "${ROOT}"var/log/asterisk |
442 |
chmod -R u=rwX,g=rX,o= "${ROOT}"var/log/asterisk |
443 |
|
444 |
for x in lib run spool; do |
445 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
446 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
447 |
done |
448 |
|
449 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/ |
450 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/*.adsi |
451 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/extensions.ael |
452 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/ |
453 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/*.adsi |
454 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/extensions.ael |
455 |
eend $? |
456 |
|
457 |
# |
458 |
# Announcements, warnings, reminders... |
459 |
# |
460 |
einfo "Asterisk has been installed" |
461 |
echo |
462 |
elog "If you want to know more about asterisk, visit these sites:" |
463 |
elog "http://www.asteriskdocs.org/" |
464 |
elog "http://www.voip-info.org/wiki-Asterisk" |
465 |
echo |
466 |
elog "http://www.automated.it/guidetoasterisk.htm" |
467 |
echo |
468 |
elog "Gentoo VoIP IRC Channel:" |
469 |
elog "#gentoo-voip @ irc.freenode.net" |
470 |
echo |
471 |
echo |
472 |
|
473 |
# |
474 |
# Warning about 1.x -> 1.6 changes... |
475 |
# |
476 |
if is_ast10update || is_ast12update || is_ast14update; then |
477 |
ewarn "" |
478 |
ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 before continuing" |
479 |
ewarn "" |
480 |
fi |
481 |
} |
482 |
|
483 |
pkg_config() { |
484 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
485 |
|
486 |
read tmp |
487 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
488 |
|
489 |
if [[ "$tmp" = "y" ]] ||\ |
490 |
[[ "$tmp" = "yes" ]] |
491 |
then |
492 |
einfo "Resetting permissions to defaults..." |
493 |
|
494 |
for x in spool run lib log; do |
495 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
496 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
497 |
done |
498 |
|
499 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
500 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
501 |
|
502 |
einfo "done" |
503 |
else |
504 |
einfo "skipping" |
505 |
fi |
506 |
} |