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