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: asterisk-11.0.1-r2.ebuild asterisk-1.8.18.0-r2.ebuild ChangeLog asterisk-10.10.0-r2.ebuild asterisk-10.10.0-r1.ebuild asterisk-11.0.1-r1.ebuild asterisk-1.8.18.0-r1.ebuild
Date: Sat, 01 Dec 2012 22:08:10
Message-Id: 20121201220759.17E7121707@flycatcher.gentoo.org
1 chainsaw 12/12/01 22:07:59
2
3 Modified: ChangeLog
4 Added: asterisk-11.0.1-r2.ebuild
5 asterisk-1.8.18.0-r2.ebuild
6 asterisk-10.10.0-r2.ebuild
7 Removed: asterisk-10.10.0-r1.ebuild
8 asterisk-11.0.1-r1.ebuild
9 asterisk-1.8.18.0-r1.ebuild
10 Log:
11 OpenRC has seen fit to overhaul /var/run; as identified by Vincent Brillault in bug #445182 our init scripts require immediate adjustments. With thanks to Jaco Kroon for review. Updating all three branches and removing all non-stable now unusable ebuilds.
12
13 (Portage version: 2.1.11.32/cvs/Linux x86_64, unsigned Manifest commit)
14
15 Revision Changes Path
16 1.425 net-misc/asterisk/ChangeLog
17
18 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.425&view=markup
19 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.425&content-type=text/plain
20 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.424&r2=1.425
21
22 Index: ChangeLog
23 ===================================================================
24 RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v
25 retrieving revision 1.424
26 retrieving revision 1.425
27 diff -u -r1.424 -r1.425
28 --- ChangeLog 21 Nov 2012 16:08:54 -0000 1.424
29 +++ ChangeLog 1 Dec 2012 22:07:58 -0000 1.425
30 @@ -1,6 +1,19 @@
31 # ChangeLog for net-misc/asterisk
32 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
33 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.424 2012/11/21 16:08:54 chainsaw Exp $
34 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.425 2012/12/01 22:07:58 chainsaw Exp $
35 +
36 +*asterisk-11.0.1-r2 (01 Dec 2012)
37 +*asterisk-10.10.0-r2 (01 Dec 2012)
38 +*asterisk-1.8.18.0-r2 (01 Dec 2012)
39 +
40 + 01 Dec 2012; Tony Vroon <chainsaw@g.o> +files/1.8.0/asterisk.initd4,
41 + -asterisk-1.8.18.0-r1.ebuild, +asterisk-1.8.18.0-r2.ebuild,
42 + -asterisk-10.10.0-r1.ebuild, +asterisk-10.10.0-r2.ebuild,
43 + -asterisk-11.0.1-r1.ebuild, +asterisk-11.0.1-r2.ebuild:
44 + OpenRC has seen fit to overhaul /var/run; as identified by Vincent Brillault
45 + in bug #445182 our init scripts require immediate adjustments. With thanks to
46 + Jaco Kroon for review. Updating all three branches and removing all
47 + non-stable now unusable ebuilds.
48
49 *asterisk-1.8.18.0-r1 (21 Nov 2012)
50
51
52
53
54 1.1 net-misc/asterisk/asterisk-11.0.1-r2.ebuild
55
56 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.0.1-r2.ebuild?rev=1.1&view=markup
57 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.0.1-r2.ebuild?rev=1.1&content-type=text/plain
58
59 Index: asterisk-11.0.1-r2.ebuild
60 ===================================================================
61 # Copyright 1999-2012 Gentoo Foundation
62 # Distributed under the terms of the GNU General Public License v2
63 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-11.0.1-r2.ebuild,v 1.1 2012/12/01 22:07:58 chainsaw Exp $
64
65 EAPI=4
66 inherit autotools base eutils linux-info multilib
67
68 MY_P="${PN}-${PV/_/-}"
69
70 DESCRIPTION="Asterisk: A Modular Open Source PBX System"
71 HOMEPAGE="http://www.asterisk.org/"
72 SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
73 mirror://gentoo/gentoo-asterisk-patchset-3.1.tar.bz2"
74 LICENSE="GPL-2"
75 SLOT="0"
76 KEYWORDS="~amd64 ~x86"
77
78 IUSE_VOICEMAIL_STORAGE="
79 +voicemail_storage_file
80 voicemail_storage_odbc
81 voicemail_storage_imap
82 "
83 IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc jabber ldap libedit lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis"
84 IUSE_EXPAND="VOICEMAIL_STORAGE"
85 REQUIRED_USE="gtalk? ( jabber )
86 ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
87 voicemail_storage_odbc? ( odbc )
88 "
89
90 EPATCH_SUFFIX="patch"
91 PATCHES=( "${WORKDIR}/asterisk-patchset" )
92
93 RDEPEND="dev-db/sqlite:3
94 dev-libs/popt
95 dev-libs/libxml2
96 dev-libs/openssl
97 sys-libs/ncurses
98 sys-libs/zlib
99 alsa? ( media-libs/alsa-lib )
100 bluetooth? ( net-wireless/bluez )
101 calendar? ( net-libs/neon
102 dev-libs/libical
103 dev-libs/iksemel )
104 caps? ( sys-libs/libcap )
105 cluster? ( sys-cluster/corosync )
106 curl? ( net-misc/curl )
107 dahdi? ( >=net-libs/libpri-1.4.12_beta2
108 net-misc/dahdi-tools )
109 freetds? ( dev-db/freetds )
110 gtalk? ( dev-libs/iksemel )
111 http? ( dev-libs/gmime:2.4 )
112 iconv? ( virtual/libiconv )
113 ilbc? ( dev-libs/ilbc-rfc3951 )
114 jabber? ( dev-libs/iksemel )
115 ldap? ( net-nds/openldap )
116 libedit? ( dev-libs/libedit )
117 lua? ( dev-lang/lua )
118 mysql? ( virtual/mysql )
119 newt? ( dev-libs/newt )
120 odbc? ( dev-db/unixODBC )
121 osplookup? ( net-libs/osptoolkit )
122 portaudio? ( media-libs/portaudio )
123 postgres? ( dev-db/postgresql-base )
124 radius? ( net-dialup/radiusclient-ng )
125 selinux? ( sec-policy/selinux-asterisk )
126 snmp? ( net-analyzer/net-snmp )
127 span? ( media-libs/spandsp )
128 speex? ( media-libs/speex )
129 srtp? ( net-libs/libsrtp )
130 vorbis? ( media-libs/libvorbis )"
131
132 DEPEND="${RDEPEND}
133 !net-libs/openh323
134 voicemail_storage_imap? ( virtual/imap-c-client )
135 "
136
137 RDEPEND="${RDEPEND}
138 syslog? ( virtual/logger )"
139
140 PDEPEND="net-misc/asterisk-core-sounds
141 net-misc/asterisk-extra-sounds
142 net-misc/asterisk-moh-opsound"
143
144 S="${WORKDIR}/${MY_P}"
145
146 pkg_setup() {
147 CONFIG_CHECK="~!NF_CONNTRACK_SIP"
148 local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
149 have reported that this module dropped critical SIP packets in their deployments. You
150 may want to disable it if you see such problems."
151 check_extra_config
152
153 enewgroup asterisk
154 enewgroup dialout 20
155 enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
156 }
157
158 src_prepare() {
159 base_src_prepare
160 AT_M4DIR=autoconf eautoreconf
161 }
162
163 src_configure() {
164 local vmst
165
166 econf \
167 --libdir="/usr/$(get_libdir)" \
168 --localstatedir="/var" \
169 --with-crypto \
170 --with-gsm=internal \
171 --with-popt \
172 --with-ssl \
173 --with-z \
174 --without-pwlib \
175 $(use_with caps cap) \
176 $(use_with http gmime) \
177 $(use_with newt) \
178 $(use_with portaudio)
179
180 # Blank out sounds/sounds.xml file to prevent
181 # asterisk from installing sounds files (we pull them in via
182 # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
183 >"${S}"/sounds/sounds.xml
184
185 # Compile menuselect binary for optional components
186 emake menuselect.makeopts
187
188 # Broken functionality is forcibly disabled (bug #360143)
189 menuselect/menuselect --disable chan_misdn menuselect.makeopts
190 menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
191
192 # Utility set is forcibly enabled (bug #358001)
193 menuselect/menuselect --enable smsq menuselect.makeopts
194 menuselect/menuselect --enable streamplayer menuselect.makeopts
195 menuselect/menuselect --enable aelparse menuselect.makeopts
196 menuselect/menuselect --enable astman menuselect.makeopts
197
198 # this is connected, otherwise it would not find
199 # ast_pktccops_gate_alloc symbol
200 menuselect/menuselect --enable chan_mgcp menuselect.makeopts
201 menuselect/menuselect --enable res_pktccops menuselect.makeopts
202
203 # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
204 menuselect/menuselect --enable pbx_dundi menuselect.makeopts
205 menuselect/menuselect --enable func_aes menuselect.makeopts
206 menuselect/menuselect --enable chan_iax2 menuselect.makeopts
207
208 # SQlite3 is now the main database backend, enable related features
209 menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
210 menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
211
212 # The others are based on USE-flag settings
213 use_select() {
214 local state=$(use "$1" && echo enable || echo disable)
215 shift # remove use from parameters
216
217 while [[ -n $1 ]]; do
218 menuselect/menuselect --${state} "$1" menuselect.makeopts
219 shift
220 done
221 }
222
223 use_select alsa chan_alsa
224 use_select bluetooth chan_mobile
225 use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
226 use_select cluster res_corosync
227 use_select curl func_curl res_config_curl res_curl
228 use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi
229 use_select freetds {cdr,cel}_tds
230 use_select gtalk chan_motif
231 use_select http res_http_post
232 use_select iconv func_iconv
233 use_select jabber res_xmpp
234 use_select ilbc codec_ilbc format_ilbc
235 use_select ldap res_config_ldap
236 use_select lua pbx_lua
237 use_select mysql app_mysql cdr_mysql res_config_mysql
238 use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
239 use_select osplookup app_osplookup
240 use_select oss chan_oss
241 use_select postgres {cdr,cel}_pgsql res_config_pgsql
242 use_select radius {cdr,cel}_radius
243 use_select snmp res_snmp
244 use_select span res_fax_spandsp
245 use_select speex {codec,func}_speex
246 use_select srtp res_srtp
247 use_select syslog cdr_syslog
248 use_select vorbis format_ogg_vorbis
249
250 # Voicemail storage ...
251 for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
252 if use ${vmst}; then
253 menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
254 fi
255 done
256 }
257
258 src_compile() {
259 ASTLDFLAGS="${LDFLAGS}" emake
260 }
261
262 src_install() {
263 mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
264 emake DESTDIR="${D}" installdirs
265 emake DESTDIR="${D}" install
266
267 if use radius; then
268 insinto /etc/radiusclient-ng/
269 doins contrib/dictionary.digium
270 fi
271 if use samples; then
272 emake DESTDIR="${D}" samples
273 for conffile in "${D}"etc/asterisk/*.*
274 do
275 chown asterisk:asterisk $conffile
276 chmod 0660 $conffile
277 done
278 einfo "Sample files have been installed"
279 else
280 einfo "Skipping installation of sample files..."
281 rm -f "${D}"var/lib/asterisk/mohmp3/* || die
282 rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
283 rm -f "${D}"var/lib/asterisk/agi-bin/* || die
284 rm -f "${D}"etc/asterisk/* || die
285 fi
286 rm -rf "${D}"var/spool/asterisk/voicemail/default || die
287
288 # keep directories
289 diropts -m 0770 -o asterisk -g asterisk
290 keepdir /etc/asterisk
291 keepdir /var/lib/asterisk
292 keepdir /var/run/asterisk
293 keepdir /var/spool/asterisk
294 keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
295 diropts -m 0750 -o asterisk -g asterisk
296 keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
297
298 newinitd "${FILESDIR}"/1.8.0/asterisk.initd4 asterisk
299 newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
300
301 # install the upgrade documentation
302 #
303 dodoc README UPGRADE* BUGS CREDITS
304
305 # install extra documentation
306 #
307 if use doc
308 then
309 dodoc doc/*.txt
310 dodoc doc/*.pdf
311 fi
312
313 # install SIP scripts; bug #300832
314 #
315 dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
316 dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
317 dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
318 dodoc "${FILESDIR}/1.6.2/call_data.txt"
319
320 # install logrotate snippet; bug #329281
321 #
322 insinto /etc/logrotate.d
323 newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk
324 }
325
326 pkg_postinst() {
327 #
328 # Announcements, warnings, reminders...
329 #
330 einfo "Asterisk has been installed"
331 echo
332 elog "If you want to know more about asterisk, visit these sites:"
333 elog "http://www.asteriskdocs.org/"
334 elog "http://www.voip-info.org/wiki-Asterisk"
335 echo
336 elog "http://www.automated.it/guidetoasterisk.htm"
337 echo
338 elog "Gentoo VoIP IRC Channel:"
339 elog "#gentoo-voip @ irc.freenode.net"
340 echo
341 echo
342 elog "Please read the Asterisk 11 upgrade document:"
343 elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11"
344 }
345
346 pkg_config() {
347 einfo "Do you want to reset file permissions and ownerships (y/N)?"
348
349 read tmp
350 tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
351
352 if [[ "$tmp" = "y" ]] ||\
353 [[ "$tmp" = "yes" ]]
354 then
355 einfo "Resetting permissions to defaults..."
356
357 for x in spool run lib log; do
358 chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
359 chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
360 done
361
362 chown -R root:asterisk "${ROOT}"etc/asterisk
363 chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
364
365 einfo "done"
366 else
367 einfo "skipping"
368 fi
369 }
370
371
372
373 1.1 net-misc/asterisk/asterisk-1.8.18.0-r2.ebuild
374
375 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.8.18.0-r2.ebuild?rev=1.1&view=markup
376 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.8.18.0-r2.ebuild?rev=1.1&content-type=text/plain
377
378 Index: asterisk-1.8.18.0-r2.ebuild
379 ===================================================================
380 # Copyright 1999-2012 Gentoo Foundation
381 # Distributed under the terms of the GNU General Public License v2
382 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.8.18.0-r2.ebuild,v 1.1 2012/12/01 22:07:58 chainsaw Exp $
383
384 EAPI=4
385 inherit autotools base eutils linux-info multilib
386
387 MY_P="${PN}-${PV/_/-}"
388
389 DESCRIPTION="Asterisk: A Modular Open Source PBX System"
390 HOMEPAGE="http://www.asterisk.org/"
391 SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
392 mirror://gentoo/gentoo-asterisk-patchset-1.16.tar.bz2"
393 LICENSE="GPL-2"
394 SLOT="0"
395 KEYWORDS="~amd64 ~x86"
396
397 IUSE_VOICEMAIL_STORAGE="
398 +voicemail_storage_file
399 voicemail_storage_odbc
400 voicemail_storage_imap
401 "
402 IUSE="${IUSE_VOICEMAIL_STORAGE} ais alsa bluetooth calendar +caps curl dahdi debug doc freetds gtalk http iconv jabber jingle ldap lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex sqlite sqlite3 srtp static syslog vorbis"
403
404 IUSE_EXPAND="VOICEMAIL_STORAGE"
405
406 REQUIRED_USE="
407 gtalk? ( jabber )
408 ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
409 voicemail_storage_odbc? ( odbc )
410 "
411
412 EPATCH_SUFFIX="patch"
413 PATCHES=( "${WORKDIR}/asterisk-patchset" )
414
415 RDEPEND="dev-libs/popt
416 dev-libs/libxml2
417 dev-libs/openssl
418 sys-libs/ncurses
419 sys-libs/zlib
420 ais? ( sys-cluster/openais )
421 alsa? ( media-libs/alsa-lib )
422 bluetooth? ( net-wireless/bluez )
423 calendar? ( net-libs/neon
424 dev-libs/libical
425 dev-libs/iksemel )
426 caps? ( sys-libs/libcap )
427 curl? ( net-misc/curl )
428 dahdi? ( >=net-libs/libpri-1.4.12_beta2
429 net-misc/dahdi-tools )
430 freetds? ( dev-db/freetds )
431 gtalk? ( dev-libs/iksemel )
432 http? ( dev-libs/gmime:2.4 )
433 iconv? ( virtual/libiconv )
434 jabber? ( dev-libs/iksemel )
435 jingle? ( dev-libs/iksemel )
436 ldap? ( net-nds/openldap )
437 lua? ( dev-lang/lua )
438 mysql? ( virtual/mysql )
439 newt? ( dev-libs/newt )
440 odbc? ( dev-db/unixODBC )
441 osplookup? ( net-libs/osptoolkit )
442 portaudio? ( media-libs/portaudio )
443 postgres? ( dev-db/postgresql-base )
444 radius? ( net-dialup/radiusclient-ng )
445 selinux? ( sec-policy/selinux-asterisk )
446 snmp? ( net-analyzer/net-snmp )
447 span? ( media-libs/spandsp )
448 speex? ( media-libs/speex )
449 sqlite? ( dev-db/sqlite:0 )
450 sqlite3? ( dev-db/sqlite:3 )
451 srtp? ( net-libs/libsrtp )
452 vorbis? ( media-libs/libvorbis )"
453
454 DEPEND="${RDEPEND}
455 voicemail_storage_imap? ( virtual/imap-c-client )
456 !net-libs/openh323"
457
458 RDEPEND="${RDEPEND}
459 syslog? ( virtual/logger )"
460
461 PDEPEND="net-misc/asterisk-core-sounds
462 net-misc/asterisk-extra-sounds
463 net-misc/asterisk-moh-opsound"
464
465 S="${WORKDIR}/${MY_P}"
466
467 pkg_setup() {
468 CONFIG_CHECK="~!NF_CONNTRACK_SIP"
469 local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
470 have reported that this module dropped critical SIP packets in their deployments. You
471 may want to disable it if you see such problems."
472 check_extra_config
473
474 enewgroup asterisk
475 enewgroup dialout 20
476 enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
477 }
478
479 src_prepare() {
480 base_src_prepare
481 AT_M4DIR=autoconf eautoreconf
482 }
483
484 src_configure() {
485 local vmst
486
487 econf \
488 --libdir="/usr/$(get_libdir)" \
489 --localstatedir="/var" \
490 --with-crypto \
491 --with-gsm=internal \
492 --with-popt \
493 --with-ssl \
494 --with-z \
495 --without-pwlib \
496 $(use_with caps cap) \
497 $(use_with http gmime) \
498 $(use_with newt) \
499 $(use_with portaudio)
500
501 # Blank out sounds/sounds.xml file to prevent
502 # asterisk from installing sounds files (we pull them in via
503 # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
504 >"${S}"/sounds/sounds.xml
505
506 # Compile menuselect binary for optional components
507 emake menuselect.makeopts
508
509 # Broken functionality is forcibly disabled (bug #360143)
510 menuselect/menuselect --disable chan_misdn menuselect.makeopts
511 menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
512
513 # Utility set is forcibly enabled (bug #358001)
514 menuselect/menuselect --enable smsq menuselect.makeopts
515 menuselect/menuselect --enable streamplayer menuselect.makeopts
516 menuselect/menuselect --enable aelparse menuselect.makeopts
517 menuselect/menuselect --enable astman menuselect.makeopts
518
519 # this is connected, otherwise it would not find
520 # ast_pktccops_gate_alloc symbol
521 menuselect/menuselect --enable chan_mgcp menuselect.makeopts
522 menuselect/menuselect --enable res_pktccops menuselect.makeopts
523
524 # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
525 menuselect/menuselect --enable pbx_dundi menuselect.makeopts
526 menuselect/menuselect --enable func_aes menuselect.makeopts
527 menuselect/menuselect --enable chan_iax2 menuselect.makeopts
528
529 # The others are based on USE-flag settings
530 use_select() {
531 local state=$(use "$1" && echo enable || echo disable)
532 shift # remove use from parameters
533
534 while [[ -n $1 ]]; do
535 menuselect/menuselect --${state} "$1" menuselect.makeopts
536 shift
537 done
538 }
539
540 use_select ais res_ais
541 use_select alsa chan_alsa
542 use_select bluetooth chan_mobile
543 use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
544 use_select curl func_curl res_config_curl res_curl
545 use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi
546 use_select freetds {cdr,cel}_tds
547 use_select gtalk chan_gtalk
548 use_select http res_http_post
549 use_select iconv func_iconv
550 use_select jabber res_jabber
551 use_select jingle chan_jingle
552 use_select ldap res_config_ldap
553 use_select lua pbx_lua
554 use_select mysql app_mysql cdr_mysql res_config_mysql
555 use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
556 use_select osplookup app_osplookup
557 use_select oss chan_oss
558 use_select postgres {cdr,cel}_pgsql res_config_pgsql
559 use_select radius {cdr,cel}_radius
560 use_select snmp res_snmp
561 use_select span res_fax_spandsp
562 use_select speex {codec,func}_speex
563 use_select sqlite cdr_sqlite
564 use_select sqlite3 {cdr,cel}_sqlite3_custom
565 use_select srtp res_srtp
566 use_select syslog cdr_syslog
567 use_select vorbis format_ogg_vorbis
568
569 # Voicemail storage ...
570 for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
571 if use ${vmst}; then
572 menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
573 fi
574 done
575 }
576
577 src_compile() {
578 ASTLDFLAGS="${LDFLAGS}" emake
579 }
580
581 src_install() {
582 mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
583 emake DESTDIR="${D}" installdirs
584 emake DESTDIR="${D}" install
585
586 if use radius; then
587 insinto /etc/radiusclient-ng/
588 doins contrib/dictionary.digium
589 fi
590 if use samples; then
591 emake DESTDIR="${D}" samples
592 for conffile in "${D}"etc/asterisk/*.*
593 do
594 chown asterisk:asterisk $conffile
595 chmod 0660 $conffile
596 done
597 einfo "Sample files have been installed"
598 else
599 einfo "Skipping installation of sample files..."
600 rm -f "${D}"var/lib/asterisk/mohmp3/* || die
601 rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
602 rm -f "${D}"var/lib/asterisk/agi-bin/* || die
603 rm -f "${D}"etc/asterisk/* || die
604 fi
605 rm -rf "${D}"var/spool/asterisk/voicemail/default || die
606
607 # keep directories
608 diropts -m 0770 -o asterisk -g asterisk
609 keepdir /etc/asterisk
610 keepdir /var/lib/asterisk
611 keepdir /var/run/asterisk
612 keepdir /var/spool/asterisk
613 keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
614 diropts -m 0750 -o asterisk -g asterisk
615 keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
616
617 newinitd "${FILESDIR}"/1.8.0/asterisk.initd4 asterisk
618 newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
619
620 # install the upgrade documentation
621 #
622 dodoc README UPGRADE* BUGS CREDITS
623
624 # install extra documentation
625 #
626 if use doc
627 then
628 dodoc doc/*.txt
629 dodoc doc/*.pdf
630 fi
631
632 # install SIP scripts; bugs #300832 & #414585
633 #
634 dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
635 dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
636 dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
637 dodoc "${FILESDIR}/1.6.2/call_data.txt"
638
639 # install logrotate snippet; bug #329281
640 #
641 insinto /etc/logrotate.d
642 newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk
643 }
644
645 pkg_postinst() {
646 #
647 # Announcements, warnings, reminders...
648 #
649 einfo "Asterisk has been installed"
650 echo
651 elog "If you want to know more about asterisk, visit these sites:"
652 elog "http://www.asteriskdocs.org/"
653 elog "http://www.voip-info.org/wiki-Asterisk"
654 echo
655 elog "http://www.automated.it/guidetoasterisk.htm"
656 echo
657 elog "Gentoo VoIP IRC Channel:"
658 elog "#gentoo-voip @ irc.freenode.net"
659 echo
660 echo
661 elog "1.6 -> 1.8 changes that you may care about:"
662 elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt"
663 elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2"
664 }
665
666 pkg_config() {
667 einfo "Do you want to reset file permissions and ownerships (y/N)?"
668
669 read tmp
670 tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
671
672 if [[ "$tmp" = "y" ]] ||\
673 [[ "$tmp" = "yes" ]]
674 then
675 einfo "Resetting permissions to defaults..."
676
677 for x in spool run lib log; do
678 chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
679 chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
680 done
681
682 chown -R root:asterisk "${ROOT}"etc/asterisk
683 chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
684
685 einfo "done"
686 else
687 einfo "skipping"
688 fi
689 }
690
691
692
693 1.1 net-misc/asterisk/asterisk-10.10.0-r2.ebuild
694
695 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-10.10.0-r2.ebuild?rev=1.1&view=markup
696 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-10.10.0-r2.ebuild?rev=1.1&content-type=text/plain
697
698 Index: asterisk-10.10.0-r2.ebuild
699 ===================================================================
700 # Copyright 1999-2012 Gentoo Foundation
701 # Distributed under the terms of the GNU General Public License v2
702 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-10.10.0-r2.ebuild,v 1.1 2012/12/01 22:07:58 chainsaw Exp $
703
704 EAPI=4
705 inherit autotools base eutils linux-info multilib
706
707 MY_P="${PN}-${PV/_/-}"
708
709 DESCRIPTION="Asterisk: A Modular Open Source PBX System"
710 HOMEPAGE="http://www.asterisk.org/"
711 SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
712 mirror://gentoo/gentoo-asterisk-patchset-2.8.tar.bz2"
713 LICENSE="GPL-2"
714 SLOT="0"
715 KEYWORDS="~amd64 ~x86"
716
717 IUSE_VOICEMAIL_STORAGE="
718 +voicemail_storage_file
719 voicemail_storage_odbc
720 voicemail_storage_imap
721 "
722 IUSE="${IUSE_VOICEMAIL_STORAGE} ais alsa bluetooth calendar +caps curl dahdi debug doc freetds gtalk http iconv jabber jingle ldap lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis"
723 IUSE_EXPAND="VOICEMAIL_STORAGE"
724 REQUIRED_USE="gtalk? ( jabber )
725 ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
726 voicemail_storage_odbc? ( odbc )
727 "
728
729 EPATCH_SUFFIX="patch"
730 PATCHES=( "${WORKDIR}/asterisk-patchset" )
731
732 RDEPEND="dev-db/sqlite:3
733 dev-libs/popt
734 dev-libs/libxml2
735 dev-libs/openssl
736 sys-libs/ncurses
737 sys-libs/zlib
738 ais? ( sys-cluster/openais )
739 alsa? ( media-libs/alsa-lib )
740 bluetooth? ( net-wireless/bluez )
741 calendar? ( net-libs/neon
742 dev-libs/libical
743 dev-libs/iksemel )
744 caps? ( sys-libs/libcap )
745 curl? ( net-misc/curl )
746 dahdi? ( >=net-libs/libpri-1.4.12_beta2
747 net-misc/dahdi-tools )
748 freetds? ( dev-db/freetds )
749 gtalk? ( dev-libs/iksemel )
750 http? ( dev-libs/gmime:2.4 )
751 iconv? ( virtual/libiconv )
752 jabber? ( dev-libs/iksemel )
753 jingle? ( dev-libs/iksemel )
754 ldap? ( net-nds/openldap )
755 lua? ( dev-lang/lua )
756 mysql? ( virtual/mysql )
757 newt? ( dev-libs/newt )
758 odbc? ( dev-db/unixODBC )
759 osplookup? ( net-libs/osptoolkit )
760 portaudio? ( media-libs/portaudio )
761 postgres? ( dev-db/postgresql-base )
762 radius? ( net-dialup/radiusclient-ng )
763 selinux? ( sec-policy/selinux-asterisk )
764 snmp? ( net-analyzer/net-snmp )
765 span? ( media-libs/spandsp )
766 speex? ( media-libs/speex )
767 srtp? ( net-libs/libsrtp )
768 vorbis? ( media-libs/libvorbis )"
769
770 DEPEND="${RDEPEND}
771 !net-libs/openh323
772 voicemail_storage_imap? ( virtual/imap-c-client )
773 "
774
775 RDEPEND="${RDEPEND}
776 syslog? ( virtual/logger )"
777
778 PDEPEND="net-misc/asterisk-core-sounds
779 net-misc/asterisk-extra-sounds
780 net-misc/asterisk-moh-opsound"
781
782 S="${WORKDIR}/${MY_P}"
783
784 pkg_setup() {
785 CONFIG_CHECK="~!NF_CONNTRACK_SIP"
786 local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
787 have reported that this module dropped critical SIP packets in their deployments. You
788 may want to disable it if you see such problems."
789 check_extra_config
790
791 enewgroup asterisk
792 enewgroup dialout 20
793 enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
794 }
795
796 src_prepare() {
797 base_src_prepare
798 AT_M4DIR=autoconf eautoreconf
799 }
800
801 src_configure() {
802 local vmst
803
804 econf \
805 --libdir="/usr/$(get_libdir)" \
806 --localstatedir="/var" \
807 --with-crypto \
808 --with-gsm=internal \
809 --with-popt \
810 --with-ssl \
811 --with-z \
812 --without-pwlib \
813 $(use_with caps cap) \
814 $(use_with http gmime) \
815 $(use_with newt) \
816 $(use_with portaudio)
817
818 # Blank out sounds/sounds.xml file to prevent
819 # asterisk from installing sounds files (we pull them in via
820 # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
821 >"${S}"/sounds/sounds.xml
822
823 # Compile menuselect binary for optional components
824 emake menuselect.makeopts
825
826 # Broken functionality is forcibly disabled (bug #360143)
827 menuselect/menuselect --disable chan_misdn menuselect.makeopts
828 menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
829
830 # Utility set is forcibly enabled (bug #358001)
831 menuselect/menuselect --enable smsq menuselect.makeopts
832 menuselect/menuselect --enable streamplayer menuselect.makeopts
833 menuselect/menuselect --enable aelparse menuselect.makeopts
834 menuselect/menuselect --enable astman menuselect.makeopts
835
836 # this is connected, otherwise it would not find
837 # ast_pktccops_gate_alloc symbol
838 menuselect/menuselect --enable chan_mgcp menuselect.makeopts
839 menuselect/menuselect --enable res_pktccops menuselect.makeopts
840
841 # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
842 menuselect/menuselect --enable pbx_dundi menuselect.makeopts
843 menuselect/menuselect --enable func_aes menuselect.makeopts
844 menuselect/menuselect --enable chan_iax2 menuselect.makeopts
845
846 # SQlite3 is now the main database backend, enable related features
847 menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
848 menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
849
850 # The others are based on USE-flag settings
851 use_select() {
852 local state=$(use "$1" && echo enable || echo disable)
853 shift # remove use from parameters
854
855 while [[ -n $1 ]]; do
856 menuselect/menuselect --${state} "$1" menuselect.makeopts
857 shift
858 done
859 }
860
861 use_select ais res_ais
862 use_select alsa chan_alsa
863 use_select bluetooth chan_mobile
864 use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
865 use_select curl func_curl res_config_curl res_curl
866 use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi
867 use_select freetds {cdr,cel}_tds
868 use_select gtalk chan_gtalk
869 use_select http res_http_post
870 use_select iconv func_iconv
871 use_select jabber res_jabber
872 use_select jingle chan_jingle
873 use_select ldap res_config_ldap
874 use_select lua pbx_lua
875 use_select mysql app_mysql cdr_mysql res_config_mysql
876 use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
877 use_select osplookup app_osplookup
878 use_select oss chan_oss
879 use_select postgres {cdr,cel}_pgsql res_config_pgsql
880 use_select radius {cdr,cel}_radius
881 use_select snmp res_snmp
882 use_select span res_fax_spandsp
883 use_select speex {codec,func}_speex
884 use_select srtp res_srtp
885 use_select syslog cdr_syslog
886 use_select vorbis format_ogg_vorbis
887
888 # Voicemail storage ...
889 for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
890 if use ${vmst}; then
891 menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
892 fi
893 done
894 }
895
896 src_compile() {
897 ASTLDFLAGS="${LDFLAGS}" emake
898 }
899
900 src_install() {
901 mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
902 emake DESTDIR="${D}" installdirs
903 emake DESTDIR="${D}" install
904
905 if use radius; then
906 insinto /etc/radiusclient-ng/
907 doins contrib/dictionary.digium
908 fi
909 if use samples; then
910 emake DESTDIR="${D}" samples
911 for conffile in "${D}"etc/asterisk/*.*
912 do
913 chown asterisk:asterisk $conffile
914 chmod 0660 $conffile
915 done
916 einfo "Sample files have been installed"
917 else
918 einfo "Skipping installation of sample files..."
919 rm -f "${D}"var/lib/asterisk/mohmp3/* || die
920 rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
921 rm -f "${D}"var/lib/asterisk/agi-bin/* || die
922 rm -f "${D}"etc/asterisk/* || die
923 fi
924 rm -rf "${D}"var/spool/asterisk/voicemail/default || die
925
926 # keep directories
927 diropts -m 0770 -o asterisk -g asterisk
928 keepdir /etc/asterisk
929 keepdir /var/lib/asterisk
930 keepdir /var/run/asterisk
931 keepdir /var/spool/asterisk
932 keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
933 diropts -m 0750 -o asterisk -g asterisk
934 keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
935
936 newinitd "${FILESDIR}"/1.8.0/asterisk.initd4 asterisk
937 newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
938
939 # install the upgrade documentation
940 #
941 dodoc README UPGRADE* BUGS CREDITS
942
943 # install extra documentation
944 #
945 if use doc
946 then
947 dodoc doc/*.txt
948 dodoc doc/*.pdf
949 fi
950
951 # install SIP scripts; bug #300832
952 #
953 dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
954 dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
955 dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
956 dodoc "${FILESDIR}/1.6.2/call_data.txt"
957
958 # install logrotate snippet; bug #329281
959 #
960 insinto /etc/logrotate.d
961 newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk
962 }
963
964 pkg_postinst() {
965 #
966 # Announcements, warnings, reminders...
967 #
968 einfo "Asterisk has been installed"
969 echo
970 elog "If you want to know more about asterisk, visit these sites:"
971 elog "http://www.asteriskdocs.org/"
972 elog "http://www.voip-info.org/wiki-Asterisk"
973 echo
974 elog "http://www.automated.it/guidetoasterisk.htm"
975 echo
976 elog "Gentoo VoIP IRC Channel:"
977 elog "#gentoo-voip @ irc.freenode.net"
978 echo
979 echo
980 elog "1.6 -> 1.8 changes that you may care about:"
981 elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt"
982 elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2"
983 }
984
985 pkg_config() {
986 einfo "Do you want to reset file permissions and ownerships (y/N)?"
987
988 read tmp
989 tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
990
991 if [[ "$tmp" = "y" ]] ||\
992 [[ "$tmp" = "yes" ]]
993 then
994 einfo "Resetting permissions to defaults..."
995
996 for x in spool run lib log; do
997 chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
998 chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
999 done
1000
1001 chown -R root:asterisk "${ROOT}"etc/asterisk
1002 chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
1003
1004 einfo "done"
1005 else
1006 einfo "skipping"
1007 fi
1008 }