1 |
chainsaw 09/10/26 13:34:22 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-1.6.1.6-r2.ebuild |
5 |
Removed: asterisk-1.6.1.6.ebuild |
6 |
Log: |
7 |
Cope with automated British Telecom line tests as they currently cause the DAHDI channel to wedge with "exiting simple switch" messages. An upstream bug exists since July but has not been actioned yet. Delete old ebuild. |
8 |
(Portage version: 2.1.7.1/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.218 net-misc/asterisk/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.218&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.218&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.217&r2=1.218 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
20 |
retrieving revision 1.217 |
21 |
retrieving revision 1.218 |
22 |
diff -u -r1.217 -r1.218 |
23 |
--- ChangeLog 22 Oct 2009 14:47:54 -0000 1.217 |
24 |
+++ ChangeLog 26 Oct 2009 13:34:21 -0000 1.218 |
25 |
@@ -1,6 +1,15 @@ |
26 |
# ChangeLog for net-misc/asterisk |
27 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.217 2009/10/22 14:47:54 chainsaw Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.218 2009/10/26 13:34:21 chainsaw Exp $ |
30 |
+ |
31 |
+*asterisk-1.6.1.6-r2 (26 Oct 2009) |
32 |
+ |
33 |
+ 26 Oct 2009; <chainsaw@g.o> -asterisk-1.6.1.6.ebuild, |
34 |
+ +asterisk-1.6.1.6-r2.ebuild, |
35 |
+ +files/1.6.1/asterisk-1.6.1.6-bt-line-test.patch: |
36 |
+ Cope with automated British Telecom line tests as they currently cause the |
37 |
+ DAHDI channel to wedge with "exiting simple switch" messages. An upstream |
38 |
+ bug exists since July but has not been actioned yet. Delete old ebuild. |
39 |
|
40 |
*asterisk-1.6.1.6-r1 (22 Oct 2009) |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
1.1 net-misc/asterisk/asterisk-1.6.1.6-r2.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.1.6-r2.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.1.6-r2.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: asterisk-1.6.1.6-r2.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2009 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.6.1.6-r2.ebuild,v 1.1 2009/10/26 13:34:21 chainsaw Exp $ |
55 |
|
56 |
EAPI=1 |
57 |
inherit eutils autotools |
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.digium.com/pub/asterisk/releases/${MY_P}.tar.gz" |
64 |
LICENSE="GPL-2" |
65 |
SLOT="0" |
66 |
KEYWORDS="~amd64 ~x86" |
67 |
|
68 |
IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap keepsrc misdn newt nosamples odbc oss postgres radius snmp span speex ssl sqlite static vorbis" |
69 |
|
70 |
RDEPEND="sys-libs/ncurses |
71 |
dev-libs/popt |
72 |
sys-libs/zlib |
73 |
alsa? ( media-libs/alsa-lib ) |
74 |
caps? ( sys-libs/libcap ) |
75 |
curl? ( net-misc/curl ) |
76 |
dahdi? ( >=net-libs/libpri-1.4.7 |
77 |
net-misc/dahdi-tools ) |
78 |
freetds? ( dev-db/freetds ) |
79 |
iconv? ( virtual/libiconv ) |
80 |
jabber? ( dev-libs/iksemel ) |
81 |
ldap? ( net-nds/openldap ) |
82 |
misdn? ( net-dialup/misdnuser ) |
83 |
newt? ( dev-libs/newt ) |
84 |
odbc? ( dev-db/unixODBC ) |
85 |
postgres? ( virtual/postgresql-base ) |
86 |
radius? ( net-dialup/radiusclient-ng ) |
87 |
snmp? ( net-analyzer/net-snmp ) |
88 |
span? ( media-libs/spandsp ) |
89 |
speex? ( media-libs/speex ) |
90 |
sqlite? ( dev-db/sqlite ) |
91 |
ssl? ( dev-libs/openssl ) |
92 |
vorbis? ( media-libs/libvorbis )" |
93 |
|
94 |
DEPEND="${RDEPEND} |
95 |
!<net-misc/asterisk-addons-1.6" |
96 |
|
97 |
S="${WORKDIR}/${MY_P}" |
98 |
|
99 |
# |
100 |
# shortcuts |
101 |
# |
102 |
|
103 |
# update from asterisk-1.0.x |
104 |
is_ast10update() { |
105 |
return $(has_version "=net-misc/asterisk-1.0*") |
106 |
} |
107 |
|
108 |
# update from asterisk-1.2.x |
109 |
is_ast12update() { |
110 |
return $(has_version "=net-misc/asterisk-1.2*") |
111 |
} |
112 |
|
113 |
# update from asterisk 1.4.x |
114 |
is_ast14update() { |
115 |
return $(has_version "=net-misc/asterisk-1.4*") |
116 |
} |
117 |
|
118 |
# update in the asterisk-1.6.x line |
119 |
is_astupdate() { |
120 |
if ! is_ast10update && ! is_ast12update && !is_ast14update; then |
121 |
return $(has_version "<net-misc/asterisk-${PV}") |
122 |
fi |
123 |
return 0 |
124 |
} |
125 |
|
126 |
get_available_modules() { |
127 |
local modules mod x |
128 |
|
129 |
# build list of available modules... |
130 |
for x in app cdr codec format func pbx res; do |
131 |
|
132 |
for mod in $(find "${S}" -type f -name "${x}_*.c*" -print) |
133 |
do |
134 |
modules="${modules} $(basename ${mod/%.c*})" |
135 |
done |
136 |
done |
137 |
|
138 |
echo "${modules}" |
139 |
} |
140 |
|
141 |
pkg_setup() { |
142 |
local checkfailed=0 waitaftermsg=0 |
143 |
|
144 |
if is_ast10update || is_ast12update || is_ast14update ; then |
145 |
ewarn " Asterisk UPGRADE Warning" |
146 |
ewarn "" |
147 |
ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 after the installation!" |
148 |
ewarn "" |
149 |
ewarn " Asterisk UPGRADE Warning" |
150 |
echo |
151 |
waitaftermsg=1 |
152 |
fi |
153 |
|
154 |
if [[ $waitaftermsg -eq 1 ]]; then |
155 |
einfo "Press Ctrl+C to abort" |
156 |
echo |
157 |
ebeep 10 |
158 |
fi |
159 |
|
160 |
# |
161 |
# Regular checks |
162 |
# |
163 |
einfo "Running some pre-flight checks..." |
164 |
echo |
165 |
|
166 |
if [[ -n "${ASTERISK_MODULES}" ]] ; then |
167 |
ewarn "You are overriding ASTERISK_MODULES. We will assume you know what you are doing. There is no support for this option, try without if you see breakage." |
168 |
fi |
169 |
} |
170 |
|
171 |
src_unpack() { |
172 |
unpack ${A} |
173 |
cd "${S}" |
174 |
|
175 |
# |
176 |
# put pid file(s) into /var/run/asterisk |
177 |
# |
178 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-var_rundir.patch || die "patch failed" |
179 |
|
180 |
# |
181 |
# fix gsm codec cflags (e.g. i586 core epias) and disable |
182 |
# assembler optimizations |
183 |
# |
184 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-gsm-pic.patch || die "patch failed" |
185 |
|
186 |
# |
187 |
# add missing LIBS for uclibc |
188 |
# |
189 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-uclibc.patch || die "patch failed" |
190 |
|
191 |
# |
192 |
# compensate for non-standard LUA header paths in Gentoo |
193 |
# |
194 |
epatch "${FILESDIR}"/1.6.1/${P}-lua-includes.patch || die "patch failed" |
195 |
|
196 |
# |
197 |
# make sure FXO ports are usable immediately, without requiring an inbound call first |
198 |
# https://issues.asterisk.org/view.php?id=14577 |
199 |
# |
200 |
epatch "${FILESDIR}"/1.6.1/${P}-fxsks-hookstate.patch || die "patch failed" |
201 |
|
202 |
# |
203 |
# avoid segmentation fault when transferring a queue call |
204 |
# https://issues.asterisk.org/view.php?id=15848 |
205 |
# |
206 |
epatch "${FILESDIR}"/1.6.1/${P}-transfer-segfault.patch || die "patch failed" |
207 |
|
208 |
# |
209 |
# do not ignore alarm-cleared event while V23 caller ID detection is in progress |
210 |
# otherwise automated British Telecom line test causes permanent red alarm |
211 |
# https://issues.asterisk.org/view.php?id=14163 |
212 |
# |
213 |
epatch "${FILESDIR}"/1.6.1/${P}-bt-line-test.patch || die "patch failed" |
214 |
|
215 |
AT_M4DIR=autoconf eautoreconf |
216 |
|
217 |
# parse modules list |
218 |
if [[ -n "${ASTERISK_MODULES}" ]]; then |
219 |
local x modules="$(get_available_modules)" |
220 |
|
221 |
einfo "Custom list of modules specified, checking..." |
222 |
|
223 |
use debug && { |
224 |
einfo "Available modules: ${modules}" |
225 |
einfo " Selected modules: ${ASTERISK_MODULES}" |
226 |
} |
227 |
|
228 |
for x in ${ASTERISK_MODULES}; do |
229 |
if [[ "${x}" = "-*" ]]; then |
230 |
MODULES_LIST="" |
231 |
else |
232 |
if has ${x} ${modules} |
233 |
then |
234 |
MODULES_LIST="${MODULES_LIST} ${x}" |
235 |
else |
236 |
eerror "Unknown module: ${x}" |
237 |
fi |
238 |
fi |
239 |
done |
240 |
|
241 |
export MODULES_LIST |
242 |
fi |
243 |
} |
244 |
|
245 |
src_compile() { |
246 |
# |
247 |
# start with configure |
248 |
# |
249 |
econf \ |
250 |
--libdir="/usr/$(get_libdir)" \ |
251 |
--localstatedir="/var" \ |
252 |
--with-gsm=internal \ |
253 |
--with-popt \ |
254 |
--with-z \ |
255 |
$(use_with alsa asound) \ |
256 |
$(use_with caps cap) \ |
257 |
$(use_with curl) \ |
258 |
$(use_with dahdi pri) \ |
259 |
$(use_with dahdi tonezone) \ |
260 |
$(use_with dahdi) \ |
261 |
$(use_with freetds tds) \ |
262 |
$(use_with iconv) \ |
263 |
$(use_with jabber iksemel) \ |
264 |
$(use_with misdn isdnnet) \ |
265 |
$(use_with misdn suppserv) \ |
266 |
$(use_with misdn) \ |
267 |
$(use_with newt) \ |
268 |
$(use_with odbc) \ |
269 |
$(use_with oss) \ |
270 |
$(use_with postgres) \ |
271 |
$(use_with radius) \ |
272 |
$(use_with snmp netsnmp) \ |
273 |
$(use_with span spandsp) \ |
274 |
$(use_with speex) \ |
275 |
$(use_with speex speexdsp) \ |
276 |
$(use_with sqlite sqlite3) \ |
277 |
$(use_with ssl crypto) \ |
278 |
$(use_with ssl) \ |
279 |
$(use_with vorbis ogg) \ |
280 |
$(use_with vorbis) || die "econf failed" |
281 |
|
282 |
# |
283 |
# custom module filter |
284 |
# run menuselect to evaluate the list of modules |
285 |
# and rewrite the list afterwards |
286 |
# |
287 |
if [[ -n "${MODULES_LIST}" ]] |
288 |
then |
289 |
local mod category tmp_list failed_list |
290 |
|
291 |
### |
292 |
# run menuselect |
293 |
|
294 |
emake menuselect.makeopts || die "emake menuselect.makeopts failed" |
295 |
|
296 |
### |
297 |
# get list of modules with failed dependencies |
298 |
|
299 |
failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)" |
300 |
|
301 |
### |
302 |
# traverse our list of modules |
303 |
|
304 |
for category in app cdr codec format func pbx res; do |
305 |
tmp_list="" |
306 |
|
307 |
# search list of modules for matching ones first... |
308 |
for mod in ${MODULES_LIST}; do |
309 |
# module is from current category? |
310 |
if [[ "${mod/%_*}" = "${category}" ]] |
311 |
then |
312 |
# check menuselect thinks the dependencies are met |
313 |
if has ${mod} ${failed_list} |
314 |
then |
315 |
eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!" |
316 |
else |
317 |
tmp_list="${tmp_list} ${mod}" |
318 |
fi |
319 |
fi |
320 |
done |
321 |
|
322 |
use debug && echo "${category} tmp: ${tmp_list}" |
323 |
|
324 |
# replace the module list for $category with our custom one |
325 |
if [[ -n "${tmp_list}" ]] |
326 |
then |
327 |
category="$(echo ${category} | tr '[:lower:]' '[:upper:]')" |
328 |
sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \ |
329 |
menuselect.makeopts || die "failed to set list of ${category} applications" |
330 |
fi |
331 |
done |
332 |
fi |
333 |
|
334 |
emake || die "emake failed" |
335 |
} |
336 |
|
337 |
src_install() { |
338 |
# setup directory structure |
339 |
# |
340 |
mkdir -p "${D}"usr/lib/pkgconfig |
341 |
|
342 |
emake DESTDIR="${D}" install || die "emake install failed" |
343 |
emake DESTDIR="${D}" samples || die "emake samples failed" |
344 |
|
345 |
# remove installed sample files if nosamples flag is set |
346 |
if use nosamples; then |
347 |
einfo "Skipping installation of sample files..." |
348 |
rm -f "${D}"var/lib/asterisk/mohmp3/* |
349 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* |
350 |
rm -f "${D}"var/lib/asterisk/agi-bin/* |
351 |
else |
352 |
einfo "Sample files have been installed" |
353 |
fi |
354 |
rm -rf "${D}"var/spool/asterisk/voicemail/default |
355 |
|
356 |
# move sample configuration files to doc directory |
357 |
if is_ast10update || is_ast12update || is_ast14update; then |
358 |
einfo "Updating from old (pre-1.6) asterisk version, new configuration files have been installed" |
359 |
einfo "into "${ROOT}"etc/asterisk, use etc-update or dispatch-conf to update them" |
360 |
fi |
361 |
|
362 |
einfo "Configuration samples have been moved to: "${ROOT}"/usr/share/doc/${PF}/conf" |
363 |
insinto /usr/share/doc/${PF}/conf |
364 |
doins "${D}"etc/asterisk/*.conf* |
365 |
|
366 |
# keep directories |
367 |
diropts -m 0770 -o asterisk -g asterisk |
368 |
keepdir /etc/asterisk |
369 |
keepdir /var/lib/asterisk |
370 |
keepdir /var/run/asterisk |
371 |
keepdir /var/spool/asterisk |
372 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
373 |
diropts -m 0750 -o asterisk -g asterisk |
374 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
375 |
|
376 |
newinitd "${FILESDIR}"/1.6.1/asterisk.initd asterisk |
377 |
newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk |
378 |
|
379 |
# some people like to keep the sources around for custom patching |
380 |
# copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there |
381 |
if use keepsrc |
382 |
then |
383 |
einfo "keepsrc useflag enabled, copying source..." |
384 |
dodir /usr/src |
385 |
|
386 |
cp -dPR "${S}" "${D}"/usr/src/${PF} || die "copying source tree failed" |
387 |
|
388 |
ebegin "running make clean..." |
389 |
emake -C "${D}"/usr/src/${PF} clean >/dev/null || die "make clean failed" |
390 |
eend $? |
391 |
|
392 |
einfo "Source files have been saved to "${ROOT}"usr/src/${PF}" |
393 |
fi |
394 |
|
395 |
# install the upgrade documentation |
396 |
# |
397 |
dodoc README UPGRADE* BUGS CREDITS |
398 |
|
399 |
# install snmp mib files |
400 |
# |
401 |
if use snmp |
402 |
then |
403 |
insinto /usr/share/snmp/mibs/ |
404 |
doins doc/digium-mib.txt doc/asterisk-mib.txt |
405 |
fi |
406 |
} |
407 |
|
408 |
pkg_preinst() { |
409 |
enewgroup asterisk |
410 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
411 |
} |
412 |
|
413 |
pkg_postinst() { |
414 |
ebegin "Fixing up permissions" |
415 |
chown -R asterisk:asterisk "${ROOT}"var/log/asterisk |
416 |
chmod -R u=rwX,g=rX,o= "${ROOT}"var/log/asterisk |
417 |
|
418 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/ |
419 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/*.adsi |
420 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/extensions.ael |
421 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/ |
422 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/*.adsi |
423 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/extensions.ael |
424 |
eend $? |
425 |
|
426 |
# |
427 |
# Announcements, warnings, reminders... |
428 |
# |
429 |
einfo "Asterisk has been installed" |
430 |
echo |
431 |
elog "If you want to know more about asterisk, visit these sites:" |
432 |
elog "http://www.asteriskdocs.org/" |
433 |
elog "http://www.voip-info.org/wiki-Asterisk" |
434 |
echo |
435 |
elog "http://www.automated.it/guidetoasterisk.htm" |
436 |
echo |
437 |
elog "Gentoo VoIP IRC Channel:" |
438 |
elog "#gentoo-voip @ irc.freenode.net" |
439 |
echo |
440 |
echo |
441 |
|
442 |
# |
443 |
# Warning about 1.x -> 1.6 changes... |
444 |
# |
445 |
if is_ast10update || is_ast12update || is_ast14update; then |
446 |
ewarn "" |
447 |
ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 before continuing" |
448 |
ewarn "" |
449 |
fi |
450 |
} |
451 |
|
452 |
pkg_config() { |
453 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
454 |
|
455 |
read tmp |
456 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
457 |
|
458 |
if [[ "$tmp" = "y" ]] ||\ |
459 |
[[ "$tmp" = "yes" ]] |
460 |
then |
461 |
einfo "Resetting permissions to defaults..." |
462 |
|
463 |
for x in spool run lib log; do |
464 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
465 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
466 |
done |
467 |
|
468 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
469 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
470 |
|
471 |
einfo "done" |
472 |
else |
473 |
einfo "skipping" |
474 |
fi |
475 |
} |