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