1 |
tamiko 14/12/30 21:15:52 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-12.8.0-r1.ebuild asterisk-12.7.2-r1.ebuild |
5 |
asterisk-11.15.0-r1.ebuild |
6 |
asterisk-11.14.2-r1.ebuild |
7 |
Log: |
8 |
provide systemd service files, bug #529192 |
9 |
|
10 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key BD3A97A3) |
11 |
|
12 |
Revision Changes Path |
13 |
1.514 net-misc/asterisk/ChangeLog |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.514&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.514&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.513&r2=1.514 |
18 |
|
19 |
Index: ChangeLog |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
22 |
retrieving revision 1.513 |
23 |
retrieving revision 1.514 |
24 |
diff -u -r1.513 -r1.514 |
25 |
--- ChangeLog 28 Dec 2014 16:39:12 -0000 1.513 |
26 |
+++ ChangeLog 30 Dec 2014 21:15:52 -0000 1.514 |
27 |
@@ -1,6 +1,17 @@ |
28 |
# ChangeLog for net-misc/asterisk |
29 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.513 2014/12/28 16:39:12 titanofold Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.514 2014/12/30 21:15:52 tamiko Exp $ |
32 |
+ |
33 |
+*asterisk-11.14.2-r1 (30 Dec 2014) |
34 |
+*asterisk-11.15.0-r1 (30 Dec 2014) |
35 |
+*asterisk-12.8.0-r1 (30 Dec 2014) |
36 |
+*asterisk-12.7.2-r1 (30 Dec 2014) |
37 |
+ |
38 |
+ 30 Dec 2014; Matthias Maier <tamiko@g.o> +asterisk-11.14.2-r1.ebuild, |
39 |
+ +asterisk-11.15.0-r1.ebuild, +asterisk-12.7.2-r1.ebuild, |
40 |
+ +asterisk-12.8.0-r1.ebuild, +files/asterisk.service, |
41 |
+ +files/asterisk.service.conf, +files/asterisk.tmpfiles.conf: |
42 |
+ provide systemd service files, bug #529192 |
43 |
|
44 |
28 Dec 2014; Aaron W. Swenson <titanofold@g.o> |
45 |
asterisk-11.14.2.ebuild, asterisk-11.15.0.ebuild, asterisk-12.7.2.ebuild, |
46 |
|
47 |
|
48 |
|
49 |
1.1 net-misc/asterisk/asterisk-12.8.0-r1.ebuild |
50 |
|
51 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-12.8.0-r1.ebuild?rev=1.1&view=markup |
52 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-12.8.0-r1.ebuild?rev=1.1&content-type=text/plain |
53 |
|
54 |
Index: asterisk-12.8.0-r1.ebuild |
55 |
=================================================================== |
56 |
# Copyright 1999-2014 Gentoo Foundation |
57 |
# Distributed under the terms of the GNU General Public License v2 |
58 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-12.8.0-r1.ebuild,v 1.1 2014/12/30 21:15:52 tamiko Exp $ |
59 |
|
60 |
EAPI=5 |
61 |
inherit autotools base eutils linux-info multilib user systemd |
62 |
|
63 |
MY_P="${PN}-${PV/_/-}" |
64 |
|
65 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
66 |
HOMEPAGE="http://www.asterisk.org/" |
67 |
SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
68 |
mirror://gentoo/gentoo-asterisk-patchset-3.14.tar.bz2" |
69 |
LICENSE="GPL-2" |
70 |
SLOT="0" |
71 |
KEYWORDS="~amd64 ~x86" |
72 |
|
73 |
IUSE_VOICEMAIL_STORAGE=" |
74 |
+voicemail_storage_file |
75 |
voicemail_storage_odbc |
76 |
voicemail_storage_imap |
77 |
" |
78 |
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" |
79 |
IUSE_EXPAND="VOICEMAIL_STORAGE" |
80 |
REQUIRED_USE="gtalk? ( jabber ) |
81 |
^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
82 |
voicemail_storage_odbc? ( odbc ) |
83 |
" |
84 |
|
85 |
EPATCH_SUFFIX="patch" |
86 |
PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
87 |
|
88 |
CDEPEND="dev-db/sqlite:3 |
89 |
dev-libs/popt |
90 |
dev-libs/jansson |
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.6 ) |
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 ) |
120 |
radius? ( net-dialup/radiusclient-ng ) |
121 |
snmp? ( net-analyzer/net-snmp ) |
122 |
span? ( media-libs/spandsp ) |
123 |
speex? ( media-libs/speex ) |
124 |
srtp? ( net-libs/libsrtp ) |
125 |
vorbis? ( media-libs/libvorbis )" |
126 |
|
127 |
DEPEND="${CDEPEND} |
128 |
!net-libs/openh323 |
129 |
!net-libs/pjsip |
130 |
voicemail_storage_imap? ( virtual/imap-c-client ) |
131 |
virtual/pkgconfig |
132 |
" |
133 |
|
134 |
RDEPEND="${CDEPEND} |
135 |
selinux? ( sec-policy/selinux-asterisk ) |
136 |
syslog? ( virtual/logger )" |
137 |
|
138 |
PDEPEND="net-misc/asterisk-core-sounds |
139 |
net-misc/asterisk-extra-sounds |
140 |
net-misc/asterisk-moh-opsound" |
141 |
|
142 |
S="${WORKDIR}/${MY_P}" |
143 |
|
144 |
pkg_setup() { |
145 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
146 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
147 |
have reported that this module dropped critical SIP packets in their deployments. You |
148 |
may want to disable it if you see such problems." |
149 |
check_extra_config |
150 |
|
151 |
enewgroup asterisk |
152 |
enewgroup dialout 20 |
153 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
154 |
} |
155 |
|
156 |
src_prepare() { |
157 |
base_src_prepare |
158 |
AT_M4DIR=autoconf eautoreconf |
159 |
} |
160 |
|
161 |
src_configure() { |
162 |
local vmst |
163 |
|
164 |
econf \ |
165 |
--libdir="/usr/$(get_libdir)" \ |
166 |
--localstatedir="/var" \ |
167 |
--with-crypto \ |
168 |
--with-gsm=internal \ |
169 |
--with-popt \ |
170 |
--with-ssl \ |
171 |
--with-z \ |
172 |
--without-pwlib \ |
173 |
$(use_with caps cap) \ |
174 |
$(use_with http gmime) \ |
175 |
$(use_with newt) \ |
176 |
$(use_with portaudio) |
177 |
|
178 |
# Blank out sounds/sounds.xml file to prevent |
179 |
# asterisk from installing sounds files (we pull them in via |
180 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
181 |
>"${S}"/sounds/sounds.xml |
182 |
|
183 |
# That NATIVE_ARCH chatter really is quite bothersome |
184 |
sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system" |
185 |
|
186 |
# Compile menuselect binary for optional components |
187 |
emake menuselect.makeopts |
188 |
|
189 |
# Broken functionality is forcibly disabled (bug #360143) |
190 |
menuselect/menuselect --disable chan_misdn menuselect.makeopts |
191 |
menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
192 |
|
193 |
# Utility set is forcibly enabled (bug #358001) |
194 |
menuselect/menuselect --enable smsq menuselect.makeopts |
195 |
menuselect/menuselect --enable streamplayer menuselect.makeopts |
196 |
menuselect/menuselect --enable aelparse menuselect.makeopts |
197 |
menuselect/menuselect --enable astman menuselect.makeopts |
198 |
|
199 |
# this is connected, otherwise it would not find |
200 |
# ast_pktccops_gate_alloc symbol |
201 |
menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
202 |
menuselect/menuselect --enable res_pktccops menuselect.makeopts |
203 |
|
204 |
# SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
205 |
menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
206 |
menuselect/menuselect --enable func_aes menuselect.makeopts |
207 |
menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
208 |
|
209 |
# SQlite3 is now the main database backend, enable related features |
210 |
menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
211 |
menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts |
212 |
|
213 |
# The others are based on USE-flag settings |
214 |
use_select() { |
215 |
local state=$(use "$1" && echo enable || echo disable) |
216 |
shift # remove use from parameters |
217 |
|
218 |
while [[ -n $1 ]]; do |
219 |
menuselect/menuselect --${state} "$1" menuselect.makeopts |
220 |
shift |
221 |
done |
222 |
} |
223 |
|
224 |
use_select alsa chan_alsa |
225 |
use_select bluetooth chan_mobile |
226 |
use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
227 |
use_select cluster res_corosync |
228 |
use_select curl func_curl res_config_curl res_curl |
229 |
use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi |
230 |
use_select freetds {cdr,cel}_tds |
231 |
use_select gtalk chan_motif |
232 |
use_select http res_http_post |
233 |
use_select iconv func_iconv |
234 |
use_select jabber res_xmpp |
235 |
use_select ilbc codec_ilbc format_ilbc |
236 |
use_select ldap res_config_ldap |
237 |
use_select lua pbx_lua |
238 |
use_select mysql app_mysql cdr_mysql res_config_mysql |
239 |
use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
240 |
use_select osplookup app_osplookup |
241 |
use_select oss chan_oss |
242 |
use_select postgres {cdr,cel}_pgsql res_config_pgsql |
243 |
use_select radius {cdr,cel}_radius |
244 |
use_select snmp res_snmp |
245 |
use_select span res_fax_spandsp |
246 |
use_select speex {codec,func}_speex |
247 |
use_select srtp res_srtp |
248 |
use_select syslog cdr_syslog |
249 |
use_select vorbis format_ogg_vorbis |
250 |
|
251 |
# Voicemail storage ... |
252 |
for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
253 |
if use ${vmst}; then |
254 |
menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
255 |
fi |
256 |
done |
257 |
|
258 |
if use debug; then |
259 |
for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do |
260 |
menuselect/menuselect --enable $o menuselect.makeopts |
261 |
done |
262 |
fi |
263 |
} |
264 |
|
265 |
src_compile() { |
266 |
ASTLDFLAGS="${LDFLAGS}" emake |
267 |
} |
268 |
|
269 |
src_install() { |
270 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
271 |
emake DESTDIR="${D}" installdirs |
272 |
emake DESTDIR="${D}" install |
273 |
|
274 |
if use radius; then |
275 |
insinto /etc/radiusclient-ng/ |
276 |
doins contrib/dictionary.digium |
277 |
fi |
278 |
diropts -m 0750 -o root -g asterisk |
279 |
keepdir /etc/asterisk |
280 |
if use samples; then |
281 |
emake DESTDIR="${D}" samples |
282 |
for conffile in "${D}"etc/asterisk/*.* |
283 |
do |
284 |
chown root:root $conffile |
285 |
chmod 0644 $conffile |
286 |
done |
287 |
einfo "Sample files have been installed" |
288 |
else |
289 |
einfo "Skipping installation of sample files..." |
290 |
rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
291 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
292 |
rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
293 |
rm -f "${D}"etc/asterisk/* || die |
294 |
fi |
295 |
rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
296 |
|
297 |
# keep directories |
298 |
diropts -m 0770 -o asterisk asterisk |
299 |
keepdir /var/lib/asterisk |
300 |
keepdir /var/spool/asterisk |
301 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
302 |
diropts -m 0750 -o asterisk -g asterisk |
303 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
304 |
|
305 |
newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk |
306 |
newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
307 |
|
308 |
systemd_dounit "${FILESDIR}"/asterisk.service |
309 |
systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf |
310 |
systemd_install_serviced "${FILESDIR}"/asterisk.service.conf |
311 |
|
312 |
# install the upgrade documentation |
313 |
# |
314 |
dodoc README UPGRADE* BUGS CREDITS |
315 |
|
316 |
# install extra documentation |
317 |
# |
318 |
if use doc |
319 |
then |
320 |
dodoc doc/*.txt |
321 |
dodoc doc/*.pdf |
322 |
fi |
323 |
|
324 |
# install SIP scripts; bug #300832 |
325 |
# |
326 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
327 |
dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
328 |
dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
329 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
330 |
|
331 |
# install logrotate snippet; bug #329281 |
332 |
# |
333 |
insinto /etc/logrotate.d |
334 |
newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk |
335 |
} |
336 |
|
337 |
pkg_postinst() { |
338 |
# |
339 |
# Announcements, warnings, reminders... |
340 |
# |
341 |
einfo "Asterisk has been installed" |
342 |
echo |
343 |
elog "If you want to know more about asterisk, visit these sites:" |
344 |
elog "http://www.asteriskdocs.org/" |
345 |
elog "http://www.voip-info.org/wiki-Asterisk" |
346 |
echo |
347 |
elog "http://www.automated.it/guidetoasterisk.htm" |
348 |
echo |
349 |
elog "Gentoo VoIP IRC Channel:" |
350 |
elog "#gentoo-voip @ irc.freenode.net" |
351 |
echo |
352 |
echo |
353 |
elog "Please read the Asterisk 12 upgrade document:" |
354 |
elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+12" |
355 |
} |
356 |
|
357 |
pkg_config() { |
358 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
359 |
|
360 |
read tmp |
361 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
362 |
|
363 |
if [[ "$tmp" = "y" ]] ||\ |
364 |
[[ "$tmp" = "yes" ]] |
365 |
then |
366 |
einfo "Resetting permissions to defaults..." |
367 |
|
368 |
for x in spool run lib log; do |
369 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
370 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
371 |
done |
372 |
|
373 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
374 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
375 |
|
376 |
einfo "done" |
377 |
else |
378 |
einfo "skipping" |
379 |
fi |
380 |
} |
381 |
|
382 |
|
383 |
|
384 |
1.1 net-misc/asterisk/asterisk-12.7.2-r1.ebuild |
385 |
|
386 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-12.7.2-r1.ebuild?rev=1.1&view=markup |
387 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-12.7.2-r1.ebuild?rev=1.1&content-type=text/plain |
388 |
|
389 |
Index: asterisk-12.7.2-r1.ebuild |
390 |
=================================================================== |
391 |
# Copyright 1999-2014 Gentoo Foundation |
392 |
# Distributed under the terms of the GNU General Public License v2 |
393 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-12.7.2-r1.ebuild,v 1.1 2014/12/30 21:15:52 tamiko Exp $ |
394 |
|
395 |
EAPI=5 |
396 |
inherit autotools base eutils linux-info multilib user systemd |
397 |
|
398 |
MY_P="${PN}-${PV/_/-}" |
399 |
|
400 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
401 |
HOMEPAGE="http://www.asterisk.org/" |
402 |
SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
403 |
mirror://gentoo/gentoo-asterisk-patchset-3.14.tar.bz2" |
404 |
LICENSE="GPL-2" |
405 |
SLOT="0" |
406 |
KEYWORDS="~amd64 ~x86" |
407 |
|
408 |
IUSE_VOICEMAIL_STORAGE=" |
409 |
+voicemail_storage_file |
410 |
voicemail_storage_odbc |
411 |
voicemail_storage_imap |
412 |
" |
413 |
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" |
414 |
IUSE_EXPAND="VOICEMAIL_STORAGE" |
415 |
REQUIRED_USE="gtalk? ( jabber ) |
416 |
^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
417 |
voicemail_storage_odbc? ( odbc ) |
418 |
" |
419 |
|
420 |
EPATCH_SUFFIX="patch" |
421 |
PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
422 |
|
423 |
CDEPEND="dev-db/sqlite:3 |
424 |
dev-libs/popt |
425 |
dev-libs/jansson |
426 |
dev-libs/libxml2 |
427 |
dev-libs/openssl |
428 |
sys-libs/ncurses |
429 |
sys-libs/zlib |
430 |
alsa? ( media-libs/alsa-lib ) |
431 |
bluetooth? ( net-wireless/bluez ) |
432 |
calendar? ( net-libs/neon |
433 |
dev-libs/libical |
434 |
dev-libs/iksemel ) |
435 |
caps? ( sys-libs/libcap ) |
436 |
cluster? ( sys-cluster/corosync ) |
437 |
curl? ( net-misc/curl ) |
438 |
dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
439 |
net-misc/dahdi-tools ) |
440 |
freetds? ( dev-db/freetds ) |
441 |
gtalk? ( dev-libs/iksemel ) |
442 |
http? ( dev-libs/gmime:2.6 ) |
443 |
iconv? ( virtual/libiconv ) |
444 |
ilbc? ( dev-libs/ilbc-rfc3951 ) |
445 |
jabber? ( dev-libs/iksemel ) |
446 |
ldap? ( net-nds/openldap ) |
447 |
libedit? ( dev-libs/libedit ) |
448 |
lua? ( dev-lang/lua ) |
449 |
mysql? ( virtual/mysql ) |
450 |
newt? ( dev-libs/newt ) |
451 |
odbc? ( dev-db/unixODBC ) |
452 |
osplookup? ( net-libs/osptoolkit ) |
453 |
portaudio? ( media-libs/portaudio ) |
454 |
postgres? ( dev-db/postgresql ) |
455 |
radius? ( net-dialup/radiusclient-ng ) |
456 |
snmp? ( net-analyzer/net-snmp ) |
457 |
span? ( media-libs/spandsp ) |
458 |
speex? ( media-libs/speex ) |
459 |
srtp? ( net-libs/libsrtp ) |
460 |
vorbis? ( media-libs/libvorbis )" |
461 |
|
462 |
DEPEND="${CDEPEND} |
463 |
!net-libs/openh323 |
464 |
!net-libs/pjsip |
465 |
voicemail_storage_imap? ( virtual/imap-c-client ) |
466 |
virtual/pkgconfig |
467 |
" |
468 |
|
469 |
RDEPEND="${CDEPEND} |
470 |
selinux? ( sec-policy/selinux-asterisk ) |
471 |
syslog? ( virtual/logger )" |
472 |
|
473 |
PDEPEND="net-misc/asterisk-core-sounds |
474 |
net-misc/asterisk-extra-sounds |
475 |
net-misc/asterisk-moh-opsound" |
476 |
|
477 |
S="${WORKDIR}/${MY_P}" |
478 |
|
479 |
pkg_setup() { |
480 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
481 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
482 |
have reported that this module dropped critical SIP packets in their deployments. You |
483 |
may want to disable it if you see such problems." |
484 |
check_extra_config |
485 |
|
486 |
enewgroup asterisk |
487 |
enewgroup dialout 20 |
488 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
489 |
} |
490 |
|
491 |
src_prepare() { |
492 |
base_src_prepare |
493 |
AT_M4DIR=autoconf eautoreconf |
494 |
} |
495 |
|
496 |
src_configure() { |
497 |
local vmst |
498 |
|
499 |
econf \ |
500 |
--libdir="/usr/$(get_libdir)" \ |
501 |
--localstatedir="/var" \ |
502 |
--with-crypto \ |
503 |
--with-gsm=internal \ |
504 |
--with-popt \ |
505 |
--with-ssl \ |
506 |
--with-z \ |
507 |
--without-pwlib \ |
508 |
$(use_with caps cap) \ |
509 |
$(use_with http gmime) \ |
510 |
$(use_with newt) \ |
511 |
$(use_with portaudio) |
512 |
|
513 |
# Blank out sounds/sounds.xml file to prevent |
514 |
# asterisk from installing sounds files (we pull them in via |
515 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
516 |
>"${S}"/sounds/sounds.xml |
517 |
|
518 |
# That NATIVE_ARCH chatter really is quite bothersome |
519 |
sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system" |
520 |
|
521 |
# Compile menuselect binary for optional components |
522 |
emake menuselect.makeopts |
523 |
|
524 |
# Broken functionality is forcibly disabled (bug #360143) |
525 |
menuselect/menuselect --disable chan_misdn menuselect.makeopts |
526 |
menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
527 |
|
528 |
# Utility set is forcibly enabled (bug #358001) |
529 |
menuselect/menuselect --enable smsq menuselect.makeopts |
530 |
menuselect/menuselect --enable streamplayer menuselect.makeopts |
531 |
menuselect/menuselect --enable aelparse menuselect.makeopts |
532 |
menuselect/menuselect --enable astman menuselect.makeopts |
533 |
|
534 |
# this is connected, otherwise it would not find |
535 |
# ast_pktccops_gate_alloc symbol |
536 |
menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
537 |
menuselect/menuselect --enable res_pktccops menuselect.makeopts |
538 |
|
539 |
# SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
540 |
menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
541 |
menuselect/menuselect --enable func_aes menuselect.makeopts |
542 |
menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
543 |
|
544 |
# SQlite3 is now the main database backend, enable related features |
545 |
menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
546 |
menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts |
547 |
|
548 |
# The others are based on USE-flag settings |
549 |
use_select() { |
550 |
local state=$(use "$1" && echo enable || echo disable) |
551 |
shift # remove use from parameters |
552 |
|
553 |
while [[ -n $1 ]]; do |
554 |
menuselect/menuselect --${state} "$1" menuselect.makeopts |
555 |
shift |
556 |
done |
557 |
} |
558 |
|
559 |
use_select alsa chan_alsa |
560 |
use_select bluetooth chan_mobile |
561 |
use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
562 |
use_select cluster res_corosync |
563 |
use_select curl func_curl res_config_curl res_curl |
564 |
use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi |
565 |
use_select freetds {cdr,cel}_tds |
566 |
use_select gtalk chan_motif |
567 |
use_select http res_http_post |
568 |
use_select iconv func_iconv |
569 |
use_select jabber res_xmpp |
570 |
use_select ilbc codec_ilbc format_ilbc |
571 |
use_select ldap res_config_ldap |
572 |
use_select lua pbx_lua |
573 |
use_select mysql app_mysql cdr_mysql res_config_mysql |
574 |
use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
575 |
use_select osplookup app_osplookup |
576 |
use_select oss chan_oss |
577 |
use_select postgres {cdr,cel}_pgsql res_config_pgsql |
578 |
use_select radius {cdr,cel}_radius |
579 |
use_select snmp res_snmp |
580 |
use_select span res_fax_spandsp |
581 |
use_select speex {codec,func}_speex |
582 |
use_select srtp res_srtp |
583 |
use_select syslog cdr_syslog |
584 |
use_select vorbis format_ogg_vorbis |
585 |
|
586 |
# Voicemail storage ... |
587 |
for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
588 |
if use ${vmst}; then |
589 |
menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
590 |
fi |
591 |
done |
592 |
|
593 |
if use debug; then |
594 |
for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do |
595 |
menuselect/menuselect --enable $o menuselect.makeopts |
596 |
done |
597 |
fi |
598 |
} |
599 |
|
600 |
src_compile() { |
601 |
ASTLDFLAGS="${LDFLAGS}" emake |
602 |
} |
603 |
|
604 |
src_install() { |
605 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
606 |
emake DESTDIR="${D}" installdirs |
607 |
emake DESTDIR="${D}" install |
608 |
|
609 |
if use radius; then |
610 |
insinto /etc/radiusclient-ng/ |
611 |
doins contrib/dictionary.digium |
612 |
fi |
613 |
diropts -m 0750 -o root -g asterisk |
614 |
keepdir /etc/asterisk |
615 |
if use samples; then |
616 |
emake DESTDIR="${D}" samples |
617 |
for conffile in "${D}"etc/asterisk/*.* |
618 |
do |
619 |
chown root:root $conffile |
620 |
chmod 0644 $conffile |
621 |
done |
622 |
einfo "Sample files have been installed" |
623 |
else |
624 |
einfo "Skipping installation of sample files..." |
625 |
rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
626 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
627 |
rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
628 |
rm -f "${D}"etc/asterisk/* || die |
629 |
fi |
630 |
rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
631 |
|
632 |
# keep directories |
633 |
diropts -m 0770 -o asterisk asterisk |
634 |
keepdir /var/lib/asterisk |
635 |
keepdir /var/spool/asterisk |
636 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
637 |
diropts -m 0750 -o asterisk -g asterisk |
638 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
639 |
|
640 |
newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk |
641 |
newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
642 |
|
643 |
systemd_dounit "${FILESDIR}"/asterisk.service |
644 |
systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf |
645 |
systemd_install_serviced "${FILESDIR}"/asterisk.service.conf |
646 |
|
647 |
# install the upgrade documentation |
648 |
# |
649 |
dodoc README UPGRADE* BUGS CREDITS |
650 |
|
651 |
# install extra documentation |
652 |
# |
653 |
if use doc |
654 |
then |
655 |
dodoc doc/*.txt |
656 |
dodoc doc/*.pdf |
657 |
fi |
658 |
|
659 |
# install SIP scripts; bug #300832 |
660 |
# |
661 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
662 |
dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
663 |
dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
664 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
665 |
|
666 |
# install logrotate snippet; bug #329281 |
667 |
# |
668 |
insinto /etc/logrotate.d |
669 |
newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk |
670 |
} |
671 |
|
672 |
pkg_postinst() { |
673 |
# |
674 |
# Announcements, warnings, reminders... |
675 |
# |
676 |
einfo "Asterisk has been installed" |
677 |
echo |
678 |
elog "If you want to know more about asterisk, visit these sites:" |
679 |
elog "http://www.asteriskdocs.org/" |
680 |
elog "http://www.voip-info.org/wiki-Asterisk" |
681 |
echo |
682 |
elog "http://www.automated.it/guidetoasterisk.htm" |
683 |
echo |
684 |
elog "Gentoo VoIP IRC Channel:" |
685 |
elog "#gentoo-voip @ irc.freenode.net" |
686 |
echo |
687 |
echo |
688 |
elog "Please read the Asterisk 12 upgrade document:" |
689 |
elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+12" |
690 |
} |
691 |
|
692 |
pkg_config() { |
693 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
694 |
|
695 |
read tmp |
696 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
697 |
|
698 |
if [[ "$tmp" = "y" ]] ||\ |
699 |
[[ "$tmp" = "yes" ]] |
700 |
then |
701 |
einfo "Resetting permissions to defaults..." |
702 |
|
703 |
for x in spool run lib log; do |
704 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
705 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
706 |
done |
707 |
|
708 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
709 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
710 |
|
711 |
einfo "done" |
712 |
else |
713 |
einfo "skipping" |
714 |
fi |
715 |
} |
716 |
|
717 |
|
718 |
|
719 |
1.1 net-misc/asterisk/asterisk-11.15.0-r1.ebuild |
720 |
|
721 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.15.0-r1.ebuild?rev=1.1&view=markup |
722 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.15.0-r1.ebuild?rev=1.1&content-type=text/plain |
723 |
|
724 |
Index: asterisk-11.15.0-r1.ebuild |
725 |
=================================================================== |
726 |
# Copyright 1999-2014 Gentoo Foundation |
727 |
# Distributed under the terms of the GNU General Public License v2 |
728 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-11.15.0-r1.ebuild,v 1.1 2014/12/30 21:15:52 tamiko Exp $ |
729 |
|
730 |
EAPI=5 |
731 |
inherit autotools base eutils linux-info multilib user systemd |
732 |
|
733 |
MY_P="${PN}-${PV/_/-}" |
734 |
|
735 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
736 |
HOMEPAGE="http://www.asterisk.org/" |
737 |
SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
738 |
mirror://gentoo/gentoo-asterisk-patchset-3.14.tar.bz2" |
739 |
LICENSE="GPL-2" |
740 |
SLOT="0" |
741 |
KEYWORDS="~amd64 ~x86" |
742 |
|
743 |
IUSE_VOICEMAIL_STORAGE=" |
744 |
+voicemail_storage_file |
745 |
voicemail_storage_odbc |
746 |
voicemail_storage_imap |
747 |
" |
748 |
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" |
749 |
IUSE_EXPAND="VOICEMAIL_STORAGE" |
750 |
REQUIRED_USE="gtalk? ( jabber ) |
751 |
^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
752 |
voicemail_storage_odbc? ( odbc ) |
753 |
" |
754 |
|
755 |
EPATCH_SUFFIX="patch" |
756 |
PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
757 |
|
758 |
CDEPEND="dev-db/sqlite:3 |
759 |
dev-libs/popt |
760 |
dev-libs/libxml2 |
761 |
dev-libs/openssl |
762 |
sys-libs/ncurses |
763 |
sys-libs/zlib |
764 |
alsa? ( media-libs/alsa-lib ) |
765 |
bluetooth? ( net-wireless/bluez ) |
766 |
calendar? ( net-libs/neon |
767 |
dev-libs/libical |
768 |
dev-libs/iksemel ) |
769 |
caps? ( sys-libs/libcap ) |
770 |
cluster? ( sys-cluster/corosync ) |
771 |
curl? ( net-misc/curl ) |
772 |
dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
773 |
net-misc/dahdi-tools ) |
774 |
freetds? ( dev-db/freetds ) |
775 |
gtalk? ( dev-libs/iksemel ) |
776 |
http? ( dev-libs/gmime:2.6 ) |
777 |
iconv? ( virtual/libiconv ) |
778 |
ilbc? ( dev-libs/ilbc-rfc3951 ) |
779 |
jabber? ( dev-libs/iksemel ) |
780 |
ldap? ( net-nds/openldap ) |
781 |
libedit? ( dev-libs/libedit ) |
782 |
lua? ( dev-lang/lua ) |
783 |
mysql? ( virtual/mysql ) |
784 |
newt? ( dev-libs/newt ) |
785 |
odbc? ( dev-db/unixODBC ) |
786 |
osplookup? ( net-libs/osptoolkit ) |
787 |
portaudio? ( media-libs/portaudio ) |
788 |
postgres? ( dev-db/postgresql ) |
789 |
radius? ( net-dialup/radiusclient-ng ) |
790 |
snmp? ( net-analyzer/net-snmp ) |
791 |
span? ( media-libs/spandsp ) |
792 |
speex? ( media-libs/speex ) |
793 |
srtp? ( net-libs/libsrtp ) |
794 |
vorbis? ( media-libs/libvorbis )" |
795 |
|
796 |
DEPEND="${CDEPEND} |
797 |
!net-libs/openh323 |
798 |
!net-libs/pjsip |
799 |
voicemail_storage_imap? ( virtual/imap-c-client ) |
800 |
virtual/pkgconfig |
801 |
" |
802 |
|
803 |
RDEPEND="${CDEPEND} |
804 |
selinux? ( sec-policy/selinux-asterisk ) |
805 |
syslog? ( virtual/logger )" |
806 |
|
807 |
PDEPEND="net-misc/asterisk-core-sounds |
808 |
net-misc/asterisk-extra-sounds |
809 |
net-misc/asterisk-moh-opsound" |
810 |
|
811 |
S="${WORKDIR}/${MY_P}" |
812 |
|
813 |
pkg_setup() { |
814 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
815 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
816 |
have reported that this module dropped critical SIP packets in their deployments. You |
817 |
may want to disable it if you see such problems." |
818 |
check_extra_config |
819 |
|
820 |
enewgroup asterisk |
821 |
enewgroup dialout 20 |
822 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
823 |
} |
824 |
|
825 |
src_prepare() { |
826 |
base_src_prepare |
827 |
AT_M4DIR=autoconf eautoreconf |
828 |
} |
829 |
|
830 |
src_configure() { |
831 |
local vmst |
832 |
|
833 |
econf \ |
834 |
--libdir="/usr/$(get_libdir)" \ |
835 |
--localstatedir="/var" \ |
836 |
--with-crypto \ |
837 |
--with-gsm=internal \ |
838 |
--with-popt \ |
839 |
--with-ssl \ |
840 |
--with-z \ |
841 |
--without-pwlib \ |
842 |
$(use_with caps cap) \ |
843 |
$(use_with http gmime) \ |
844 |
$(use_with newt) \ |
845 |
$(use_with portaudio) |
846 |
|
847 |
# Blank out sounds/sounds.xml file to prevent |
848 |
# asterisk from installing sounds files (we pull them in via |
849 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
850 |
>"${S}"/sounds/sounds.xml |
851 |
|
852 |
# That NATIVE_ARCH chatter really is quite bothersome |
853 |
sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system" |
854 |
|
855 |
# Compile menuselect binary for optional components |
856 |
emake menuselect.makeopts |
857 |
|
858 |
# Broken functionality is forcibly disabled (bug #360143) |
859 |
menuselect/menuselect --disable chan_misdn menuselect.makeopts |
860 |
menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
861 |
|
862 |
# Utility set is forcibly enabled (bug #358001) |
863 |
menuselect/menuselect --enable smsq menuselect.makeopts |
864 |
menuselect/menuselect --enable streamplayer menuselect.makeopts |
865 |
menuselect/menuselect --enable aelparse menuselect.makeopts |
866 |
menuselect/menuselect --enable astman menuselect.makeopts |
867 |
|
868 |
# this is connected, otherwise it would not find |
869 |
# ast_pktccops_gate_alloc symbol |
870 |
menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
871 |
menuselect/menuselect --enable res_pktccops menuselect.makeopts |
872 |
|
873 |
# SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
874 |
menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
875 |
menuselect/menuselect --enable func_aes menuselect.makeopts |
876 |
menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
877 |
|
878 |
# SQlite3 is now the main database backend, enable related features |
879 |
menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
880 |
menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts |
881 |
|
882 |
# The others are based on USE-flag settings |
883 |
use_select() { |
884 |
local state=$(use "$1" && echo enable || echo disable) |
885 |
shift # remove use from parameters |
886 |
|
887 |
while [[ -n $1 ]]; do |
888 |
menuselect/menuselect --${state} "$1" menuselect.makeopts |
889 |
shift |
890 |
done |
891 |
} |
892 |
|
893 |
use_select alsa chan_alsa |
894 |
use_select bluetooth chan_mobile |
895 |
use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
896 |
use_select cluster res_corosync |
897 |
use_select curl func_curl res_config_curl res_curl |
898 |
use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi |
899 |
use_select freetds {cdr,cel}_tds |
900 |
use_select gtalk chan_motif |
901 |
use_select http res_http_post |
902 |
use_select iconv func_iconv |
903 |
use_select jabber res_xmpp |
904 |
use_select ilbc codec_ilbc format_ilbc |
905 |
use_select ldap res_config_ldap |
906 |
use_select lua pbx_lua |
907 |
use_select mysql app_mysql cdr_mysql res_config_mysql |
908 |
use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
909 |
use_select osplookup app_osplookup |
910 |
use_select oss chan_oss |
911 |
use_select postgres {cdr,cel}_pgsql res_config_pgsql |
912 |
use_select radius {cdr,cel}_radius |
913 |
use_select snmp res_snmp |
914 |
use_select span res_fax_spandsp |
915 |
use_select speex {codec,func}_speex |
916 |
use_select srtp res_srtp |
917 |
use_select syslog cdr_syslog |
918 |
use_select vorbis format_ogg_vorbis |
919 |
|
920 |
# Voicemail storage ... |
921 |
for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
922 |
if use ${vmst}; then |
923 |
menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
924 |
fi |
925 |
done |
926 |
|
927 |
if use debug; then |
928 |
for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do |
929 |
menuselect/menuselect --enable $o menuselect.makeopts |
930 |
done |
931 |
fi |
932 |
} |
933 |
|
934 |
src_compile() { |
935 |
ASTLDFLAGS="${LDFLAGS}" emake |
936 |
} |
937 |
|
938 |
src_install() { |
939 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
940 |
emake DESTDIR="${D}" installdirs |
941 |
emake DESTDIR="${D}" install |
942 |
|
943 |
if use radius; then |
944 |
insinto /etc/radiusclient-ng/ |
945 |
doins contrib/dictionary.digium |
946 |
fi |
947 |
diropts -m 0750 -o root -g asterisk |
948 |
keepdir /etc/asterisk |
949 |
if use samples; then |
950 |
emake DESTDIR="${D}" samples |
951 |
for conffile in "${D}"etc/asterisk/*.* |
952 |
do |
953 |
chown root:root $conffile |
954 |
chmod 0644 $conffile |
955 |
done |
956 |
einfo "Sample files have been installed" |
957 |
else |
958 |
einfo "Skipping installation of sample files..." |
959 |
rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
960 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
961 |
rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
962 |
rm -f "${D}"etc/asterisk/* || die |
963 |
fi |
964 |
rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
965 |
|
966 |
# keep directories |
967 |
diropts -m 0770 -o asterisk asterisk |
968 |
keepdir /var/lib/asterisk |
969 |
keepdir /var/spool/asterisk |
970 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
971 |
diropts -m 0750 -o asterisk -g asterisk |
972 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
973 |
|
974 |
newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk |
975 |
newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
976 |
|
977 |
systemd_dounit "${FILESDIR}"/asterisk.service |
978 |
systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf |
979 |
systemd_install_serviced "${FILESDIR}"/asterisk.service.conf |
980 |
|
981 |
# install the upgrade documentation |
982 |
# |
983 |
dodoc README UPGRADE* BUGS CREDITS |
984 |
|
985 |
# install extra documentation |
986 |
# |
987 |
if use doc |
988 |
then |
989 |
dodoc doc/*.txt |
990 |
dodoc doc/*.pdf |
991 |
fi |
992 |
|
993 |
# install SIP scripts; bug #300832 |
994 |
# |
995 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
996 |
dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
997 |
dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
998 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
999 |
|
1000 |
# install logrotate snippet; bug #329281 |
1001 |
# |
1002 |
insinto /etc/logrotate.d |
1003 |
newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk |
1004 |
} |
1005 |
|
1006 |
pkg_postinst() { |
1007 |
# |
1008 |
# Announcements, warnings, reminders... |
1009 |
# |
1010 |
einfo "Asterisk has been installed" |
1011 |
echo |
1012 |
elog "If you want to know more about asterisk, visit these sites:" |
1013 |
elog "http://www.asteriskdocs.org/" |
1014 |
elog "http://www.voip-info.org/wiki-Asterisk" |
1015 |
echo |
1016 |
elog "http://www.automated.it/guidetoasterisk.htm" |
1017 |
echo |
1018 |
elog "Gentoo VoIP IRC Channel:" |
1019 |
elog "#gentoo-voip @ irc.freenode.net" |
1020 |
echo |
1021 |
echo |
1022 |
elog "Please read the Asterisk 11 upgrade document:" |
1023 |
elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11" |
1024 |
} |
1025 |
|
1026 |
pkg_config() { |
1027 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
1028 |
|
1029 |
read tmp |
1030 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
1031 |
|
1032 |
if [[ "$tmp" = "y" ]] ||\ |
1033 |
[[ "$tmp" = "yes" ]] |
1034 |
then |
1035 |
einfo "Resetting permissions to defaults..." |
1036 |
|
1037 |
for x in spool run lib log; do |
1038 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
1039 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
1040 |
done |
1041 |
|
1042 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
1043 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
1044 |
|
1045 |
einfo "done" |
1046 |
else |
1047 |
einfo "skipping" |
1048 |
fi |
1049 |
} |
1050 |
|
1051 |
|
1052 |
|
1053 |
1.1 net-misc/asterisk/asterisk-11.14.2-r1.ebuild |
1054 |
|
1055 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.14.2-r1.ebuild?rev=1.1&view=markup |
1056 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.14.2-r1.ebuild?rev=1.1&content-type=text/plain |
1057 |
|
1058 |
Index: asterisk-11.14.2-r1.ebuild |
1059 |
=================================================================== |
1060 |
# Copyright 1999-2014 Gentoo Foundation |
1061 |
# Distributed under the terms of the GNU General Public License v2 |
1062 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-11.14.2-r1.ebuild,v 1.1 2014/12/30 21:15:52 tamiko Exp $ |
1063 |
|
1064 |
EAPI=5 |
1065 |
inherit autotools base eutils linux-info multilib user systemd |
1066 |
|
1067 |
MY_P="${PN}-${PV/_/-}" |
1068 |
|
1069 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
1070 |
HOMEPAGE="http://www.asterisk.org/" |
1071 |
SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
1072 |
mirror://gentoo/gentoo-asterisk-patchset-3.14.tar.bz2" |
1073 |
LICENSE="GPL-2" |
1074 |
SLOT="0" |
1075 |
KEYWORDS="~amd64 ~x86" |
1076 |
|
1077 |
IUSE_VOICEMAIL_STORAGE=" |
1078 |
+voicemail_storage_file |
1079 |
voicemail_storage_odbc |
1080 |
voicemail_storage_imap |
1081 |
" |
1082 |
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" |
1083 |
IUSE_EXPAND="VOICEMAIL_STORAGE" |
1084 |
REQUIRED_USE="gtalk? ( jabber ) |
1085 |
^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
1086 |
voicemail_storage_odbc? ( odbc ) |
1087 |
" |
1088 |
|
1089 |
EPATCH_SUFFIX="patch" |
1090 |
PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
1091 |
|
1092 |
CDEPEND="dev-db/sqlite:3 |
1093 |
dev-libs/popt |
1094 |
dev-libs/libxml2 |
1095 |
dev-libs/openssl |
1096 |
sys-libs/ncurses |
1097 |
sys-libs/zlib |
1098 |
alsa? ( media-libs/alsa-lib ) |
1099 |
bluetooth? ( net-wireless/bluez ) |
1100 |
calendar? ( net-libs/neon |
1101 |
dev-libs/libical |
1102 |
dev-libs/iksemel ) |
1103 |
caps? ( sys-libs/libcap ) |
1104 |
cluster? ( sys-cluster/corosync ) |
1105 |
curl? ( net-misc/curl ) |
1106 |
dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
1107 |
net-misc/dahdi-tools ) |
1108 |
freetds? ( dev-db/freetds ) |
1109 |
gtalk? ( dev-libs/iksemel ) |
1110 |
http? ( dev-libs/gmime:2.6 ) |
1111 |
iconv? ( virtual/libiconv ) |
1112 |
ilbc? ( dev-libs/ilbc-rfc3951 ) |
1113 |
jabber? ( dev-libs/iksemel ) |
1114 |
ldap? ( net-nds/openldap ) |
1115 |
libedit? ( dev-libs/libedit ) |
1116 |
lua? ( dev-lang/lua ) |
1117 |
mysql? ( virtual/mysql ) |
1118 |
newt? ( dev-libs/newt ) |
1119 |
odbc? ( dev-db/unixODBC ) |
1120 |
osplookup? ( net-libs/osptoolkit ) |
1121 |
portaudio? ( media-libs/portaudio ) |
1122 |
postgres? ( dev-db/postgresql ) |
1123 |
radius? ( net-dialup/radiusclient-ng ) |
1124 |
snmp? ( net-analyzer/net-snmp ) |
1125 |
span? ( media-libs/spandsp ) |
1126 |
speex? ( media-libs/speex ) |
1127 |
srtp? ( net-libs/libsrtp ) |
1128 |
vorbis? ( media-libs/libvorbis )" |
1129 |
|
1130 |
DEPEND="${CDEPEND} |
1131 |
!net-libs/openh323 |
1132 |
!net-libs/pjsip |
1133 |
voicemail_storage_imap? ( virtual/imap-c-client ) |
1134 |
virtual/pkgconfig |
1135 |
" |
1136 |
|
1137 |
RDEPEND="${CDEPEND} |
1138 |
selinux? ( sec-policy/selinux-asterisk ) |
1139 |
syslog? ( virtual/logger )" |
1140 |
|
1141 |
PDEPEND="net-misc/asterisk-core-sounds |
1142 |
net-misc/asterisk-extra-sounds |
1143 |
net-misc/asterisk-moh-opsound" |
1144 |
|
1145 |
S="${WORKDIR}/${MY_P}" |
1146 |
|
1147 |
pkg_setup() { |
1148 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
1149 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
1150 |
have reported that this module dropped critical SIP packets in their deployments. You |
1151 |
may want to disable it if you see such problems." |
1152 |
check_extra_config |
1153 |
|
1154 |
enewgroup asterisk |
1155 |
enewgroup dialout 20 |
1156 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
1157 |
} |
1158 |
|
1159 |
src_prepare() { |
1160 |
base_src_prepare |
1161 |
AT_M4DIR=autoconf eautoreconf |
1162 |
} |
1163 |
|
1164 |
src_configure() { |
1165 |
local vmst |
1166 |
|
1167 |
econf \ |
1168 |
--libdir="/usr/$(get_libdir)" \ |
1169 |
--localstatedir="/var" \ |
1170 |
--with-crypto \ |
1171 |
--with-gsm=internal \ |
1172 |
--with-popt \ |
1173 |
--with-ssl \ |
1174 |
--with-z \ |
1175 |
--without-pwlib \ |
1176 |
$(use_with caps cap) \ |
1177 |
$(use_with http gmime) \ |
1178 |
$(use_with newt) \ |
1179 |
$(use_with portaudio) |
1180 |
|
1181 |
# Blank out sounds/sounds.xml file to prevent |
1182 |
# asterisk from installing sounds files (we pull them in via |
1183 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
1184 |
>"${S}"/sounds/sounds.xml |
1185 |
|
1186 |
# That NATIVE_ARCH chatter really is quite bothersome |
1187 |
sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system" |
1188 |
|
1189 |
# Compile menuselect binary for optional components |
1190 |
emake menuselect.makeopts |
1191 |
|
1192 |
# Broken functionality is forcibly disabled (bug #360143) |
1193 |
menuselect/menuselect --disable chan_misdn menuselect.makeopts |
1194 |
menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
1195 |
|
1196 |
# Utility set is forcibly enabled (bug #358001) |
1197 |
menuselect/menuselect --enable smsq menuselect.makeopts |
1198 |
menuselect/menuselect --enable streamplayer menuselect.makeopts |
1199 |
menuselect/menuselect --enable aelparse menuselect.makeopts |
1200 |
menuselect/menuselect --enable astman menuselect.makeopts |
1201 |
|
1202 |
# this is connected, otherwise it would not find |
1203 |
# ast_pktccops_gate_alloc symbol |
1204 |
menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
1205 |
menuselect/menuselect --enable res_pktccops menuselect.makeopts |
1206 |
|
1207 |
# SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
1208 |
menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
1209 |
menuselect/menuselect --enable func_aes menuselect.makeopts |
1210 |
menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
1211 |
|
1212 |
# SQlite3 is now the main database backend, enable related features |
1213 |
menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
1214 |
menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts |
1215 |
|
1216 |
# The others are based on USE-flag settings |
1217 |
use_select() { |
1218 |
local state=$(use "$1" && echo enable || echo disable) |
1219 |
shift # remove use from parameters |
1220 |
|
1221 |
while [[ -n $1 ]]; do |
1222 |
menuselect/menuselect --${state} "$1" menuselect.makeopts |
1223 |
shift |
1224 |
done |
1225 |
} |
1226 |
|
1227 |
use_select alsa chan_alsa |
1228 |
use_select bluetooth chan_mobile |
1229 |
use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
1230 |
use_select cluster res_corosync |
1231 |
use_select curl func_curl res_config_curl res_curl |
1232 |
use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi |
1233 |
use_select freetds {cdr,cel}_tds |
1234 |
use_select gtalk chan_motif |
1235 |
use_select http res_http_post |
1236 |
use_select iconv func_iconv |
1237 |
use_select jabber res_xmpp |
1238 |
use_select ilbc codec_ilbc format_ilbc |
1239 |
use_select ldap res_config_ldap |
1240 |
use_select lua pbx_lua |
1241 |
use_select mysql app_mysql cdr_mysql res_config_mysql |
1242 |
use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
1243 |
use_select osplookup app_osplookup |
1244 |
use_select oss chan_oss |
1245 |
use_select postgres {cdr,cel}_pgsql res_config_pgsql |
1246 |
use_select radius {cdr,cel}_radius |
1247 |
use_select snmp res_snmp |
1248 |
use_select span res_fax_spandsp |
1249 |
use_select speex {codec,func}_speex |
1250 |
use_select srtp res_srtp |
1251 |
use_select syslog cdr_syslog |
1252 |
use_select vorbis format_ogg_vorbis |
1253 |
|
1254 |
# Voicemail storage ... |
1255 |
for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
1256 |
if use ${vmst}; then |
1257 |
menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
1258 |
fi |
1259 |
done |
1260 |
|
1261 |
if use debug; then |
1262 |
for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do |
1263 |
menuselect/menuselect --enable $o menuselect.makeopts |
1264 |
done |
1265 |
fi |
1266 |
} |
1267 |
|
1268 |
src_compile() { |
1269 |
ASTLDFLAGS="${LDFLAGS}" emake |
1270 |
} |
1271 |
|
1272 |
src_install() { |
1273 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
1274 |
emake DESTDIR="${D}" installdirs |
1275 |
emake DESTDIR="${D}" install |
1276 |
|
1277 |
if use radius; then |
1278 |
insinto /etc/radiusclient-ng/ |
1279 |
doins contrib/dictionary.digium |
1280 |
fi |
1281 |
diropts -m 0750 -o root -g asterisk |
1282 |
keepdir /etc/asterisk |
1283 |
if use samples; then |
1284 |
emake DESTDIR="${D}" samples |
1285 |
for conffile in "${D}"etc/asterisk/*.* |
1286 |
do |
1287 |
chown root:root $conffile |
1288 |
chmod 0644 $conffile |
1289 |
done |
1290 |
einfo "Sample files have been installed" |
1291 |
else |
1292 |
einfo "Skipping installation of sample files..." |
1293 |
rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
1294 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
1295 |
rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
1296 |
rm -f "${D}"etc/asterisk/* || die |
1297 |
fi |
1298 |
rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
1299 |
|
1300 |
# keep directories |
1301 |
diropts -m 0770 -o asterisk asterisk |
1302 |
keepdir /var/lib/asterisk |
1303 |
keepdir /var/spool/asterisk |
1304 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
1305 |
diropts -m 0750 -o asterisk -g asterisk |
1306 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
1307 |
|
1308 |
newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk |
1309 |
newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
1310 |
|
1311 |
systemd_dounit "${FILESDIR}"/asterisk.service |
1312 |
systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf |
1313 |
systemd_install_serviced "${FILESDIR}"/asterisk.service.conf |
1314 |
|
1315 |
# install the upgrade documentation |
1316 |
# |
1317 |
dodoc README UPGRADE* BUGS CREDITS |
1318 |
|
1319 |
# install extra documentation |
1320 |
# |
1321 |
if use doc |
1322 |
then |
1323 |
dodoc doc/*.txt |
1324 |
dodoc doc/*.pdf |
1325 |
fi |
1326 |
|
1327 |
# install SIP scripts; bug #300832 |
1328 |
# |
1329 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
1330 |
dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
1331 |
dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
1332 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
1333 |
|
1334 |
# install logrotate snippet; bug #329281 |
1335 |
# |
1336 |
insinto /etc/logrotate.d |
1337 |
newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk |
1338 |
} |
1339 |
|
1340 |
pkg_postinst() { |
1341 |
# |
1342 |
# Announcements, warnings, reminders... |
1343 |
# |
1344 |
einfo "Asterisk has been installed" |
1345 |
echo |
1346 |
elog "If you want to know more about asterisk, visit these sites:" |
1347 |
elog "http://www.asteriskdocs.org/" |
1348 |
elog "http://www.voip-info.org/wiki-Asterisk" |
1349 |
echo |
1350 |
elog "http://www.automated.it/guidetoasterisk.htm" |
1351 |
echo |
1352 |
elog "Gentoo VoIP IRC Channel:" |
1353 |
elog "#gentoo-voip @ irc.freenode.net" |
1354 |
echo |
1355 |
echo |
1356 |
elog "Please read the Asterisk 11 upgrade document:" |
1357 |
elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11" |
1358 |
} |
1359 |
|
1360 |
pkg_config() { |
1361 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
1362 |
|
1363 |
read tmp |
1364 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
1365 |
|
1366 |
if [[ "$tmp" = "y" ]] ||\ |
1367 |
[[ "$tmp" = "yes" ]] |
1368 |
then |
1369 |
einfo "Resetting permissions to defaults..." |
1370 |
|
1371 |
for x in spool run lib log; do |
1372 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
1373 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
1374 |
done |
1375 |
|
1376 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
1377 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
1378 |
|
1379 |
einfo "done" |
1380 |
else |
1381 |
einfo "skipping" |
1382 |
fi |
1383 |
} |