Gentoo Archives: gentoo-commits

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