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