1 |
commit: 674881ea7f21d81e1f98e1a930834adee849671b |
2 |
Author: Tony Vroon <chainsaw <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 4 10:35:38 2016 +0000 |
4 |
Commit: Tony Vroon <chainsaw <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 4 10:35:38 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=674881ea |
7 |
|
8 |
net-misc/asterisk: Bugfix releases on both 11 & 13 branches. EAPI=6 bump with removal of deprecated base eclass. |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
net-misc/asterisk/Manifest | 4 + |
13 |
net-misc/asterisk/asterisk-11.22.0.ebuild | 325 +++++++++++++++++++++++++++++ |
14 |
net-misc/asterisk/asterisk-13.8.2.ebuild | 326 ++++++++++++++++++++++++++++++ |
15 |
3 files changed, 655 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest |
18 |
index 670b585..9295979 100644 |
19 |
--- a/net-misc/asterisk/Manifest |
20 |
+++ b/net-misc/asterisk/Manifest |
21 |
@@ -1,5 +1,9 @@ |
22 |
DIST asterisk-11.21.1.tar.gz 34867941 SHA256 d02afbdda172a6bb98883350d64f83ce865fcea01642a05067ca2c916c3a1ee5 SHA512 d52a14ebae872d62cbfa676bfd86b28790d8e9cfad97585e9255cf9e8ca1957dae509d41ac46cd5280478d38707bc9628bafb31551ab8345e7064aabdbd5dea3 WHIRLPOOL 396eda8b1bc8b8a1465c90456c76f83c4946fd696ec647596bfdd2e74b32a1c6a15e9f4423d54da7ecda949f5ab472df3f08c30a99ebb099204d82cd8440d515 |
23 |
DIST asterisk-11.21.2.tar.gz 34867025 SHA256 9f4408ecda81efccbc0ce6728a7c53fa1528c527ea65d81a165e830c9f91bcac SHA512 9147a35bee22550a06cb05c553d9b9c8dc48e8a1f41f48473b098128ff1d2a09d1c05ad71d30a60f542813fa02ddc91b7f56980879670460e3e427bc0a14d4d1 WHIRLPOOL 9e57a68338e25879e30b625baab2581bf9c9fe944d87be7ea44d78288dca313cbe4ac22be4e2650815a0c009866dbfb831ba7b70b9fd847d58356fecf50f074a |
24 |
+DIST asterisk-11.22.0.tar.gz 35101090 SHA256 590c361f8926e08eeaf320a35985cd39a2ea651ec3e94fb62484a7179c32f527 SHA512 98085053fc8d2aaf1c3305ef1900287bc1ee9d1e421a073cb0e1b56d379fd7803fdbfaab16143be24bdd41a7b28305dce7b91763564e750697ac2b2d9e8ad719 WHIRLPOOL f531ae8be5db9071c1809149523883cf0b7e65d2e8cecbc70d585d1881cd36a206de8cbc0edd2c4805d326427bb67a87cf2e079bed464fcc0cce376cb1098d59 |
25 |
DIST asterisk-13.7.2.tar.gz 32176731 SHA256 8a22856f0cff22b6f1d901eb0a91d459cd73f3ab1f71e9738b947428947fb232 SHA512 5a0cd2c83e8f3191105fc20f54eb7fbf2fcb015af1fcfd980221aa205fdaf288835c4b76093f15e2abff2b1672f46a383efc2a89b5ae8afdc92353d7fd91d693 WHIRLPOOL 35af8a264f9f1381e1510b23401e02a336c1c555a42ef4c243bd9987c550f9df4e42f880efce219ca64b02eeeb6f1d667a9d10af7b5e4c5a798c8ea4f0319b0b |
26 |
+DIST asterisk-13.8.2.tar.gz 32488570 SHA256 79d097bf1a2c3fb8613b9db2504856742797acd5682fab845632972a9ab66e33 SHA512 20737656b0e30e9d11bf5cf37ceb4891a1d36fb4d552e3e2c13f425b2e938f3b31cf571e5aa5b0028cbb9f9188a4ca21d625a3c1cccf115ea02001df5b9691ad WHIRLPOOL b053c3c8fb1560e930ea7a24af59f9cac183bd513dd78da0aa6474c32240cfdfc5dfdaee156f4046f4411a111fa00cef826c5df2fa2721cb09a6122226c87e6b |
27 |
DIST gentoo-asterisk-patchset-3.16.tar.bz2 5018 SHA256 9c393aba3272b19ae7c7d79302c288ddb6d6b0368c72fbbeda11569ab751be6d SHA512 83d0be42f935068afd130ecf6768355d6f9702238c829e1482135d320f99e6a2ad9dd39814ea139e8a8e9009ecb99a6b3d5ed5f2cc778353d03a09183d7a06a0 WHIRLPOOL cc6a032aaa781a4eb29f913578bd10245775d9915f5a934f7c2982f44cf063cf3030b764e628b6e17f4f023558fb50e73116a19c77738ae5e8de85c0c672dfd9 |
28 |
+DIST gentoo-asterisk-patchset-3.17.tar.bz2 5074 SHA256 2af864f0b40b42c55f3c3ac737856942c9393adddd47ebf6d982d9214b85a2ad SHA512 37f86f3c699b2643afd8080391e817a282571694bb56e00efd0734918dbc33d6c12a2463dbc24667597420863b4f506870140fbb8ef3f1700124ef790ae7252d WHIRLPOOL 79017eeb3737953515286db6386bfd848f7501b6f2abbc1ba6b6865a75495ce999d555e3112336abae23371a21a2d64a10f1d173e285314bb5bab22bfe2d4c1a |
29 |
DIST gentoo-asterisk-patchset-4.02.tar.bz2 5945 SHA256 91797fe6d2e543180b80ec02d4b00bd3bcb95b4108f7e21b559f76554ab506b4 SHA512 3a25359b11b9c4e5aa2542be9d5421beb25301443b056ba9173963c6a671da092ef1200b891857e182eda3be8819564f814f81e2b39e8647a60be04973849c2b WHIRLPOOL 9d2fb75646bef18b56fbe554a447e2b3d43f82dd9a06f219fcf841b1c3360fa37e24f2cf92f41526de224844384824765192bf2508c457eb6d7e7983be09f6d1 |
30 |
+DIST gentoo-asterisk-patchset-4.03.tar.bz2 5989 SHA256 3a68854bb8a9c2c5e44615412c586606d0ba5fb3abb88e61b22c4d7dbfda7bed SHA512 acde7d6e017c260b236b0f2dafd3e02c545fc31cbd50abaff3dbc734a6423bdcfdf9c136d5c8d76fc39735d8f07f2df4086aada034d16e9b6936207e39c4abb0 WHIRLPOOL b2c1f5d8d5bd07ae57925c6746ab7193388fdbc5357f908dd60179cebacfb07b8846ac6e0b37a345916e05d57aaad9351b410c92f93b33f9498c1ccb2a374d48 |
31 |
|
32 |
diff --git a/net-misc/asterisk/asterisk-11.22.0.ebuild b/net-misc/asterisk/asterisk-11.22.0.ebuild |
33 |
new file mode 100644 |
34 |
index 0000000..e26f6a6 |
35 |
--- /dev/null |
36 |
+++ b/net-misc/asterisk/asterisk-11.22.0.ebuild |
37 |
@@ -0,0 +1,325 @@ |
38 |
+# Copyright 1999-2016 Gentoo Foundation |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+# $Id$ |
41 |
+ |
42 |
+EAPI=6 |
43 |
+inherit autotools eutils linux-info multilib user systemd |
44 |
+ |
45 |
+MY_P="${PN}-${PV/_/-}" |
46 |
+ |
47 |
+DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
48 |
+HOMEPAGE="http://www.asterisk.org/" |
49 |
+SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
50 |
+ mirror://gentoo/gentoo-asterisk-patchset-3.17.tar.bz2" |
51 |
+LICENSE="GPL-2" |
52 |
+SLOT="0" |
53 |
+KEYWORDS="~amd64 ~x86" |
54 |
+ |
55 |
+IUSE_VOICEMAIL_STORAGE=" |
56 |
+ +voicemail_storage_file |
57 |
+ voicemail_storage_odbc |
58 |
+ voicemail_storage_imap |
59 |
+" |
60 |
+IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc xmpp ldap libedit libressl lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis" |
61 |
+IUSE_EXPAND="VOICEMAIL_STORAGE" |
62 |
+REQUIRED_USE="gtalk? ( xmpp ) |
63 |
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
64 |
+ voicemail_storage_odbc? ( odbc ) |
65 |
+" |
66 |
+ |
67 |
+EPATCH_SUFFIX="patch" |
68 |
+PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
69 |
+ |
70 |
+CDEPEND="dev-db/sqlite:3 |
71 |
+ dev-libs/popt |
72 |
+ dev-libs/libxml2 |
73 |
+ !libressl? ( dev-libs/openssl:0 ) |
74 |
+ libressl? ( dev-libs/libressl ) |
75 |
+ sys-libs/ncurses:* |
76 |
+ sys-libs/zlib |
77 |
+ alsa? ( media-libs/alsa-lib ) |
78 |
+ bluetooth? ( net-wireless/bluez ) |
79 |
+ calendar? ( net-libs/neon |
80 |
+ dev-libs/libical |
81 |
+ dev-libs/iksemel ) |
82 |
+ caps? ( sys-libs/libcap ) |
83 |
+ cluster? ( sys-cluster/corosync ) |
84 |
+ curl? ( net-misc/curl ) |
85 |
+ dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
86 |
+ net-misc/dahdi-tools ) |
87 |
+ freetds? ( dev-db/freetds ) |
88 |
+ gtalk? ( dev-libs/iksemel ) |
89 |
+ http? ( dev-libs/gmime:2.6 ) |
90 |
+ iconv? ( virtual/libiconv ) |
91 |
+ ilbc? ( dev-libs/ilbc-rfc3951 ) |
92 |
+ xmpp? ( dev-libs/iksemel ) |
93 |
+ ldap? ( net-nds/openldap ) |
94 |
+ libedit? ( dev-libs/libedit ) |
95 |
+ lua? ( dev-lang/lua:* ) |
96 |
+ mysql? ( virtual/mysql ) |
97 |
+ newt? ( dev-libs/newt ) |
98 |
+ odbc? ( dev-db/unixODBC ) |
99 |
+ osplookup? ( net-libs/osptoolkit ) |
100 |
+ portaudio? ( media-libs/portaudio ) |
101 |
+ postgres? ( dev-db/postgresql:* ) |
102 |
+ radius? ( net-dialup/freeradius-client ) |
103 |
+ snmp? ( net-analyzer/net-snmp ) |
104 |
+ span? ( media-libs/spandsp ) |
105 |
+ speex? ( media-libs/speex ) |
106 |
+ srtp? ( net-libs/libsrtp ) |
107 |
+ vorbis? ( media-libs/libvorbis )" |
108 |
+ |
109 |
+DEPEND="${CDEPEND} |
110 |
+ !net-libs/openh323 |
111 |
+ !net-libs/pjsip |
112 |
+ voicemail_storage_imap? ( virtual/imap-c-client ) |
113 |
+ virtual/pkgconfig |
114 |
+" |
115 |
+ |
116 |
+RDEPEND="${CDEPEND} |
117 |
+ selinux? ( sec-policy/selinux-asterisk ) |
118 |
+ syslog? ( virtual/logger )" |
119 |
+ |
120 |
+PDEPEND="net-misc/asterisk-core-sounds |
121 |
+ net-misc/asterisk-extra-sounds |
122 |
+ net-misc/asterisk-moh-opsound" |
123 |
+ |
124 |
+S="${WORKDIR}/${MY_P}" |
125 |
+ |
126 |
+pkg_setup() { |
127 |
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
128 |
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
129 |
+ have reported that this module dropped critical SIP packets in their deployments. You |
130 |
+ may want to disable it if you see such problems." |
131 |
+ check_extra_config |
132 |
+ |
133 |
+ enewgroup asterisk |
134 |
+ enewgroup dialout 20 |
135 |
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
136 |
+} |
137 |
+ |
138 |
+src_prepare() { |
139 |
+ default |
140 |
+ AT_M4DIR=autoconf eautoreconf |
141 |
+} |
142 |
+ |
143 |
+src_configure() { |
144 |
+ local vmst |
145 |
+ |
146 |
+ econf \ |
147 |
+ --libdir="/usr/$(get_libdir)" \ |
148 |
+ --localstatedir="/var" \ |
149 |
+ --with-crypto \ |
150 |
+ --with-gsm=internal \ |
151 |
+ --with-popt \ |
152 |
+ --with-ssl \ |
153 |
+ --with-z \ |
154 |
+ --without-pwlib \ |
155 |
+ $(use_with caps cap) \ |
156 |
+ $(use_with http gmime) \ |
157 |
+ $(use_with newt) \ |
158 |
+ $(use_with portaudio) |
159 |
+ |
160 |
+ # Blank out sounds/sounds.xml file to prevent |
161 |
+ # asterisk from installing sounds files (we pull them in via |
162 |
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
163 |
+ >"${S}"/sounds/sounds.xml |
164 |
+ |
165 |
+ # That NATIVE_ARCH chatter really is quite bothersome |
166 |
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system" |
167 |
+ |
168 |
+ # Compile menuselect binary for optional components |
169 |
+ emake menuselect.makeopts |
170 |
+ |
171 |
+ # Broken functionality is forcibly disabled (bug #360143) |
172 |
+ menuselect/menuselect --disable chan_misdn menuselect.makeopts |
173 |
+ menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
174 |
+ |
175 |
+ # Utility set is forcibly enabled (bug #358001) |
176 |
+ menuselect/menuselect --enable smsq menuselect.makeopts |
177 |
+ menuselect/menuselect --enable streamplayer menuselect.makeopts |
178 |
+ menuselect/menuselect --enable aelparse menuselect.makeopts |
179 |
+ menuselect/menuselect --enable astman menuselect.makeopts |
180 |
+ |
181 |
+ # this is connected, otherwise it would not find |
182 |
+ # ast_pktccops_gate_alloc symbol |
183 |
+ menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
184 |
+ menuselect/menuselect --enable res_pktccops menuselect.makeopts |
185 |
+ |
186 |
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
187 |
+ menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
188 |
+ menuselect/menuselect --enable func_aes menuselect.makeopts |
189 |
+ menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
190 |
+ |
191 |
+ # SQlite3 is now the main database backend, enable related features |
192 |
+ menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
193 |
+ menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts |
194 |
+ |
195 |
+ # The others are based on USE-flag settings |
196 |
+ use_select() { |
197 |
+ local state=$(use "$1" && echo enable || echo disable) |
198 |
+ shift # remove use from parameters |
199 |
+ |
200 |
+ while [[ -n $1 ]]; do |
201 |
+ menuselect/menuselect --${state} "$1" menuselect.makeopts |
202 |
+ shift |
203 |
+ done |
204 |
+ } |
205 |
+ |
206 |
+ use_select alsa chan_alsa |
207 |
+ use_select bluetooth chan_mobile |
208 |
+ use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
209 |
+ use_select cluster res_corosync |
210 |
+ use_select curl func_curl res_config_curl res_curl |
211 |
+ use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi |
212 |
+ use_select freetds {cdr,cel}_tds |
213 |
+ use_select gtalk chan_motif |
214 |
+ use_select http res_http_post |
215 |
+ use_select iconv func_iconv |
216 |
+ use_select xmpp res_xmpp |
217 |
+ use_select ilbc codec_ilbc format_ilbc |
218 |
+ use_select ldap res_config_ldap |
219 |
+ use_select lua pbx_lua |
220 |
+ use_select mysql app_mysql cdr_mysql res_config_mysql |
221 |
+ use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
222 |
+ use_select osplookup app_osplookup |
223 |
+ use_select oss chan_oss |
224 |
+ use_select postgres {cdr,cel}_pgsql res_config_pgsql |
225 |
+ use_select radius {cdr,cel}_radius |
226 |
+ use_select snmp res_snmp |
227 |
+ use_select span res_fax_spandsp |
228 |
+ use_select speex {codec,func}_speex |
229 |
+ use_select srtp res_srtp |
230 |
+ use_select syslog cdr_syslog |
231 |
+ use_select vorbis format_ogg_vorbis |
232 |
+ |
233 |
+ # Voicemail storage ... |
234 |
+ for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
235 |
+ if use ${vmst}; then |
236 |
+ menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
237 |
+ fi |
238 |
+ done |
239 |
+ |
240 |
+ if use debug; then |
241 |
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do |
242 |
+ menuselect/menuselect --enable $o menuselect.makeopts |
243 |
+ done |
244 |
+ fi |
245 |
+} |
246 |
+ |
247 |
+src_compile() { |
248 |
+ ASTLDFLAGS="${LDFLAGS}" emake |
249 |
+} |
250 |
+ |
251 |
+src_install() { |
252 |
+ mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
253 |
+ emake DESTDIR="${D}" installdirs |
254 |
+ emake DESTDIR="${D}" install |
255 |
+ |
256 |
+ if use radius; then |
257 |
+ insinto /etc/radiusclient/ |
258 |
+ doins contrib/dictionary.digium |
259 |
+ fi |
260 |
+ diropts -m 0750 -o root -g asterisk |
261 |
+ keepdir /etc/asterisk |
262 |
+ if use samples; then |
263 |
+ emake DESTDIR="${D}" samples |
264 |
+ for conffile in "${D}"etc/asterisk/*.* |
265 |
+ do |
266 |
+ chown root:root $conffile |
267 |
+ chmod 0644 $conffile |
268 |
+ done |
269 |
+ einfo "Sample files have been installed" |
270 |
+ else |
271 |
+ einfo "Skipping installation of sample files..." |
272 |
+ rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
273 |
+ rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
274 |
+ rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
275 |
+ rm -f "${D}"etc/asterisk/* || die |
276 |
+ fi |
277 |
+ rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
278 |
+ |
279 |
+ # keep directories |
280 |
+ diropts -m 0770 -o asterisk asterisk |
281 |
+ keepdir /var/lib/asterisk |
282 |
+ keepdir /var/spool/asterisk |
283 |
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
284 |
+ diropts -m 0750 -o asterisk -g asterisk |
285 |
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
286 |
+ |
287 |
+ newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk |
288 |
+ newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
289 |
+ |
290 |
+ systemd_dounit "${FILESDIR}"/asterisk.service |
291 |
+ systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf |
292 |
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf |
293 |
+ |
294 |
+ # install the upgrade documentation |
295 |
+ # |
296 |
+ dodoc README UPGRADE* BUGS CREDITS |
297 |
+ |
298 |
+ # install extra documentation |
299 |
+ # |
300 |
+ if use doc |
301 |
+ then |
302 |
+ dodoc doc/*.txt |
303 |
+ dodoc doc/*.pdf |
304 |
+ fi |
305 |
+ |
306 |
+ # install SIP scripts; bug #300832 |
307 |
+ # |
308 |
+ dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
309 |
+ dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
310 |
+ dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
311 |
+ dodoc "${FILESDIR}/1.6.2/call_data.txt" |
312 |
+ |
313 |
+ # install logrotate snippet; bug #329281 |
314 |
+ # |
315 |
+ insinto /etc/logrotate.d |
316 |
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk |
317 |
+} |
318 |
+ |
319 |
+pkg_postinst() { |
320 |
+ # |
321 |
+ # Announcements, warnings, reminders... |
322 |
+ # |
323 |
+ einfo "Asterisk has been installed" |
324 |
+ echo |
325 |
+ elog "If you want to know more about asterisk, visit these sites:" |
326 |
+ elog "http://www.asteriskdocs.org/" |
327 |
+ elog "http://www.voip-info.org/wiki-Asterisk" |
328 |
+ echo |
329 |
+ elog "http://www.automated.it/guidetoasterisk.htm" |
330 |
+ echo |
331 |
+ elog "Gentoo VoIP IRC Channel:" |
332 |
+ elog "#gentoo-voip @ irc.freenode.net" |
333 |
+ echo |
334 |
+ echo |
335 |
+ elog "Please read the Asterisk 11 upgrade document:" |
336 |
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11" |
337 |
+} |
338 |
+ |
339 |
+pkg_config() { |
340 |
+ einfo "Do you want to reset file permissions and ownerships (y/N)?" |
341 |
+ |
342 |
+ read tmp |
343 |
+ tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
344 |
+ |
345 |
+ if [[ "$tmp" = "y" ]] ||\ |
346 |
+ [[ "$tmp" = "yes" ]] |
347 |
+ then |
348 |
+ einfo "Resetting permissions to defaults..." |
349 |
+ |
350 |
+ for x in spool run lib log; do |
351 |
+ chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
352 |
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
353 |
+ done |
354 |
+ |
355 |
+ chown -R root:asterisk "${ROOT}"etc/asterisk |
356 |
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
357 |
+ |
358 |
+ einfo "done" |
359 |
+ else |
360 |
+ einfo "skipping" |
361 |
+ fi |
362 |
+} |
363 |
|
364 |
diff --git a/net-misc/asterisk/asterisk-13.8.2.ebuild b/net-misc/asterisk/asterisk-13.8.2.ebuild |
365 |
new file mode 100644 |
366 |
index 0000000..fb4ea81 |
367 |
--- /dev/null |
368 |
+++ b/net-misc/asterisk/asterisk-13.8.2.ebuild |
369 |
@@ -0,0 +1,326 @@ |
370 |
+# Copyright 1999-2016 Gentoo Foundation |
371 |
+# Distributed under the terms of the GNU General Public License v2 |
372 |
+# $Id$ |
373 |
+ |
374 |
+EAPI=6 |
375 |
+inherit autotools eutils linux-info multilib user systemd |
376 |
+ |
377 |
+MY_P="${PN}-${PV/_/-}" |
378 |
+ |
379 |
+DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
380 |
+HOMEPAGE="http://www.asterisk.org/" |
381 |
+SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
382 |
+ mirror://gentoo/gentoo-asterisk-patchset-4.03.tar.bz2" |
383 |
+LICENSE="GPL-2" |
384 |
+SLOT="0" |
385 |
+KEYWORDS="~amd64 ~x86" |
386 |
+ |
387 |
+IUSE_VOICEMAIL_STORAGE=" |
388 |
+ +voicemail_storage_file |
389 |
+ voicemail_storage_odbc |
390 |
+ voicemail_storage_imap |
391 |
+" |
392 |
+IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc xmpp ldap libedit libressl lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis" |
393 |
+IUSE_EXPAND="VOICEMAIL_STORAGE" |
394 |
+REQUIRED_USE="gtalk? ( xmpp ) |
395 |
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
396 |
+ voicemail_storage_odbc? ( odbc ) |
397 |
+" |
398 |
+ |
399 |
+EPATCH_SUFFIX="patch" |
400 |
+PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
401 |
+ |
402 |
+CDEPEND="dev-db/sqlite:3 |
403 |
+ dev-libs/popt |
404 |
+ dev-libs/jansson |
405 |
+ dev-libs/libxml2 |
406 |
+ !libressl? ( dev-libs/openssl:0 ) |
407 |
+ libressl? ( dev-libs/libressl ) |
408 |
+ sys-libs/ncurses:* |
409 |
+ sys-libs/zlib |
410 |
+ alsa? ( media-libs/alsa-lib ) |
411 |
+ bluetooth? ( net-wireless/bluez ) |
412 |
+ calendar? ( net-libs/neon |
413 |
+ dev-libs/libical |
414 |
+ dev-libs/iksemel ) |
415 |
+ caps? ( sys-libs/libcap ) |
416 |
+ cluster? ( sys-cluster/corosync ) |
417 |
+ curl? ( net-misc/curl ) |
418 |
+ dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
419 |
+ net-misc/dahdi-tools ) |
420 |
+ freetds? ( dev-db/freetds ) |
421 |
+ gtalk? ( dev-libs/iksemel ) |
422 |
+ http? ( dev-libs/gmime:2.6 ) |
423 |
+ iconv? ( virtual/libiconv ) |
424 |
+ ilbc? ( dev-libs/ilbc-rfc3951 ) |
425 |
+ xmpp? ( dev-libs/iksemel ) |
426 |
+ ldap? ( net-nds/openldap ) |
427 |
+ libedit? ( dev-libs/libedit ) |
428 |
+ lua? ( dev-lang/lua:* ) |
429 |
+ mysql? ( virtual/mysql ) |
430 |
+ newt? ( dev-libs/newt ) |
431 |
+ odbc? ( dev-db/unixODBC ) |
432 |
+ osplookup? ( net-libs/osptoolkit ) |
433 |
+ portaudio? ( media-libs/portaudio ) |
434 |
+ postgres? ( dev-db/postgresql:* ) |
435 |
+ radius? ( net-dialup/freeradius-client ) |
436 |
+ snmp? ( net-analyzer/net-snmp ) |
437 |
+ span? ( media-libs/spandsp ) |
438 |
+ speex? ( media-libs/speex ) |
439 |
+ srtp? ( net-libs/libsrtp ) |
440 |
+ vorbis? ( media-libs/libvorbis )" |
441 |
+ |
442 |
+DEPEND="${CDEPEND} |
443 |
+ !net-libs/openh323 |
444 |
+ !net-libs/pjsip |
445 |
+ voicemail_storage_imap? ( virtual/imap-c-client ) |
446 |
+ virtual/pkgconfig |
447 |
+" |
448 |
+ |
449 |
+RDEPEND="${CDEPEND} |
450 |
+ selinux? ( sec-policy/selinux-asterisk ) |
451 |
+ syslog? ( virtual/logger )" |
452 |
+ |
453 |
+PDEPEND="net-misc/asterisk-core-sounds |
454 |
+ net-misc/asterisk-extra-sounds |
455 |
+ net-misc/asterisk-moh-opsound" |
456 |
+ |
457 |
+S="${WORKDIR}/${MY_P}" |
458 |
+ |
459 |
+pkg_setup() { |
460 |
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
461 |
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
462 |
+ have reported that this module dropped critical SIP packets in their deployments. You |
463 |
+ may want to disable it if you see such problems." |
464 |
+ check_extra_config |
465 |
+ |
466 |
+ enewgroup asterisk |
467 |
+ enewgroup dialout 20 |
468 |
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
469 |
+} |
470 |
+ |
471 |
+src_prepare() { |
472 |
+ default |
473 |
+ AT_M4DIR=autoconf eautoreconf |
474 |
+} |
475 |
+ |
476 |
+src_configure() { |
477 |
+ local vmst |
478 |
+ |
479 |
+ econf \ |
480 |
+ --libdir="/usr/$(get_libdir)" \ |
481 |
+ --localstatedir="/var" \ |
482 |
+ --with-crypto \ |
483 |
+ --with-gsm=internal \ |
484 |
+ --with-popt \ |
485 |
+ --with-ssl \ |
486 |
+ --with-z \ |
487 |
+ --without-pwlib \ |
488 |
+ $(use_with caps cap) \ |
489 |
+ $(use_with http gmime) \ |
490 |
+ $(use_with newt) \ |
491 |
+ $(use_with portaudio) |
492 |
+ |
493 |
+ # Blank out sounds/sounds.xml file to prevent |
494 |
+ # asterisk from installing sounds files (we pull them in via |
495 |
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
496 |
+ >"${S}"/sounds/sounds.xml |
497 |
+ |
498 |
+ # That NATIVE_ARCH chatter really is quite bothersome |
499 |
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system" |
500 |
+ |
501 |
+ # Compile menuselect binary for optional components |
502 |
+ emake menuselect.makeopts |
503 |
+ |
504 |
+ # Broken functionality is forcibly disabled (bug #360143) |
505 |
+ menuselect/menuselect --disable chan_misdn menuselect.makeopts |
506 |
+ menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
507 |
+ |
508 |
+ # Utility set is forcibly enabled (bug #358001) |
509 |
+ menuselect/menuselect --enable smsq menuselect.makeopts |
510 |
+ menuselect/menuselect --enable streamplayer menuselect.makeopts |
511 |
+ menuselect/menuselect --enable aelparse menuselect.makeopts |
512 |
+ menuselect/menuselect --enable astman menuselect.makeopts |
513 |
+ |
514 |
+ # this is connected, otherwise it would not find |
515 |
+ # ast_pktccops_gate_alloc symbol |
516 |
+ menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
517 |
+ menuselect/menuselect --enable res_pktccops menuselect.makeopts |
518 |
+ |
519 |
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
520 |
+ menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
521 |
+ menuselect/menuselect --enable func_aes menuselect.makeopts |
522 |
+ menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
523 |
+ |
524 |
+ # SQlite3 is now the main database backend, enable related features |
525 |
+ menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
526 |
+ menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts |
527 |
+ |
528 |
+ # The others are based on USE-flag settings |
529 |
+ use_select() { |
530 |
+ local state=$(use "$1" && echo enable || echo disable) |
531 |
+ shift # remove use from parameters |
532 |
+ |
533 |
+ while [[ -n $1 ]]; do |
534 |
+ menuselect/menuselect --${state} "$1" menuselect.makeopts |
535 |
+ shift |
536 |
+ done |
537 |
+ } |
538 |
+ |
539 |
+ use_select alsa chan_alsa |
540 |
+ use_select bluetooth chan_mobile |
541 |
+ use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
542 |
+ use_select cluster res_corosync |
543 |
+ use_select curl func_curl res_config_curl res_curl |
544 |
+ use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi |
545 |
+ use_select freetds {cdr,cel}_tds |
546 |
+ use_select gtalk chan_motif |
547 |
+ use_select http res_http_post |
548 |
+ use_select iconv func_iconv |
549 |
+ use_select xmpp res_xmpp |
550 |
+ use_select ilbc codec_ilbc format_ilbc |
551 |
+ use_select ldap res_config_ldap |
552 |
+ use_select lua pbx_lua |
553 |
+ use_select mysql app_mysql cdr_mysql res_config_mysql |
554 |
+ use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
555 |
+ use_select osplookup app_osplookup |
556 |
+ use_select oss chan_oss |
557 |
+ use_select postgres {cdr,cel}_pgsql res_config_pgsql |
558 |
+ use_select radius {cdr,cel}_radius |
559 |
+ use_select snmp res_snmp |
560 |
+ use_select span res_fax_spandsp |
561 |
+ use_select speex {codec,func}_speex |
562 |
+ use_select srtp res_srtp |
563 |
+ use_select syslog cdr_syslog |
564 |
+ use_select vorbis format_ogg_vorbis |
565 |
+ |
566 |
+ # Voicemail storage ... |
567 |
+ for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
568 |
+ if use ${vmst}; then |
569 |
+ menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
570 |
+ fi |
571 |
+ done |
572 |
+ |
573 |
+ if use debug; then |
574 |
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do |
575 |
+ menuselect/menuselect --enable $o menuselect.makeopts |
576 |
+ done |
577 |
+ fi |
578 |
+} |
579 |
+ |
580 |
+src_compile() { |
581 |
+ ASTLDFLAGS="${LDFLAGS}" emake |
582 |
+} |
583 |
+ |
584 |
+src_install() { |
585 |
+ mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
586 |
+ emake DESTDIR="${D}" installdirs |
587 |
+ emake DESTDIR="${D}" install |
588 |
+ |
589 |
+ if use radius; then |
590 |
+ insinto /etc/radiusclient/ |
591 |
+ doins contrib/dictionary.digium |
592 |
+ fi |
593 |
+ diropts -m 0750 -o root -g asterisk |
594 |
+ keepdir /etc/asterisk |
595 |
+ if use samples; then |
596 |
+ emake DESTDIR="${D}" samples |
597 |
+ for conffile in "${D}"etc/asterisk/*.* |
598 |
+ do |
599 |
+ chown root:root $conffile |
600 |
+ chmod 0644 $conffile |
601 |
+ done |
602 |
+ einfo "Sample files have been installed" |
603 |
+ else |
604 |
+ einfo "Skipping installation of sample files..." |
605 |
+ rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
606 |
+ rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
607 |
+ rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
608 |
+ rm -f "${D}"etc/asterisk/* || die |
609 |
+ fi |
610 |
+ rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
611 |
+ |
612 |
+ # keep directories |
613 |
+ diropts -m 0770 -o asterisk asterisk |
614 |
+ keepdir /var/lib/asterisk |
615 |
+ keepdir /var/spool/asterisk |
616 |
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
617 |
+ diropts -m 0750 -o asterisk -g asterisk |
618 |
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
619 |
+ |
620 |
+ newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk |
621 |
+ newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
622 |
+ |
623 |
+ systemd_dounit "${FILESDIR}"/asterisk.service |
624 |
+ systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf |
625 |
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf |
626 |
+ |
627 |
+ # install the upgrade documentation |
628 |
+ # |
629 |
+ dodoc README UPGRADE* BUGS CREDITS |
630 |
+ |
631 |
+ # install extra documentation |
632 |
+ # |
633 |
+ if use doc |
634 |
+ then |
635 |
+ dodoc doc/*.txt |
636 |
+ dodoc doc/*.pdf |
637 |
+ fi |
638 |
+ |
639 |
+ # install SIP scripts; bug #300832 |
640 |
+ # |
641 |
+ dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
642 |
+ dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
643 |
+ dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
644 |
+ dodoc "${FILESDIR}/1.6.2/call_data.txt" |
645 |
+ |
646 |
+ # install logrotate snippet; bug #329281 |
647 |
+ # |
648 |
+ insinto /etc/logrotate.d |
649 |
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk |
650 |
+} |
651 |
+ |
652 |
+pkg_postinst() { |
653 |
+ # |
654 |
+ # Announcements, warnings, reminders... |
655 |
+ # |
656 |
+ einfo "Asterisk has been installed" |
657 |
+ echo |
658 |
+ elog "If you want to know more about asterisk, visit these sites:" |
659 |
+ elog "http://www.asteriskdocs.org/" |
660 |
+ elog "http://www.voip-info.org/wiki-Asterisk" |
661 |
+ echo |
662 |
+ elog "http://www.automated.it/guidetoasterisk.htm" |
663 |
+ echo |
664 |
+ elog "Gentoo VoIP IRC Channel:" |
665 |
+ elog "#gentoo-voip @ irc.freenode.net" |
666 |
+ echo |
667 |
+ echo |
668 |
+ elog "Please read the Asterisk 13 upgrade document:" |
669 |
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+13" |
670 |
+} |
671 |
+ |
672 |
+pkg_config() { |
673 |
+ einfo "Do you want to reset file permissions and ownerships (y/N)?" |
674 |
+ |
675 |
+ read tmp |
676 |
+ tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
677 |
+ |
678 |
+ if [[ "$tmp" = "y" ]] ||\ |
679 |
+ [[ "$tmp" = "yes" ]] |
680 |
+ then |
681 |
+ einfo "Resetting permissions to defaults..." |
682 |
+ |
683 |
+ for x in spool run lib log; do |
684 |
+ chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
685 |
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
686 |
+ done |
687 |
+ |
688 |
+ chown -R root:asterisk "${ROOT}"etc/asterisk |
689 |
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
690 |
+ |
691 |
+ einfo "done" |
692 |
+ else |
693 |
+ einfo "skipping" |
694 |
+ fi |
695 |
+} |