1 |
chainsaw 13/03/29 17:06:26 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-1.8.21.0.ebuild asterisk-11.3.0.ebuild |
5 |
Log: |
6 |
Bugfix releases on both branches. Native RTP bridging is no longer attempted if packetisation differs, this helps to prevent fax failures. Improved locking to prevent deadlocks. |
7 |
|
8 |
(Portage version: 2.1.11.59/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A) |
9 |
|
10 |
Revision Changes Path |
11 |
1.448 net-misc/asterisk/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.448&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.448&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.447&r2=1.448 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
20 |
retrieving revision 1.447 |
21 |
retrieving revision 1.448 |
22 |
diff -u -r1.447 -r1.448 |
23 |
--- ChangeLog 28 Mar 2013 17:17:54 -0000 1.447 |
24 |
+++ ChangeLog 29 Mar 2013 17:06:26 -0000 1.448 |
25 |
@@ -1,6 +1,15 @@ |
26 |
# ChangeLog for net-misc/asterisk |
27 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.447 2013/03/28 17:17:54 chainsaw Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.448 2013/03/29 17:06:26 chainsaw Exp $ |
30 |
+ |
31 |
+*asterisk-11.3.0 (29 Mar 2013) |
32 |
+*asterisk-1.8.21.0 (29 Mar 2013) |
33 |
+ |
34 |
+ 29 Mar 2013; Tony Vroon <chainsaw@g.o> +asterisk-1.8.21.0.ebuild, |
35 |
+ +asterisk-11.3.0.ebuild: |
36 |
+ Bugfix releases on both branches. Native RTP bridging is no longer attempted |
37 |
+ if packetisation differs, this helps to prevent fax failures. Improved |
38 |
+ locking to prevent deadlocks. |
39 |
|
40 |
*asterisk-11.2.2 (28 Mar 2013) |
41 |
*asterisk-1.8.20.2 (28 Mar 2013) |
42 |
|
43 |
|
44 |
|
45 |
1.1 net-misc/asterisk/asterisk-1.8.21.0.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.8.21.0.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.8.21.0.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: asterisk-1.8.21.0.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2013 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.8.21.0.ebuild,v 1.1 2013/03/29 17:06:26 chainsaw Exp $ |
55 |
|
56 |
EAPI=5 |
57 |
inherit autotools base eutils linux-info multilib |
58 |
|
59 |
MY_P="${PN}-${PV/_/-}" |
60 |
|
61 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
62 |
HOMEPAGE="http://www.asterisk.org/" |
63 |
SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
64 |
mirror://gentoo/gentoo-asterisk-patchset-1.17.tar.bz2" |
65 |
LICENSE="GPL-2" |
66 |
SLOT="0" |
67 |
KEYWORDS="~amd64 ~x86" |
68 |
|
69 |
IUSE_VOICEMAIL_STORAGE=" |
70 |
+voicemail_storage_file |
71 |
voicemail_storage_odbc |
72 |
voicemail_storage_imap |
73 |
" |
74 |
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" |
75 |
|
76 |
IUSE_EXPAND="VOICEMAIL_STORAGE" |
77 |
|
78 |
REQUIRED_USE=" |
79 |
gtalk? ( jabber ) |
80 |
^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
81 |
voicemail_storage_odbc? ( odbc ) |
82 |
" |
83 |
|
84 |
EPATCH_SUFFIX="patch" |
85 |
PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
86 |
|
87 |
RDEPEND="dev-libs/popt |
88 |
dev-libs/libxml2 |
89 |
dev-libs/openssl |
90 |
sys-libs/ncurses |
91 |
sys-libs/zlib |
92 |
ais? ( sys-cluster/openais ) |
93 |
alsa? ( media-libs/alsa-lib ) |
94 |
bluetooth? ( net-wireless/bluez ) |
95 |
calendar? ( net-libs/neon |
96 |
dev-libs/libical |
97 |
dev-libs/iksemel ) |
98 |
caps? ( sys-libs/libcap ) |
99 |
curl? ( net-misc/curl ) |
100 |
dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
101 |
net-misc/dahdi-tools ) |
102 |
freetds? ( dev-db/freetds ) |
103 |
gtalk? ( dev-libs/iksemel ) |
104 |
http? ( dev-libs/gmime:2.4 ) |
105 |
iconv? ( virtual/libiconv ) |
106 |
jabber? ( dev-libs/iksemel ) |
107 |
jingle? ( dev-libs/iksemel ) |
108 |
ldap? ( net-nds/openldap ) |
109 |
lua? ( dev-lang/lua ) |
110 |
mysql? ( virtual/mysql ) |
111 |
newt? ( dev-libs/newt ) |
112 |
odbc? ( dev-db/unixODBC ) |
113 |
osplookup? ( net-libs/osptoolkit ) |
114 |
portaudio? ( media-libs/portaudio ) |
115 |
postgres? ( dev-db/postgresql-base ) |
116 |
radius? ( net-dialup/radiusclient-ng ) |
117 |
selinux? ( sec-policy/selinux-asterisk ) |
118 |
snmp? ( net-analyzer/net-snmp ) |
119 |
span? ( media-libs/spandsp ) |
120 |
speex? ( media-libs/speex ) |
121 |
sqlite? ( dev-db/sqlite:0 ) |
122 |
sqlite3? ( dev-db/sqlite:3 ) |
123 |
srtp? ( net-libs/libsrtp ) |
124 |
vorbis? ( media-libs/libvorbis )" |
125 |
|
126 |
DEPEND="${RDEPEND} |
127 |
voicemail_storage_imap? ( virtual/imap-c-client ) |
128 |
!net-libs/openh323" |
129 |
|
130 |
RDEPEND="${RDEPEND} |
131 |
syslog? ( virtual/logger )" |
132 |
|
133 |
PDEPEND="net-misc/asterisk-core-sounds |
134 |
net-misc/asterisk-extra-sounds |
135 |
net-misc/asterisk-moh-opsound" |
136 |
|
137 |
S="${WORKDIR}/${MY_P}" |
138 |
|
139 |
pkg_setup() { |
140 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
141 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
142 |
have reported that this module dropped critical SIP packets in their deployments. You |
143 |
may want to disable it if you see such problems." |
144 |
check_extra_config |
145 |
|
146 |
enewgroup asterisk |
147 |
enewgroup dialout 20 |
148 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
149 |
} |
150 |
|
151 |
src_prepare() { |
152 |
base_src_prepare |
153 |
AT_M4DIR=autoconf eautoreconf |
154 |
} |
155 |
|
156 |
src_configure() { |
157 |
local vmst |
158 |
|
159 |
econf \ |
160 |
--libdir="/usr/$(get_libdir)" \ |
161 |
--localstatedir="/var" \ |
162 |
--with-crypto \ |
163 |
--with-gsm=internal \ |
164 |
--with-popt \ |
165 |
--with-ssl \ |
166 |
--with-z \ |
167 |
--without-pwlib \ |
168 |
$(use_with caps cap) \ |
169 |
$(use_with http gmime) \ |
170 |
$(use_with newt) \ |
171 |
$(use_with portaudio) |
172 |
|
173 |
# Blank out sounds/sounds.xml file to prevent |
174 |
# asterisk from installing sounds files (we pull them in via |
175 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
176 |
>"${S}"/sounds/sounds.xml |
177 |
|
178 |
# Compile menuselect binary for optional components |
179 |
emake menuselect.makeopts |
180 |
|
181 |
# Broken functionality is forcibly disabled (bug #360143) |
182 |
menuselect/menuselect --disable chan_misdn menuselect.makeopts |
183 |
menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
184 |
|
185 |
# Utility set is forcibly enabled (bug #358001) |
186 |
menuselect/menuselect --enable smsq menuselect.makeopts |
187 |
menuselect/menuselect --enable streamplayer menuselect.makeopts |
188 |
menuselect/menuselect --enable aelparse menuselect.makeopts |
189 |
menuselect/menuselect --enable astman menuselect.makeopts |
190 |
|
191 |
# this is connected, otherwise it would not find |
192 |
# ast_pktccops_gate_alloc symbol |
193 |
menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
194 |
menuselect/menuselect --enable res_pktccops menuselect.makeopts |
195 |
|
196 |
# SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
197 |
menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
198 |
menuselect/menuselect --enable func_aes menuselect.makeopts |
199 |
menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
200 |
|
201 |
# The others are based on USE-flag settings |
202 |
use_select() { |
203 |
local state=$(use "$1" && echo enable || echo disable) |
204 |
shift # remove use from parameters |
205 |
|
206 |
while [[ -n $1 ]]; do |
207 |
menuselect/menuselect --${state} "$1" menuselect.makeopts |
208 |
shift |
209 |
done |
210 |
} |
211 |
|
212 |
use_select ais res_ais |
213 |
use_select alsa chan_alsa |
214 |
use_select bluetooth chan_mobile |
215 |
use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
216 |
use_select curl func_curl res_config_curl res_curl |
217 |
use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi |
218 |
use_select freetds {cdr,cel}_tds |
219 |
use_select gtalk chan_gtalk |
220 |
use_select http res_http_post |
221 |
use_select iconv func_iconv |
222 |
use_select jabber res_jabber |
223 |
use_select jingle chan_jingle |
224 |
use_select ldap res_config_ldap |
225 |
use_select lua pbx_lua |
226 |
use_select mysql app_mysql cdr_mysql res_config_mysql |
227 |
use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
228 |
use_select osplookup app_osplookup |
229 |
use_select oss chan_oss |
230 |
use_select postgres {cdr,cel}_pgsql res_config_pgsql |
231 |
use_select radius {cdr,cel}_radius |
232 |
use_select snmp res_snmp |
233 |
use_select span res_fax_spandsp |
234 |
use_select speex {codec,func}_speex |
235 |
use_select sqlite cdr_sqlite |
236 |
use_select sqlite3 {cdr,cel}_sqlite3_custom |
237 |
use_select srtp res_srtp |
238 |
use_select syslog cdr_syslog |
239 |
use_select vorbis format_ogg_vorbis |
240 |
|
241 |
# Voicemail storage ... |
242 |
for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
243 |
if use ${vmst}; then |
244 |
menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
245 |
fi |
246 |
done |
247 |
} |
248 |
|
249 |
src_compile() { |
250 |
ASTLDFLAGS="${LDFLAGS}" emake |
251 |
} |
252 |
|
253 |
src_install() { |
254 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
255 |
emake DESTDIR="${D}" installdirs |
256 |
emake DESTDIR="${D}" install |
257 |
|
258 |
if use radius; then |
259 |
insinto /etc/radiusclient-ng/ |
260 |
doins contrib/dictionary.digium |
261 |
fi |
262 |
if use samples; then |
263 |
emake DESTDIR="${D}" samples |
264 |
for conffile in "${D}"etc/asterisk/*.* |
265 |
do |
266 |
chown asterisk:asterisk $conffile |
267 |
chmod 0660 $conffile |
268 |
done |
269 |
einfo "Sample files have been installed" |
270 |
else |
271 |
einfo "Skipping installation of sample files..." |
272 |
rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
273 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
274 |
rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
275 |
rm -f "${D}"etc/asterisk/* || die |
276 |
fi |
277 |
rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
278 |
|
279 |
# keep directories |
280 |
diropts -m 0770 -o asterisk -g asterisk |
281 |
keepdir /etc/asterisk |
282 |
keepdir /var/lib/asterisk |
283 |
keepdir /var/spool/asterisk |
284 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
285 |
diropts -m 0750 -o asterisk -g asterisk |
286 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
287 |
|
288 |
newinitd "${FILESDIR}"/1.8.0/asterisk.initd5 asterisk |
289 |
newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
290 |
|
291 |
# install the upgrade documentation |
292 |
# |
293 |
dodoc README UPGRADE* BUGS CREDITS |
294 |
|
295 |
# install extra documentation |
296 |
# |
297 |
if use doc |
298 |
then |
299 |
dodoc doc/*.txt |
300 |
dodoc doc/*.pdf |
301 |
fi |
302 |
|
303 |
# install SIP scripts; bugs #300832 & #414585 |
304 |
# |
305 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
306 |
dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
307 |
dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
308 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
309 |
|
310 |
# install logrotate snippet; bug #329281 |
311 |
# |
312 |
insinto /etc/logrotate.d |
313 |
newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk |
314 |
} |
315 |
|
316 |
pkg_postinst() { |
317 |
# |
318 |
# Announcements, warnings, reminders... |
319 |
# |
320 |
einfo "Asterisk has been installed" |
321 |
echo |
322 |
elog "If you want to know more about asterisk, visit these sites:" |
323 |
elog "http://www.asteriskdocs.org/" |
324 |
elog "http://www.voip-info.org/wiki-Asterisk" |
325 |
echo |
326 |
elog "http://www.automated.it/guidetoasterisk.htm" |
327 |
echo |
328 |
elog "Gentoo VoIP IRC Channel:" |
329 |
elog "#gentoo-voip @ irc.freenode.net" |
330 |
echo |
331 |
echo |
332 |
elog "1.6 -> 1.8 changes that you may care about:" |
333 |
elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" |
334 |
elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" |
335 |
} |
336 |
|
337 |
pkg_config() { |
338 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
339 |
|
340 |
read tmp |
341 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
342 |
|
343 |
if [[ "$tmp" = "y" ]] ||\ |
344 |
[[ "$tmp" = "yes" ]] |
345 |
then |
346 |
einfo "Resetting permissions to defaults..." |
347 |
|
348 |
for x in spool run lib log; do |
349 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
350 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
351 |
done |
352 |
|
353 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
354 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
355 |
|
356 |
einfo "done" |
357 |
else |
358 |
einfo "skipping" |
359 |
fi |
360 |
} |
361 |
|
362 |
|
363 |
|
364 |
1.1 net-misc/asterisk/asterisk-11.3.0.ebuild |
365 |
|
366 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.3.0.ebuild?rev=1.1&view=markup |
367 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.3.0.ebuild?rev=1.1&content-type=text/plain |
368 |
|
369 |
Index: asterisk-11.3.0.ebuild |
370 |
=================================================================== |
371 |
# Copyright 1999-2013 Gentoo Foundation |
372 |
# Distributed under the terms of the GNU General Public License v2 |
373 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-11.3.0.ebuild,v 1.1 2013/03/29 17:06:26 chainsaw Exp $ |
374 |
|
375 |
EAPI=5 |
376 |
inherit autotools base eutils linux-info multilib |
377 |
|
378 |
MY_P="${PN}-${PV/_/-}" |
379 |
|
380 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
381 |
HOMEPAGE="http://www.asterisk.org/" |
382 |
SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
383 |
mirror://gentoo/gentoo-asterisk-patchset-3.5.tar.bz2" |
384 |
LICENSE="GPL-2" |
385 |
SLOT="0" |
386 |
KEYWORDS="~amd64 ~x86" |
387 |
|
388 |
IUSE_VOICEMAIL_STORAGE=" |
389 |
+voicemail_storage_file |
390 |
voicemail_storage_odbc |
391 |
voicemail_storage_imap |
392 |
" |
393 |
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" |
394 |
IUSE_EXPAND="VOICEMAIL_STORAGE" |
395 |
REQUIRED_USE="gtalk? ( jabber ) |
396 |
^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
397 |
voicemail_storage_odbc? ( odbc ) |
398 |
" |
399 |
|
400 |
EPATCH_SUFFIX="patch" |
401 |
PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
402 |
|
403 |
RDEPEND="dev-db/sqlite:3 |
404 |
dev-libs/popt |
405 |
dev-libs/libxml2 |
406 |
dev-libs/openssl |
407 |
sys-libs/ncurses |
408 |
sys-libs/zlib |
409 |
alsa? ( media-libs/alsa-lib ) |
410 |
bluetooth? ( net-wireless/bluez ) |
411 |
calendar? ( net-libs/neon |
412 |
dev-libs/libical |
413 |
dev-libs/iksemel ) |
414 |
caps? ( sys-libs/libcap ) |
415 |
cluster? ( sys-cluster/corosync ) |
416 |
curl? ( net-misc/curl ) |
417 |
dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
418 |
net-misc/dahdi-tools ) |
419 |
freetds? ( dev-db/freetds ) |
420 |
gtalk? ( dev-libs/iksemel ) |
421 |
http? ( dev-libs/gmime:2.4 ) |
422 |
iconv? ( virtual/libiconv ) |
423 |
ilbc? ( dev-libs/ilbc-rfc3951 ) |
424 |
jabber? ( dev-libs/iksemel ) |
425 |
ldap? ( net-nds/openldap ) |
426 |
libedit? ( dev-libs/libedit ) |
427 |
lua? ( dev-lang/lua ) |
428 |
mysql? ( virtual/mysql ) |
429 |
newt? ( dev-libs/newt ) |
430 |
odbc? ( dev-db/unixODBC ) |
431 |
osplookup? ( net-libs/osptoolkit ) |
432 |
portaudio? ( media-libs/portaudio ) |
433 |
postgres? ( dev-db/postgresql-base ) |
434 |
radius? ( net-dialup/radiusclient-ng ) |
435 |
selinux? ( sec-policy/selinux-asterisk ) |
436 |
snmp? ( net-analyzer/net-snmp ) |
437 |
span? ( media-libs/spandsp ) |
438 |
speex? ( media-libs/speex ) |
439 |
srtp? ( net-libs/libsrtp ) |
440 |
vorbis? ( media-libs/libvorbis )" |
441 |
|
442 |
DEPEND="${RDEPEND} |
443 |
!net-libs/openh323 |
444 |
voicemail_storage_imap? ( virtual/imap-c-client ) |
445 |
" |
446 |
|
447 |
RDEPEND="${RDEPEND} |
448 |
syslog? ( virtual/logger )" |
449 |
|
450 |
PDEPEND="net-misc/asterisk-core-sounds |
451 |
net-misc/asterisk-extra-sounds |
452 |
net-misc/asterisk-moh-opsound" |
453 |
|
454 |
S="${WORKDIR}/${MY_P}" |
455 |
|
456 |
pkg_setup() { |
457 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
458 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
459 |
have reported that this module dropped critical SIP packets in their deployments. You |
460 |
may want to disable it if you see such problems." |
461 |
check_extra_config |
462 |
|
463 |
enewgroup asterisk |
464 |
enewgroup dialout 20 |
465 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
466 |
} |
467 |
|
468 |
src_prepare() { |
469 |
base_src_prepare |
470 |
AT_M4DIR=autoconf eautoreconf |
471 |
} |
472 |
|
473 |
src_configure() { |
474 |
local vmst |
475 |
|
476 |
econf \ |
477 |
--libdir="/usr/$(get_libdir)" \ |
478 |
--localstatedir="/var" \ |
479 |
--with-crypto \ |
480 |
--with-gsm=internal \ |
481 |
--with-popt \ |
482 |
--with-ssl \ |
483 |
--with-z \ |
484 |
--without-pwlib \ |
485 |
$(use_with caps cap) \ |
486 |
$(use_with http gmime) \ |
487 |
$(use_with newt) \ |
488 |
$(use_with portaudio) |
489 |
|
490 |
# Blank out sounds/sounds.xml file to prevent |
491 |
# asterisk from installing sounds files (we pull them in via |
492 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
493 |
>"${S}"/sounds/sounds.xml |
494 |
|
495 |
# Compile menuselect binary for optional components |
496 |
emake menuselect.makeopts |
497 |
|
498 |
# Broken functionality is forcibly disabled (bug #360143) |
499 |
menuselect/menuselect --disable chan_misdn menuselect.makeopts |
500 |
menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
501 |
|
502 |
# Utility set is forcibly enabled (bug #358001) |
503 |
menuselect/menuselect --enable smsq menuselect.makeopts |
504 |
menuselect/menuselect --enable streamplayer menuselect.makeopts |
505 |
menuselect/menuselect --enable aelparse menuselect.makeopts |
506 |
menuselect/menuselect --enable astman menuselect.makeopts |
507 |
|
508 |
# this is connected, otherwise it would not find |
509 |
# ast_pktccops_gate_alloc symbol |
510 |
menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
511 |
menuselect/menuselect --enable res_pktccops menuselect.makeopts |
512 |
|
513 |
# SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
514 |
menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
515 |
menuselect/menuselect --enable func_aes menuselect.makeopts |
516 |
menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
517 |
|
518 |
# SQlite3 is now the main database backend, enable related features |
519 |
menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
520 |
menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts |
521 |
|
522 |
# The others are based on USE-flag settings |
523 |
use_select() { |
524 |
local state=$(use "$1" && echo enable || echo disable) |
525 |
shift # remove use from parameters |
526 |
|
527 |
while [[ -n $1 ]]; do |
528 |
menuselect/menuselect --${state} "$1" menuselect.makeopts |
529 |
shift |
530 |
done |
531 |
} |
532 |
|
533 |
use_select alsa chan_alsa |
534 |
use_select bluetooth chan_mobile |
535 |
use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
536 |
use_select cluster res_corosync |
537 |
use_select curl func_curl res_config_curl res_curl |
538 |
use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi |
539 |
use_select freetds {cdr,cel}_tds |
540 |
use_select gtalk chan_motif |
541 |
use_select http res_http_post |
542 |
use_select iconv func_iconv |
543 |
use_select jabber res_xmpp |
544 |
use_select ilbc codec_ilbc format_ilbc |
545 |
use_select ldap res_config_ldap |
546 |
use_select lua pbx_lua |
547 |
use_select mysql app_mysql cdr_mysql res_config_mysql |
548 |
use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
549 |
use_select osplookup app_osplookup |
550 |
use_select oss chan_oss |
551 |
use_select postgres {cdr,cel}_pgsql res_config_pgsql |
552 |
use_select radius {cdr,cel}_radius |
553 |
use_select snmp res_snmp |
554 |
use_select span res_fax_spandsp |
555 |
use_select speex {codec,func}_speex |
556 |
use_select srtp res_srtp |
557 |
use_select syslog cdr_syslog |
558 |
use_select vorbis format_ogg_vorbis |
559 |
|
560 |
# Voicemail storage ... |
561 |
for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
562 |
if use ${vmst}; then |
563 |
menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
564 |
fi |
565 |
done |
566 |
} |
567 |
|
568 |
src_compile() { |
569 |
ASTLDFLAGS="${LDFLAGS}" emake |
570 |
} |
571 |
|
572 |
src_install() { |
573 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
574 |
emake DESTDIR="${D}" installdirs |
575 |
emake DESTDIR="${D}" install |
576 |
|
577 |
if use radius; then |
578 |
insinto /etc/radiusclient-ng/ |
579 |
doins contrib/dictionary.digium |
580 |
fi |
581 |
if use samples; then |
582 |
emake DESTDIR="${D}" samples |
583 |
for conffile in "${D}"etc/asterisk/*.* |
584 |
do |
585 |
chown asterisk:asterisk $conffile |
586 |
chmod 0660 $conffile |
587 |
done |
588 |
einfo "Sample files have been installed" |
589 |
else |
590 |
einfo "Skipping installation of sample files..." |
591 |
rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
592 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
593 |
rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
594 |
rm -f "${D}"etc/asterisk/* || die |
595 |
fi |
596 |
rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
597 |
|
598 |
# keep directories |
599 |
diropts -m 0770 -o asterisk -g asterisk |
600 |
keepdir /etc/asterisk |
601 |
keepdir /var/lib/asterisk |
602 |
keepdir /var/spool/asterisk |
603 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
604 |
diropts -m 0750 -o asterisk -g asterisk |
605 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
606 |
|
607 |
newinitd "${FILESDIR}"/1.8.0/asterisk.initd5 asterisk |
608 |
newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
609 |
|
610 |
# install the upgrade documentation |
611 |
# |
612 |
dodoc README UPGRADE* BUGS CREDITS |
613 |
|
614 |
# install extra documentation |
615 |
# |
616 |
if use doc |
617 |
then |
618 |
dodoc doc/*.txt |
619 |
dodoc doc/*.pdf |
620 |
fi |
621 |
|
622 |
# install SIP scripts; bug #300832 |
623 |
# |
624 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
625 |
dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
626 |
dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
627 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
628 |
|
629 |
# install logrotate snippet; bug #329281 |
630 |
# |
631 |
insinto /etc/logrotate.d |
632 |
newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk |
633 |
} |
634 |
|
635 |
pkg_postinst() { |
636 |
# |
637 |
# Announcements, warnings, reminders... |
638 |
# |
639 |
einfo "Asterisk has been installed" |
640 |
echo |
641 |
elog "If you want to know more about asterisk, visit these sites:" |
642 |
elog "http://www.asteriskdocs.org/" |
643 |
elog "http://www.voip-info.org/wiki-Asterisk" |
644 |
echo |
645 |
elog "http://www.automated.it/guidetoasterisk.htm" |
646 |
echo |
647 |
elog "Gentoo VoIP IRC Channel:" |
648 |
elog "#gentoo-voip @ irc.freenode.net" |
649 |
echo |
650 |
echo |
651 |
elog "Please read the Asterisk 11 upgrade document:" |
652 |
elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11" |
653 |
} |
654 |
|
655 |
pkg_config() { |
656 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
657 |
|
658 |
read tmp |
659 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
660 |
|
661 |
if [[ "$tmp" = "y" ]] ||\ |
662 |
[[ "$tmp" = "yes" ]] |
663 |
then |
664 |
einfo "Resetting permissions to defaults..." |
665 |
|
666 |
for x in spool run lib log; do |
667 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
668 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
669 |
done |
670 |
|
671 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
672 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
673 |
|
674 |
einfo "done" |
675 |
else |
676 |
einfo "skipping" |
677 |
fi |
678 |
} |