1 |
chainsaw 10/02/10 22:25:30 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-1.6.2.2-r1.ebuild |
5 |
Log: |
6 |
Add nv_faxdetect as scavenged by Cory Coager in bug #298328. Trim unnecessary parts from parallel make patch, upstream bug #16489. Stop segfaulting on a graceful restart, upstream bugs #16062 & #16470. |
7 |
(Portage version: 2.2_rc62/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.247 net-misc/asterisk/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.247&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.247&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.246&r2=1.247 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
19 |
retrieving revision 1.246 |
20 |
retrieving revision 1.247 |
21 |
diff -u -r1.246 -r1.247 |
22 |
--- ChangeLog 2 Feb 2010 22:54:51 -0000 1.246 |
23 |
+++ ChangeLog 10 Feb 2010 22:25:29 -0000 1.247 |
24 |
@@ -1,6 +1,16 @@ |
25 |
# ChangeLog for net-misc/asterisk |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.246 2010/02/02 22:54:51 chainsaw Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.247 2010/02/10 22:25:29 chainsaw Exp $ |
29 |
+ |
30 |
+*asterisk-1.6.2.2-r1 (10 Feb 2010) |
31 |
+ |
32 |
+ 10 Feb 2010; <chainsaw@g.o> +asterisk-1.6.2.2-r1.ebuild, |
33 |
+ +files/1.6.2/asterisk-1.6.2.2-graceful-restart-segfault.patch, |
34 |
+ +files/1.6.2/asterisk-1.6.2.2-nv-faxdetect.patch, |
35 |
+ +files/1.6.2/asterisk-1.6.2.2-parallel-make.patch: |
36 |
+ Add nv_faxdetect as scavenged by Cory Coager in bug #298328. Trim |
37 |
+ unnecessary parts from parallel make patch, upstream bug #16489. Stop |
38 |
+ segfaulting on a graceful restart, upstream bugs #16062 & #16470. |
39 |
|
40 |
*asterisk-1.6.1.14 (02 Feb 2010) |
41 |
|
42 |
|
43 |
|
44 |
|
45 |
1.1 net-misc/asterisk/asterisk-1.6.2.2-r1.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.2-r1.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.2-r1.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: asterisk-1.6.2.2-r1.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2010 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.2.2-r1.ebuild,v 1.1 2010/02/10 22:25:29 chainsaw Exp $ |
55 |
|
56 |
EAPI=1 |
57 |
inherit eutils autotools linux-info |
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 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 |
postgres? ( virtual/postgresql-base ) |
85 |
radius? ( net-dialup/radiusclient-ng ) |
86 |
snmp? ( net-analyzer/net-snmp ) |
87 |
span? ( media-libs/spandsp ) |
88 |
speex? ( media-libs/speex ) |
89 |
sqlite? ( dev-db/sqlite ) |
90 |
ssl? ( dev-libs/openssl ) |
91 |
vorbis? ( media-libs/libvorbis )" |
92 |
|
93 |
DEPEND="${RDEPEND} |
94 |
!<net-misc/asterisk-addons-1.6 |
95 |
!net-misc/asterisk-chan_unistim |
96 |
!net-misc/zaptel" |
97 |
|
98 |
S="${WORKDIR}/${MY_P}" |
99 |
|
100 |
get_available_modules() { |
101 |
local modules mod x |
102 |
|
103 |
# build list of available modules... |
104 |
for x in app cdr codec format func pbx res; do |
105 |
|
106 |
for mod in $(find "${S}" -type f -name "${x}_*.c*" -print) |
107 |
do |
108 |
modules="${modules} $(basename ${mod/%.c*})" |
109 |
done |
110 |
done |
111 |
|
112 |
echo "${modules}" |
113 |
} |
114 |
|
115 |
pkg_setup() { |
116 |
if [[ -n "${ASTERISK_MODULES}" ]] ; then |
117 |
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." |
118 |
fi |
119 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
120 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is a module written for a single SIP client talking to a |
121 |
remote server. It is not able to track multiple remote SIP clients registering with |
122 |
a local server. Critical SIP packets may be dropped." |
123 |
check_extra_config |
124 |
} |
125 |
|
126 |
src_unpack() { |
127 |
unpack ${A} |
128 |
cd "${S}" |
129 |
|
130 |
# |
131 |
# fix gsm codec cflags (e.g. i586 core epias) and disable |
132 |
# assembler optimizations |
133 |
# |
134 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-gsm-pic.patch || die "patch failed" |
135 |
|
136 |
# |
137 |
# add missing LIBS for uclibc |
138 |
# |
139 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-uclibc.patch || die "patch failed" |
140 |
|
141 |
# |
142 |
# make sure FXO ports are usable immediately, without requiring an inbound call first |
143 |
# https://issues.asterisk.org/view.php?id=14577 |
144 |
# |
145 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch || die "patch failed" |
146 |
|
147 |
# |
148 |
# do not ignore alarm-cleared event while V23 caller ID detection is in progress |
149 |
# otherwise automated British Telecom line test causes permanent red alarm |
150 |
# https://issues.asterisk.org/view.php?id=14163 |
151 |
# |
152 |
epatch "${FILESDIR}"/1.6.2/${PN}-1.6.2.0-bt-line-test.patch || die "patch failed" |
153 |
|
154 |
# |
155 |
# sprinkle some plus signs in strategic locations for maximum parallel make happiness |
156 |
# https://issues.asterisk.org/view.php?id=16489 |
157 |
# |
158 |
epatch "${FILESDIR}"/1.6.2/${P}-parallel-make.patch || die "patch failed" |
159 |
|
160 |
# |
161 |
# do not segfault when asked to restart gracefully |
162 |
# https://issues.asterisk.org/view.php?id=16062 |
163 |
# https://issues.asterisk.org/view.php?id=16470 |
164 |
# |
165 |
epatch "${FILESDIR}"/1.6.2/${P}-graceful-restart-segfault.patch |
166 |
|
167 |
# |
168 |
# add special playback with fax detection |
169 |
# Code by NewMan telecom, patch scavenged |
170 |
# by Cory Coager |
171 |
# http://bugs.gentoo.org/show_bug.cgi?id=298328 |
172 |
# |
173 |
epatch "${FILESDIR}"/1.6.2/${P}-nv-faxdetect.patch |
174 |
|
175 |
AT_M4DIR=autoconf eautoreconf |
176 |
|
177 |
# parse modules list |
178 |
if [[ -n "${ASTERISK_MODULES}" ]]; then |
179 |
local x modules="$(get_available_modules)" |
180 |
|
181 |
einfo "Custom list of modules specified, checking..." |
182 |
|
183 |
use debug && { |
184 |
einfo "Available modules: ${modules}" |
185 |
einfo " Selected modules: ${ASTERISK_MODULES}" |
186 |
} |
187 |
|
188 |
for x in ${ASTERISK_MODULES}; do |
189 |
if [[ "${x}" = "-*" ]]; then |
190 |
MODULES_LIST="" |
191 |
else |
192 |
if has ${x} ${modules} |
193 |
then |
194 |
MODULES_LIST="${MODULES_LIST} ${x}" |
195 |
else |
196 |
eerror "Unknown module: ${x}" |
197 |
fi |
198 |
fi |
199 |
done |
200 |
|
201 |
export MODULES_LIST |
202 |
fi |
203 |
} |
204 |
|
205 |
src_compile() { |
206 |
# |
207 |
# start with configure |
208 |
# |
209 |
econf \ |
210 |
--libdir="/usr/$(get_libdir)" \ |
211 |
--localstatedir="/var" \ |
212 |
--with-gsm=internal \ |
213 |
--with-popt \ |
214 |
--with-z \ |
215 |
$(use_with alsa asound) \ |
216 |
$(use_with caps cap) \ |
217 |
$(use_with curl) \ |
218 |
$(use_with dahdi pri) \ |
219 |
$(use_with dahdi tonezone) \ |
220 |
$(use_with dahdi) \ |
221 |
$(use_with freetds tds) \ |
222 |
$(use_with iconv) \ |
223 |
$(use_with jabber iksemel) \ |
224 |
$(use_with misdn isdnnet) \ |
225 |
$(use_with misdn suppserv) \ |
226 |
$(use_with misdn) \ |
227 |
$(use_with newt) \ |
228 |
$(use_with oss) \ |
229 |
$(use_with postgres) \ |
230 |
$(use_with radius) \ |
231 |
$(use_with snmp netsnmp) \ |
232 |
$(use_with span spandsp) \ |
233 |
$(use_with speex) \ |
234 |
$(use_with speex speexdsp) \ |
235 |
$(use_with sqlite sqlite3) \ |
236 |
$(use_with ssl crypto) \ |
237 |
$(use_with ssl) \ |
238 |
$(use_with vorbis ogg) \ |
239 |
$(use_with vorbis) || die "econf failed" |
240 |
|
241 |
# |
242 |
# custom module filter |
243 |
# run menuselect to evaluate the list of modules |
244 |
# and rewrite the list afterwards |
245 |
# |
246 |
if [[ -n "${MODULES_LIST}" ]] |
247 |
then |
248 |
local mod category tmp_list failed_list |
249 |
|
250 |
### |
251 |
# run menuselect |
252 |
|
253 |
emake menuselect.makeopts || die "emake menuselect.makeopts failed" |
254 |
|
255 |
### |
256 |
# get list of modules with failed dependencies |
257 |
|
258 |
failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)" |
259 |
|
260 |
### |
261 |
# traverse our list of modules |
262 |
|
263 |
for category in app cdr codec format func pbx res; do |
264 |
tmp_list="" |
265 |
|
266 |
# search list of modules for matching ones first... |
267 |
for mod in ${MODULES_LIST}; do |
268 |
# module is from current category? |
269 |
if [[ "${mod/%_*}" = "${category}" ]] |
270 |
then |
271 |
# check menuselect thinks the dependencies are met |
272 |
if has ${mod} ${failed_list} |
273 |
then |
274 |
eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!" |
275 |
else |
276 |
tmp_list="${tmp_list} ${mod}" |
277 |
fi |
278 |
fi |
279 |
done |
280 |
|
281 |
use debug && echo "${category} tmp: ${tmp_list}" |
282 |
|
283 |
# replace the module list for $category with our custom one |
284 |
if [[ -n "${tmp_list}" ]] |
285 |
then |
286 |
category="$(echo ${category} | tr '[:lower:]' '[:upper:]')" |
287 |
sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \ |
288 |
menuselect.makeopts || die "failed to set list of ${category} applications" |
289 |
fi |
290 |
done |
291 |
fi |
292 |
|
293 |
ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" |
294 |
} |
295 |
|
296 |
src_install() { |
297 |
# setup directory structure |
298 |
# |
299 |
mkdir -p "${D}"usr/lib/pkgconfig |
300 |
|
301 |
emake DESTDIR="${D}" install || die "emake install failed" |
302 |
emake DESTDIR="${D}" samples || die "emake samples failed" |
303 |
|
304 |
# remove installed sample files if nosamples flag is set |
305 |
if use nosamples; then |
306 |
einfo "Skipping installation of sample files..." |
307 |
rm -f "${D}"var/lib/asterisk/mohmp3/* |
308 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* |
309 |
rm -f "${D}"var/lib/asterisk/agi-bin/* |
310 |
else |
311 |
einfo "Sample files have been installed" |
312 |
fi |
313 |
rm -rf "${D}"var/spool/asterisk/voicemail/default |
314 |
|
315 |
einfo "Configuration samples have been moved to: "${ROOT}"/usr/share/doc/${PF}/conf" |
316 |
insinto /usr/share/doc/${PF}/conf |
317 |
doins "${D}"etc/asterisk/*.conf* |
318 |
|
319 |
cd "${D}" |
320 |
for conffile in etc/asterisk/*.* |
321 |
do |
322 |
fowners asterisk:asterisk $conffile |
323 |
fperms 0660 $conffile |
324 |
done |
325 |
cd "${S}" |
326 |
|
327 |
# keep directories |
328 |
diropts -m 0770 -o asterisk -g asterisk |
329 |
keepdir /etc/asterisk |
330 |
keepdir /var/lib/asterisk |
331 |
keepdir /var/run/asterisk |
332 |
keepdir /var/spool/asterisk |
333 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
334 |
diropts -m 0750 -o asterisk -g asterisk |
335 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
336 |
|
337 |
newinitd "${FILESDIR}"/1.6.1/asterisk.initd3 asterisk |
338 |
newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk |
339 |
|
340 |
# some people like to keep the sources around for custom patching |
341 |
# copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there |
342 |
if use keepsrc |
343 |
then |
344 |
dodir /usr/src |
345 |
|
346 |
ebegin "Copying sources into /usr/src" |
347 |
cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources" |
348 |
eend $? |
349 |
|
350 |
ebegin "Cleaning source tree" |
351 |
emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources" |
352 |
eend $? |
353 |
|
354 |
einfo "Clean sources are available in "${ROOT}"usr/src/${PF}" |
355 |
fi |
356 |
|
357 |
# install the upgrade documentation |
358 |
# |
359 |
dodoc README UPGRADE* BUGS CREDITS |
360 |
|
361 |
# install snmp mib files |
362 |
# |
363 |
if use snmp |
364 |
then |
365 |
insinto /usr/share/snmp/mibs/ |
366 |
doins doc/digium-mib.txt doc/asterisk-mib.txt |
367 |
fi |
368 |
} |
369 |
|
370 |
pkg_preinst() { |
371 |
enewgroup asterisk |
372 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
373 |
} |
374 |
|
375 |
pkg_postinst() { |
376 |
# |
377 |
# Announcements, warnings, reminders... |
378 |
# |
379 |
einfo "Asterisk has been installed" |
380 |
echo |
381 |
elog "If you want to know more about asterisk, visit these sites:" |
382 |
elog "http://www.asteriskdocs.org/" |
383 |
elog "http://www.voip-info.org/wiki-Asterisk" |
384 |
echo |
385 |
elog "http://www.automated.it/guidetoasterisk.htm" |
386 |
echo |
387 |
elog "Gentoo VoIP IRC Channel:" |
388 |
elog "#gentoo-voip @ irc.freenode.net" |
389 |
echo |
390 |
echo |
391 |
elog "1.6.1 -> 1.6.2 changes that you may care about:" |
392 |
elog "canreinvite -> directmedia (sip.conf)" |
393 |
elog "extensive T.38 (fax) changes" |
394 |
elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" |
395 |
elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" |
396 |
} |
397 |
|
398 |
pkg_config() { |
399 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
400 |
|
401 |
read tmp |
402 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
403 |
|
404 |
if [[ "$tmp" = "y" ]] ||\ |
405 |
[[ "$tmp" = "yes" ]] |
406 |
then |
407 |
einfo "Resetting permissions to defaults..." |
408 |
|
409 |
for x in spool run lib log; do |
410 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
411 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
412 |
done |
413 |
|
414 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
415 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
416 |
|
417 |
einfo "done" |
418 |
else |
419 |
einfo "skipping" |
420 |
fi |
421 |
} |