1 |
commit: 44bf94f748876e5ec5b13ea56b788627c2b5a767 |
2 |
Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za> |
3 |
AuthorDate: Wed Jun 30 19:35:30 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 12 10:38:47 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44bf94f7 |
7 |
|
8 |
net-misc/asterisk: Version 16.19.0 |
9 |
|
10 |
This was based off of previously deleted 16.16.2-r1 which contained a |
11 |
bunch of improvements that subsequently got lost in 16.17 and 16.18 |
12 |
versions. |
13 |
|
14 |
Bug: https://bugs.gentoo.org/783762 |
15 |
Closes: https://bugs.gentoo.org/796317 |
16 |
Package-Manager: Portage-3.0.20, Repoman-3.0.2 |
17 |
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za> |
18 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
19 |
|
20 |
net-misc/asterisk/Manifest | 1 + |
21 |
net-misc/asterisk/asterisk-16.19.0.ebuild | 362 ++++++++++++++++++++++++++++++ |
22 |
2 files changed, 363 insertions(+) |
23 |
|
24 |
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest |
25 |
index f3ee5c594fe..7e31f701c9e 100644 |
26 |
--- a/net-misc/asterisk/Manifest |
27 |
+++ b/net-misc/asterisk/Manifest |
28 |
@@ -1,3 +1,4 @@ |
29 |
DIST asterisk-13.38.2.tar.gz 33708267 BLAKE2B f8c188f6500a01e807982518486972c18f8f903285910e64b4d8e2a4f553d42534f910696a02ab13e371dbd83dfd932c5cb7a6cea08817862ecaddcc7afd99d2 SHA512 bd9755503048cd8dcf8e39947dd5cfb617c20c4b1ad5033ae297499a4967c06ba11b6e43233c1ae0d33f8f11a81dbb9b4487f16a1f4786007172028caf1ee051 |
30 |
DIST asterisk-16.18.0.tar.gz 27843069 BLAKE2B 643c371b4747111e233c0758efb529e7f54f1deeff10e65fb05f3a1a58c4ba5c139bdb583d2a2552e29aacac5d0f3980fd9aeb19fda2513843fbe0c849dec217 SHA512 025a30a1eed1d2cd14eb1345e1e0edfcc23b4c517e0d33da7d06d97b3ffa3c9ce9c2fe9449109eefade6d62b6205b598fecb69245adb04f03bd53f8482fbd7ad |
31 |
+DIST asterisk-16.19.0.tar.gz 27872364 BLAKE2B 3510f300c2cd0d67232e5d36752f60a2e67dde988de1ca41b5709dc29aa462f268b49b6c48cf669a7b5fdc0aec038dbfb1d56f7ebe6e9a7285d2cee34b3fc789 SHA512 e50b7c42591ff7fedba3e591a4e696ace62731d81b4d054757a91d8997ee454e949c56a4cf19e37c160407b23ec8c654c1b8af18712d09078e6149b5b22c5040 |
32 |
DIST asterisk-18.4.0.tar.gz 27926601 BLAKE2B 1a4089ee274732462a8e480d449e4043f7393a6df0b78dd3ea341d3996b9e433066e6d7c53b3ab334db5946a4b847ac02abb4afc5747b6f541cad81a6d58d468 SHA512 024d0a5c75d55fe614ba6219aece62778e9522a0f8365d57192aa5aa22be94d45a3bed69ac14659738e97dd98967533c13096a855366083e6df2b7800e684602 |
33 |
|
34 |
diff --git a/net-misc/asterisk/asterisk-16.19.0.ebuild b/net-misc/asterisk/asterisk-16.19.0.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..03dc24c160d |
37 |
--- /dev/null |
38 |
+++ b/net-misc/asterisk/asterisk-16.19.0.ebuild |
39 |
@@ -0,0 +1,362 @@ |
40 |
+# Copyright 1999-2021 Gentoo Authors |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI=7 |
44 |
+ |
45 |
+LUA_COMPAT=( lua5-{1..4} ) |
46 |
+ |
47 |
+inherit autotools linux-info lua-single systemd toolchain-funcs tmpfiles |
48 |
+ |
49 |
+DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
50 |
+HOMEPAGE="https://www.asterisk.org/" |
51 |
+SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${P}.tar.gz" |
52 |
+LICENSE="GPL-2" |
53 |
+SLOT="0/${PV%%.*}" |
54 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
55 |
+ |
56 |
+IUSE_VOICEMAIL_STORAGE=( |
57 |
+ +voicemail_storage_file |
58 |
+ voicemail_storage_odbc |
59 |
+ voicemail_storage_imap |
60 |
+) |
61 |
+IUSE="${IUSE_VOICEMAIL_STORAGE[*]} alsa blocks bluetooth calendar +caps cluster codec2 curl dahdi debug deprecated doc freetds gtalk http iconv ilbc ldap lua mysql newt odbc oss pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd syslog systemd unbound vorbis xmpp" |
62 |
+IUSE_EXPAND="VOICEMAIL_STORAGE" |
63 |
+REQUIRED_USE="gtalk? ( xmpp ) |
64 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
65 |
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE[*]//+/} ) |
66 |
+ voicemail_storage_odbc? ( odbc ) |
67 |
+" |
68 |
+ |
69 |
+PATCHES=( |
70 |
+ "${FILESDIR}/${PN}-16.16.2-no-var-run-install.patch" |
71 |
+) |
72 |
+ |
73 |
+DEPEND="acct-user/asterisk |
74 |
+ acct-group/asterisk |
75 |
+ dev-db/sqlite:3 |
76 |
+ dev-libs/popt |
77 |
+ >=dev-libs/jansson-2.11 |
78 |
+ dev-libs/libedit |
79 |
+ dev-libs/libxml2:2 |
80 |
+ dev-libs/libxslt |
81 |
+ sys-apps/util-linux |
82 |
+ sys-libs/zlib |
83 |
+ alsa? ( media-libs/alsa-lib ) |
84 |
+ bluetooth? ( net-wireless/bluez:= ) |
85 |
+ calendar? ( |
86 |
+ net-libs/neon:= |
87 |
+ dev-libs/libical:= |
88 |
+ dev-libs/iksemel |
89 |
+ ) |
90 |
+ caps? ( sys-libs/libcap ) |
91 |
+ blocks? ( sys-libs/blocksruntime ) |
92 |
+ cluster? ( sys-cluster/corosync ) |
93 |
+ codec2? ( media-libs/codec2:= ) |
94 |
+ curl? ( net-misc/curl ) |
95 |
+ dahdi? ( |
96 |
+ net-libs/libpri |
97 |
+ net-misc/dahdi-tools |
98 |
+ ) |
99 |
+ freetds? ( dev-db/freetds ) |
100 |
+ gtalk? ( dev-libs/iksemel ) |
101 |
+ http? ( dev-libs/gmime:2.6 ) |
102 |
+ iconv? ( virtual/libiconv ) |
103 |
+ ilbc? ( media-libs/libilbc ) |
104 |
+ ldap? ( net-nds/openldap ) |
105 |
+ lua? ( ${LUA_DEPS} ) |
106 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
107 |
+ newt? ( dev-libs/newt ) |
108 |
+ odbc? ( dev-db/unixODBC ) |
109 |
+ pjproject? ( >=net-libs/pjproject-2.9:= ) |
110 |
+ portaudio? ( media-libs/portaudio ) |
111 |
+ postgres? ( dev-db/postgresql:* ) |
112 |
+ radius? ( net-dialup/freeradius-client ) |
113 |
+ snmp? ( net-analyzer/net-snmp:= ) |
114 |
+ span? ( media-libs/spandsp ) |
115 |
+ speex? ( |
116 |
+ media-libs/libogg |
117 |
+ media-libs/speex |
118 |
+ media-libs/speexdsp |
119 |
+ ) |
120 |
+ srtp? ( net-libs/libsrtp:0 ) |
121 |
+ ssl? ( |
122 |
+ dev-libs/openssl:0= |
123 |
+ ) |
124 |
+ systemd? ( sys-apps/systemd ) |
125 |
+ !systemd? ( !sys-apps/systemd ) |
126 |
+ unbound? ( net-dns/unbound ) |
127 |
+ vorbis? ( |
128 |
+ media-libs/libogg |
129 |
+ media-libs/libvorbis |
130 |
+ ) |
131 |
+ voicemail_storage_imap? ( virtual/imap-c-client ) |
132 |
+ xmpp? ( dev-libs/iksemel ) |
133 |
+" |
134 |
+ |
135 |
+RDEPEND="${DEPEND} |
136 |
+ net-misc/asterisk-core-sounds |
137 |
+ net-misc/asterisk-extra-sounds |
138 |
+ net-misc/asterisk-moh-opsound |
139 |
+ selinux? ( sec-policy/selinux-asterisk ) |
140 |
+ syslog? ( virtual/logger )" |
141 |
+ |
142 |
+BDEPEND="dev-libs/libxml2:2 |
143 |
+ virtual/pkgconfig" |
144 |
+ |
145 |
+QA_DT_NEEDED="/usr/lib.*/libasteriskssl[.]so[.][0-9]\+" |
146 |
+ |
147 |
+_make_args=( |
148 |
+ "NOISY_BUILD=yes" |
149 |
+ "ASTDBDIR=\$(ASTDATADIR)/astdb" |
150 |
+ "ASTCACHEDIR=/var/cache/asterisk" |
151 |
+ "OPTIMIZE=" |
152 |
+ "DEBUG=" |
153 |
+ "DESTDIR=${D}" |
154 |
+ "CONFIG_SRC=configs/samples" |
155 |
+ "CONFIG_EXTEN=.sample" |
156 |
+) |
157 |
+ |
158 |
+pkg_pretend() { |
159 |
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
160 |
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
161 |
+ have reported that this module dropped critical SIP packets in their deployments. You |
162 |
+ may want to disable it if you see such problems." |
163 |
+ check_extra_config |
164 |
+ |
165 |
+ [[ "${MERGE_TYPE}" == binary ]] && return |
166 |
+ |
167 |
+ if tc-is-clang; then |
168 |
+ use blocks || die "CC=clang requires USE=blocks" |
169 |
+ else |
170 |
+ use blocks && die "USE=blocks can only be used with CC=clang" |
171 |
+ fi |
172 |
+} |
173 |
+ |
174 |
+pkg_setup() { |
175 |
+ use lua && lua-single_pkg_setup |
176 |
+} |
177 |
+ |
178 |
+src_prepare() { |
179 |
+ default |
180 |
+ AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" eautoreconf |
181 |
+} |
182 |
+ |
183 |
+src_configure() { |
184 |
+ local vmst |
185 |
+ local copt cstate |
186 |
+ |
187 |
+ econf \ |
188 |
+ LUA_VERSION="${ELUA#lua}" \ |
189 |
+ --libdir="/usr/$(get_libdir)" \ |
190 |
+ --localstatedir="/var" \ |
191 |
+ --with-crypto \ |
192 |
+ --with-gsm=internal \ |
193 |
+ --with-popt \ |
194 |
+ --with-z \ |
195 |
+ --with-libedit \ |
196 |
+ --without-jansson-bundled \ |
197 |
+ --without-pjproject-bundled \ |
198 |
+ $(use_with caps cap) \ |
199 |
+ $(use_with codec2) \ |
200 |
+ $(use_with lua lua) \ |
201 |
+ $(use_with http gmime) \ |
202 |
+ $(use_with newt) \ |
203 |
+ $(use_with pjproject) \ |
204 |
+ $(use_with portaudio) \ |
205 |
+ $(use_with ssl) \ |
206 |
+ $(use_with unbound) |
207 |
+ |
208 |
+ _menuselect() { |
209 |
+ menuselect/menuselect "$@" || die "menuselect $* failed." |
210 |
+ } |
211 |
+ |
212 |
+ _use_select() { |
213 |
+ local state=$(use "$1" && echo enable || echo disable) |
214 |
+ shift # remove use from parameters |
215 |
+ |
216 |
+ while [[ -n $1 ]]; do |
217 |
+ _menuselect --${state} "$1" menuselect.makeopts |
218 |
+ shift |
219 |
+ done |
220 |
+ } |
221 |
+ |
222 |
+ # Blank out sounds/sounds.xml file to prevent |
223 |
+ # asterisk from installing sounds files (we pull them in via |
224 |
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
225 |
+ >"${S}"/sounds/sounds.xml |
226 |
+ |
227 |
+ # That NATIVE_ARCH chatter really is quite bothersome |
228 |
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system" |
229 |
+ |
230 |
+ # Compile menuselect binary for optional components |
231 |
+ emake "${_make_args[@]}" menuselect.makeopts |
232 |
+ |
233 |
+ # Disable BUILD_NATIVE (bug #667498) |
234 |
+ _menuselect --disable build_native menuselect.makeopts |
235 |
+ |
236 |
+ # Broken functionality is forcibly disabled (bug #360143) |
237 |
+ _menuselect --disable chan_misdn menuselect.makeopts |
238 |
+ _menuselect --disable chan_ooh323 menuselect.makeopts |
239 |
+ |
240 |
+ # Utility set is forcibly enabled (bug #358001) |
241 |
+ _menuselect --enable smsq menuselect.makeopts |
242 |
+ _menuselect --enable streamplayer menuselect.makeopts |
243 |
+ _menuselect --enable aelparse menuselect.makeopts |
244 |
+ _menuselect --enable astman menuselect.makeopts |
245 |
+ |
246 |
+ # this is connected, otherwise it would not find |
247 |
+ # ast_pktccops_gate_alloc symbol |
248 |
+ _menuselect --enable chan_mgcp menuselect.makeopts |
249 |
+ _menuselect --enable res_pktccops menuselect.makeopts |
250 |
+ |
251 |
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
252 |
+ _menuselect --enable pbx_dundi menuselect.makeopts |
253 |
+ _menuselect --enable func_aes menuselect.makeopts |
254 |
+ _menuselect --enable chan_iax2 menuselect.makeopts |
255 |
+ |
256 |
+ # SQlite3 is now the main database backend, enable related features |
257 |
+ _menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
258 |
+ _menuselect --enable cel_sqlite3_custom menuselect.makeopts |
259 |
+ |
260 |
+ # The others are based on USE-flag settings |
261 |
+ _use_select alsa chan_alsa |
262 |
+ _use_select bluetooth chan_mobile |
263 |
+ _use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
264 |
+ _use_select cluster res_corosync |
265 |
+ _use_select codec2 codec_codec2 |
266 |
+ _use_select curl func_curl res_config_curl res_curl |
267 |
+ _use_select dahdi app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi |
268 |
+ _use_select deprecated app_macro |
269 |
+ _use_select freetds {cdr,cel}_tds |
270 |
+ _use_select gtalk chan_motif |
271 |
+ _use_select http res_http_post |
272 |
+ _use_select iconv func_iconv |
273 |
+ _use_select ilbc codec_ilbc format_ilbc |
274 |
+ _use_select ldap res_config_ldap |
275 |
+ _use_select lua pbx_lua |
276 |
+ _use_select mysql app_mysql cdr_mysql res_config_mysql |
277 |
+ _use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
278 |
+ _use_select oss chan_oss |
279 |
+ _use_select postgres {cdr,cel}_pgsql res_config_pgsql |
280 |
+ _use_select radius {cdr,cel}_radius |
281 |
+ _use_select snmp res_snmp |
282 |
+ _use_select span res_fax_spandsp |
283 |
+ _use_select speex {codec,func}_speex |
284 |
+ _use_select speex format_ogg_speex |
285 |
+ _use_select srtp res_srtp |
286 |
+ _use_select statsd res_statsd res_{endpoint,chan}_stats |
287 |
+ _use_select syslog cdr_syslog |
288 |
+ _use_select vorbis format_ogg_vorbis |
289 |
+ _use_select xmpp res_xmpp |
290 |
+ |
291 |
+ # Voicemail storage ... |
292 |
+ for vmst in "${IUSE_VOICEMAIL_STORAGE[@]}"; do |
293 |
+ if use "${vmst#+}"; then |
294 |
+ _menuselect --enable "$(echo "${vmst##*_}" | tr '[:lower:]' '[:upper:]')_STORAGE" menuselect.makeopts |
295 |
+ fi |
296 |
+ done |
297 |
+ |
298 |
+ if use debug; then |
299 |
+ for o in DONT_OPTIMIZE DEBUG_FD_LEAKS MALLOC_DEBUG BETTER_BACKTRACES; do |
300 |
+ _menuselect --enable "${o}" menuselect.makeopts |
301 |
+ done |
302 |
+ fi |
303 |
+ |
304 |
+ if [[ -n "${GENTOO_ASTERISK_CUSTOM_MENUSELECT:+yes}" ]]; then |
305 |
+ for copt in ${GENTOO_ASTERISK_CUSTOM_MENUSELECT}; do |
306 |
+ cstate=--enable |
307 |
+ [[ "${copt}" == -* ]] && cstate=--disable |
308 |
+ ebegin "Custom option ${copt#[-+]} ${cstate:2}d" |
309 |
+ _menuselect ${cstate} "${copt#[-+]}" |
310 |
+ eend $? |
311 |
+ done |
312 |
+ fi |
313 |
+} |
314 |
+ |
315 |
+src_compile() { |
316 |
+ emake "${_make_args[@]}" |
317 |
+} |
318 |
+ |
319 |
+src_install() { |
320 |
+ local d |
321 |
+ |
322 |
+ dodir "/usr/$(get_libdir)/pkgconfig" |
323 |
+ |
324 |
+ diropts -m 0750 -o root -g asterisk |
325 |
+ dodir /etc/asterisk |
326 |
+ |
327 |
+ emake "${_make_args[@]}" install install-configs |
328 |
+ |
329 |
+ fowners asterisk: /var/lib/asterisk/astdb |
330 |
+ |
331 |
+ if use radius; then |
332 |
+ insinto /etc/radiusclient/ |
333 |
+ doins contrib/dictionary.digium |
334 |
+ fi |
335 |
+ |
336 |
+ # keep directories |
337 |
+ diropts -m 0750 -o asterisk -g root |
338 |
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail,recording,outgoing} |
339 |
+ diropts -m 0750 -o asterisk -g asterisk |
340 |
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
341 |
+ |
342 |
+ newinitd "${FILESDIR}"/initd-16.16.2-r1 asterisk |
343 |
+ newconfd "${FILESDIR}"/confd-16.16.2-r1 asterisk |
344 |
+ |
345 |
+ systemd_dounit "${FILESDIR}"/asterisk.service |
346 |
+ newtmpfiles "${FILESDIR}"/asterisk.tmpfiles3.conf asterisk.conf |
347 |
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf |
348 |
+ |
349 |
+ # Reset diropts else dodoc uses it for doc installations. |
350 |
+ diropts -m0755 |
351 |
+ |
352 |
+ # install the upgrade documentation |
353 |
+ dodoc UPGRADE* BUGS CREDITS |
354 |
+ |
355 |
+ # install extra documentation |
356 |
+ use doc && dodoc doc/*.{txt,pdf} |
357 |
+ |
358 |
+ # install logrotate snippet; bug #329281 |
359 |
+ # |
360 |
+ insinto /etc/logrotate.d |
361 |
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk |
362 |
+ |
363 |
+ # Asterisk installs a few folders that's empty by design, |
364 |
+ # but still required. This finds them, and marks them for |
365 |
+ # portage. |
366 |
+ while read d <&3; do |
367 |
+ keepdir "${d#${ED}}" |
368 |
+ done 3< <(find "${ED}"/var -type d -empty || die "Find failed.") |
369 |
+} |
370 |
+ |
371 |
+pkg_postinst() { |
372 |
+ if [ -z "${REPLACING_VERSIONS}" ]; then |
373 |
+ elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/" |
374 |
+ elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat" |
375 |
+ elif [ "$(ver_cut 1 "${REPLACING_VERSIONS}")" != "$(ver_cut 1)" ]; then |
376 |
+ elog "You are updating from Asterisk $(ver_cut 1 "${REPLACING_VERSIONS}") upgrade document:" |
377 |
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+$(ver_cut 1)" |
378 |
+ elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat" |
379 |
+ fi |
380 |
+ |
381 |
+ if use deprecated; then |
382 |
+ ewarn "You really aught to port whatever code you have that depends on this since these are going to go away." |
383 |
+ ewarn "Refer: https://wiki.asterisk.org/wiki/display/AST/Module+Deprecation" |
384 |
+ fi |
385 |
+ |
386 |
+ if [[ -n "${GENTOO_ASTERISK_CUSTOM_MENUSELECT:+yes}" ]]; then |
387 |
+ ewarn "You are using GENTOO_ASTERISK_CUSTOM_MENUSELECT, this should only be used" |
388 |
+ ewarn "for debugging, for anything else, please file a bug on https://bugs.gentoo.org" |
389 |
+ fi |
390 |
+ |
391 |
+ if [[ -f /var/lib/asterisk/astdb.sqlite3 ]]; then |
392 |
+ ewarn "Default astdb location has changed from /var/lib/asterisk to /var/lib/asterisk/astdb" |
393 |
+ ewarn "You still have a /var/lib/asterisk/astdb.sqlite file. You need to either set" |
394 |
+ ewarn "astdbdir in /etc/asterisk/asterisk.conf to /var/lib/asterisk or follow these" |
395 |
+ ewarn "steps to migrate:" |
396 |
+ ewarn "1. /etc/init.d/asterisk stop" |
397 |
+ ewarn "2. mv /var/lib/asterisk/astdb.sqlite /var/lib/asterisk/astdb/" |
398 |
+ ewarn "3. /etc/init.d/asterisk start" |
399 |
+ ewarn "This update was done partly for security reasons so that /var/lib/asterisk can be root owned." |
400 |
+ fi |
401 |
+} |