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