Gentoo Archives: gentoo-commits

From: "Tony Vroon (chainsaw)" <chainsaw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/asterisk: asterisk-1.4.37.ebuild ChangeLog
Date: Wed, 01 Dec 2010 17:54:37
Message-Id: 20101201175428.7546420057@flycatcher.gentoo.org
1 chainsaw 10/12/01 17:54:28
2
3 Modified: ChangeLog
4 Added: asterisk-1.4.37.ebuild
5 Log:
6 Add 1.4 branch ebuild & patchset by Kerin Millar, who will be proxy maintaining.
7
8 (Portage version: 2.1.9.25/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.275 net-misc/asterisk/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.275&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.275&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.274&r2=1.275
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v
20 retrieving revision 1.274
21 retrieving revision 1.275
22 diff -u -r1.274 -r1.275
23 --- ChangeLog 27 Oct 2010 22:57:59 -0000 1.274
24 +++ ChangeLog 1 Dec 2010 17:54:28 -0000 1.275
25 @@ -1,6 +1,18 @@
26 # ChangeLog for net-misc/asterisk
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.274 2010/10/27 22:57:59 chainsaw Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.275 2010/12/01 17:54:28 chainsaw Exp $
30 +
31 +*asterisk-1.4.37 (01 Dec 2010)
32 +
33 + 01 Dec 2010; <chainsaw@g.o> +files/1.4.0/asterisk-1.4.0-uclibc.patch,
34 + +files/1.4.0/asterisk-1.4.0-var_rundir.patch,
35 + +files/1.4.0/asterisk-1.4.33-inband-indications.patch,
36 + +files/1.4.0/asterisk-1.4.37-imap-libs.patch, +files/1.4.0/asterisk.confd,
37 + +files/1.4.0/asterisk.initd, +files/1.4.0/asterisk-1.4.33-gsm-pic.patch,
38 + +files/1.4.0/asterisk.logrotate, +asterisk-1.4.37.ebuild,
39 + +files/1.4.0/func_devstate-r6.c, +files/1.4.0/func_volume.c:
40 + Add 1.4 branch ebuild & patchset by Kerin Millar, who will be proxy
41 + maintaining.
42
43 27 Oct 2010; <chainsaw@g.o> asterisk-1.8.0.ebuild:
44 Apparently production releases can now depend on beta code. Notch up
45
46
47
48 1.1 net-misc/asterisk/asterisk-1.4.37.ebuild
49
50 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.4.37.ebuild?rev=1.1&view=markup
51 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.4.37.ebuild?rev=1.1&content-type=text/plain
52
53 Index: asterisk-1.4.37.ebuild
54 ===================================================================
55 # Copyright 1999-2010 Gentoo Foundation
56 # Distributed under the terms of the GNU General Public License v2
57 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.4.37.ebuild,v 1.1 2010/12/01 17:54:28 chainsaw Exp $
58
59 EAPI=3
60 inherit autotools base eutils flag-o-matic linux-info multilib
61
62 MY_P="${PN}-${PV/_/-}"
63
64 DESCRIPTION="Asterisk: A Modular Open Source PBX System"
65 HOMEPAGE="http://www.asterisk.org/"
66 SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
67 LICENSE="GPL-2"
68 SLOT="0"
69 KEYWORDS="~amd64"
70
71 IUSE="alsa +caps dahdi debug doc freetds imap jabber keepsrc misdn newt +samples odbc oss postgres radius snmp speex ssl sqlite static vanilla vorbis"
72
73 RDEPEND="sys-libs/ncurses
74 dev-libs/popt
75 sys-libs/zlib
76 alsa? ( media-libs/alsa-lib )
77 caps? ( sys-libs/libcap )
78 dahdi? ( >=net-libs/libpri-1.4.7
79 net-misc/dahdi-tools )
80 freetds? ( dev-db/freetds )
81 imap? ( >=net-libs/c-client-2007[ssl=] )
82 jabber? ( dev-libs/iksemel )
83 misdn? ( net-dialup/misdnuser )
84 newt? ( dev-libs/newt )
85 odbc? ( dev-db/unixODBC )
86 postgres? ( dev-db/postgresql-base )
87 radius? ( net-dialup/radiusclient-ng )
88 snmp? ( net-analyzer/net-snmp )
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.4
96 !>=net-misc/asterisk-addons-1.6
97 !net-misc/zaptel"
98
99 PDEPEND="net-misc/asterisk-core-sounds
100 net-misc/asterisk-extra-sounds
101 net-misc/asterisk-moh-opsound"
102
103 S="${WORKDIR}/${MY_P}"
104
105 PATCHES=(
106 "${FILESDIR}/1.4.0/${PN}-1.4.0-var_rundir.patch"
107 "${FILESDIR}/1.4.0/${PN}-1.4.33-gsm-pic.patch"
108 "${FILESDIR}/1.4.0/${PN}-1.4.0-uclibc.patch"
109 "${FILESDIR}/1.4.0/${PN}-1.4.33-inband-indications.patch"
110 "${FILESDIR}/1.4.0/${P}-imap-libs.patch"
111 )
112
113 pkg_setup() {
114 CONFIG_CHECK="~!NF_CONNTRACK_SIP"
115 local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
116 have reported that this module dropped critical SIP packets in their deployments. You
117 may want to disable it if you see such problems."
118 check_extra_config
119 }
120
121 src_prepare() {
122 base_src_prepare
123 AT_M4DIR=autoconf eautoreconf
124
125 # add custom device state function (func_devstate)
126 #
127 # http://asterisk.org/node/48360
128 # http://svncommunity.digium.com/svn/russell/func_devstate-1.4/README.txt
129 #
130 cp "${FILESDIR}"/1.4.0/func_devstate-r6.c "${S}"/funcs/func_devstate.c
131
132 # Add technology-independent volume control function
133 #
134 cp "${FILESDIR}"/1.4.0/func_volume.c "${S}"/funcs/func_volume.c
135
136 # Custom menuselect options are defined in this file (it may remain empty)
137 #
138 >"${S}"/gentoo.makeopts
139
140 # Enable various debugging options if requested
141 #
142 if use debug; then
143 local debug_opts="DEBUG_CHANNEL_LOCKS DEBUG_THREADS DEBUG_FD_LEAKS"
144 einfo "Enabling debugging options: ${debug_opts}"
145 echo "MENUSELECT_CFLAGS=${debug_opts}" >> "${S}"/gentoo.makeopts
146 fi
147
148 # Enable IMAP storage in app_voicemail if requested
149 #
150 use imap && echo "MENUSELECT_OPTS_app_voicemail=IMAP_STORAGE" >> "${S}"/gentoo.makeopts
151 }
152
153 src_configure() {
154 if use debug; then
155 # Tone down the compiler flags somewhat. This should be less aggressive
156 # than the DONT_OPTIMIZE option whilst still producing useful results.
157 #
158 strip-flags
159 replace-flags -O? -O0
160 fi
161
162 if use imap; then
163 local imap_libs
164 has_version net-libs/c-client[pam] && imap_libs="-lpam"
165 has_version net-libs/c-client[ssl] && imap_libs="${imap_libs} -lssl"
166 export IMAP_LIBS="${imap_libs}"
167 fi
168
169 econf \
170 --libdir="/usr/$(get_libdir)" \
171 --localstatedir="/var" \
172 --with-gsm=internal \
173 --with-ncurses \
174 --with-popt \
175 --with-z \
176 --without-curses \
177 --without-h323 \
178 --without-nbs \
179 --without-osptk \
180 --without-pwlib \
181 --without-kde \
182 --without-usb \
183 --without-vpb \
184 --without-zaptel \
185 $(use_with alsa asound) \
186 $(use_with caps cap) \
187 $(use_with dahdi pri) \
188 $(use_with dahdi tonezone) \
189 $(use_with dahdi) \
190 $(use_with freetds tds) \
191 $(use_with imap imap system) \
192 $(use_with jabber iksemel) \
193 $(use_with misdn isdnnet) \
194 $(use_with misdn suppserv) \
195 $(use_with misdn) \
196 $(use_with newt) \
197 $(use_with odbc) \
198 $(use_with oss) \
199 $(use_with postgres) \
200 $(use_with radius) \
201 $(use_with snmp netsnmp) \
202 $(use_with speex) \
203 $(use_with speex speexdsp) \
204 $(use_with sqlite) \
205 $(use_with ssl) \
206 $(use_with vorbis ogg) \
207 $(use_with vorbis) || die "econf failed"
208
209 #
210 # blank out sounds/sounds.xml file to prevent
211 # asterisk from installing sounds files (we pull them in via
212 # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
213 #
214 >"${S}"/sounds/sounds.xml
215 }
216
217 src_compile() {
218 ASTLDFLAGS="${LDFLAGS}" emake USER_MAKEOPTS="${S}"/gentoo.makeopts || die "emake failed"
219 }
220
221 src_install() {
222 # setup directory structure
223 #
224 mkdir -p "${D}"usr/$(get_libdir)/pkgconfig
225
226 emake DESTDIR="${D}" install || die "emake install failed"
227
228 if use samples; then
229 emake DESTDIR="${D}" samples || die "emake samples failed"
230 for conffile in "${D}"etc/asterisk/*.*
231 do
232 chown asterisk:asterisk $conffile
233 chmod 0660 $conffile
234 done
235 einfo "Sample files have been installed"
236 else
237 einfo "Skipping installation of sample files..."
238 rm -f "${D}"var/lib/asterisk/mohmp3/*
239 rm -f "${D}"var/lib/asterisk/sounds/demo-*
240 rm -f "${D}"var/lib/asterisk/agi-bin/*
241 rm -f "${D}"etc/asterisk/*
242 fi
243 rm -rf "${D}"var/spool/asterisk/voicemail/default
244
245 # keep directories
246 diropts -m 0770 -o asterisk -g asterisk
247 keepdir /etc/asterisk
248 keepdir /var/lib/asterisk
249 keepdir /var/run/asterisk
250 keepdir /var/spool/asterisk
251 keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
252 diropts -m 0750 -o asterisk -g asterisk
253 keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
254
255 newinitd "${FILESDIR}"/1.4.0/asterisk.initd asterisk
256 newconfd "${FILESDIR}"/1.4.0/asterisk.confd asterisk
257
258 # some people like to keep the sources around for custom patching
259 # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there
260 if use keepsrc
261 then
262 dodir /usr/src
263
264 ebegin "Copying sources into /usr/src"
265 cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources"
266 eend $?
267
268 ebegin "Cleaning source tree"
269 emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources"
270 eend $?
271
272 einfo "Clean sources are available in "${ROOT}"usr/src/${PF}"
273 fi
274
275 # install the upgrade documentation
276 #
277 dodoc README UPGRADE* BUGS CREDITS
278
279 # install extra documentation
280 #
281 if use doc
282 then
283 dodoc doc/*.txt
284 dodoc doc/*.pdf
285 dodoc doc/PEERING
286 dodoc doc/CODING-GUIDELINES
287 dodoc doc/tex/*.pdf
288 fi
289
290 # install snmp mib files
291 #
292 if use snmp
293 then
294 insinto /usr/share/snmp/mibs/
295 doins doc/digium-mib.txt doc/asterisk-mib.txt
296 fi
297
298 # install SIP scripts; bug #300832
299 #
300 dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
301 dodoc "${FILESDIR}/1.6.2/find_call_sip_trace.sh"
302 dodoc "${FILESDIR}/1.6.2/find_call_ids.sh"
303 dodoc "${FILESDIR}/1.6.2/call_data.txt"
304
305 insinto /etc/logrotate.d
306 newins "${FILESDIR}/1.4.0/asterisk.logrotate" asterisk
307 }
308
309 pkg_preinst() {
310 enewgroup asterisk
311 enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
312 }
313
314 pkg_postinst() {
315 #
316 # Announcements, warnings, reminders...
317 #
318 einfo "Asterisk has been installed"
319 echo
320 elog "If you want to know more about asterisk, visit these sites:"
321 elog "http://www.asteriskdocs.org/"
322 elog "http://www.voip-info.org/wiki-Asterisk"
323 echo
324 elog "http://www.automated.it/guidetoasterisk.htm"
325 echo
326 elog "Gentoo VoIP IRC Channel:"
327 elog "#gentoo-voip @ irc.freenode.net"
328 echo
329 echo
330 if has_version "=net-misc/asterisk-1.2*"; then
331 ewarn "Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 before continuing"
332 fi
333 }
334
335 pkg_config() {
336 einfo "Do you want to reset file permissions and ownerships (y/N)?"
337
338 read tmp
339 tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
340
341 if [[ "$tmp" = "y" ]] ||\
342 [[ "$tmp" = "yes" ]]
343 then
344 einfo "Resetting permissions to defaults..."
345
346 for x in spool run lib log; do
347 chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
348 chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
349 done
350
351 chown -R root:asterisk "${ROOT}"etc/asterisk
352 chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
353
354 einfo "done"
355 else
356 einfo "skipping"
357 fi
358 }