Browse code

pkg/kamailio/alpine: renamed userblacklist to userblocklist

Sergey Safarov authored on 25/11/2020 18:44:45
Showing 1 changed files
... ...
@@ -70,7 +70,7 @@ _mod_list_db="acc alias_db auth_db avpops cfg_db db_berkeley db_flatstore \
70 70
 		db_cluster dialog dispatcher domain drouting group \
71 71
 		htable imc matrix mohqueue msilo mtree p_usrloc pdt permissions \
72 72
 		pipelimit prefix_route registrar sipcapture siptrace speeddial \
73
-		sqlops uac uri_db userblacklist usrloc"
73
+		sqlops uac uri_db userblocklist usrloc"
74 74
 
75 75
 # - common modules depending on database, using UID db schema
76 76
 _mod_list_dbuid="db2_ops uid_auth_db uid_avp_db uid_domain uid_gflags \
Browse code

pkg/kamailio/alpine: packaged app_lua_sr module

Sergey Safarov authored on 08/11/2020 21:19:44
Showing 1 changed files
... ...
@@ -157,7 +157,7 @@ _mod_list_presence="presence presence_conference presence_dialoginfo \
157 157
 			rls xcap_client xcap_server"
158 158
 
159 159
 # - modules depending on lua library
160
-_mod_list_lua="app_lua"
160
+_mod_list_lua="app_lua app_lua_sr"
161 161
 
162 162
 # - modules depending on perl library
163 163
 _mod_list_perl="app_perl db_perlvdb"
Browse code

pkg/kamailio/alpine: Fixed alpine packaging after 475a54cb04c0594c3fdaffb0a07d370702e80dd4

changed hash sum after init script update

Sergey Safarov authored on 25/10/2019 11:54:11
Showing 1 changed files
... ...
@@ -581,4 +581,4 @@ sipdump() {
581 581
 }
582 582
 
583 583
 sha512sums="51ea5fccd27a9d3d1783cfc5596eb28ab27e34faeec3268600363f43c48a3634c3c584c479ba874fdb53b85766a0ce8fe7df0e20954c9c6514b1d9d41d9237e6  kamailio-5.1.0.20171125-991fe9b.tar.gz
584
-321b1b160434150bcde3c0ad7f47ddf259791b68d4ce74ba4c35034026421a2bc6f5e86f26f393f5fcdb523d8cd75f944709473065553ce860b0ea06b3dc2a1b  kamailio.initd"
584
+a777338f1a60b95aa2bf3e38314a0cfa77a3397ccad342955409eb95f66ad9c38a3a64d2974d353d50f2aced3936b209063a0f0a7127851b1c278d8384f4cc45  kamailio.initd"
Browse code

pkg: rpm, alpine - switch from deprecated /var/run to /run

The FHS 3.0 [F] has deprecated /var/run in favor of /run. Current
distributions have done so for a long time (for example in Debian
since 6.0 “squeeze”), even though they provide a compatibility
symlink from /var/run to /run. But software like systemd have
started emitting warnings when using /var/run, for example for
its PIDFile directive, which pollutes the logs.

Guillem Jover authored on 25/10/2019 09:52:05 • Daniel-Constantin Mierla committed on 25/10/2019 10:00:46
Showing 1 changed files
... ...
@@ -290,7 +290,7 @@ prepare() {
290 290
 	cd "$builddir"
291 291
 
292 292
 	cd utils/kamctl/
293
-	sed -i -e 's:/var/run/kamailio.pid:/var/run/kamailio/kamailio.pid:g' \
293
+	sed -i -e 's:/run/kamailio.pid:/run/kamailio/kamailio.pid:g' \
294 294
 		kamctl.base kamctlrc || return 1
295 295
 	# we actually dont need bash
296 296
 	sed -i -e 's:/bin/bash:/bin/sh:' kamctl kamdbctl \
... ...
@@ -318,7 +318,7 @@ package() {
318 318
 	make  FREERADIUS=1 -j1 install || return 1
319 319
 
320 320
 	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
321
-	install -d -o kamailio "$pkgdir"/var/run/kamailio
321
+	install -d -o kamailio "$pkgdir"/run/kamailio
322 322
 }
323 323
 
324 324
 _mv_mod() {
Browse code

pkg/kamailio/alpine: packaged MongoDB module [skip ci]

Sergey Safarov authored on 27/08/2019 06:03:20
Showing 1 changed files
... ...
@@ -31,7 +31,7 @@ makedepends="bison db-dev flex freeradius-client-dev expat-dev
31 31
 	confuse-dev ncurses-dev sqlite-dev lua-dev openldap-dev openssl-dev
32 32
 	net-snmp-dev libuuid libev-dev jansson-dev json-c-dev libevent-dev
33 33
 	linux-headers libmemcached-dev rabbitmq-c-dev hiredis-dev
34
-	ruby-dev libmaxminddb-dev libunistring-dev"
34
+	ruby-dev libmaxminddb-dev libunistring-dev mongo-c-driver-dev"
35 35
 
36 36
 install="$pkgname.pre-install $pkgname.pre-upgrade"
37 37
 
... ...
@@ -253,7 +253,7 @@ _modules="$_module_group_kstandard"
253 253
 for _i in db postgres sqlite dbtext mysql \
254 254
 	cpl xml unixodbc snmpstats xmpp carrierroute \
255 255
 	ldap utils tls presence lua ims outbound debugger \
256
-	extras json websocket authephemeral \
256
+	extras json websocket authephemeral mongodb\
257 257
 	uuid ev memcached redis geoip2 jansson sqlang sipdump \
258 258
 	jsdt http_async kazoo rabbitmq sctp radius perl python \
259 259
 	python3 ruby; do
... ...
@@ -499,6 +499,11 @@ memcached() {
499 499
 		"$_mod_list_memcached"
500 500
 }
501 501
 
502
+mongodb() {
503
+	_generic_pkg "MongoDB database connectivity" \
504
+	"$_mod_list_mongodb"
505
+}
506
+
502 507
 rabbitmq() {
503 508
 	_generic_pkg "RabbitMQ client for configuration file" \
504 509
 		"$_mod_list_rabbitmq"
Browse code

pkg/kamailio/alpine: backported python3 ruby openrc subpackaging from alpine repo

Reference commit
https://github.com/alpinelinux/aports/commit/280b4b05da6dff3980267a0d27b228f0e47a5755#diff-75216d130f5872b5775d4e035eadd419

Sergey Safarov authored on 22/07/2019 10:55:55 • Henning Westerholt committed on 28/07/2019 11:43:56
Showing 1 changed files
... ...
@@ -25,11 +25,14 @@ arch="all"
25 25
 license="GPL-2.0"
26 26
 depends="gawk"
27 27
 options="!check"
28
-makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev perl-dev postgresql-dev python2-dev pcre-dev mariadb-dev
29
-	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
30
-	lua-dev openldap-dev openssl-dev net-snmp-dev libuuid libev-dev
31
-	jansson-dev json-c-dev libevent-dev linux-headers libmemcached-dev
32
-	rabbitmq-c-dev hiredis-dev libmaxminddb-dev libunistring-dev ruby-dev"
28
+makedepends="bison db-dev flex freeradius-client-dev expat-dev
29
+	lksctp-tools-dev perl-dev postgresql-dev python2-dev python3-dev
30
+	pcre-dev mariadb-dev libxml2-dev curl-dev unixodbc-dev
31
+	confuse-dev ncurses-dev sqlite-dev lua-dev openldap-dev openssl-dev
32
+	net-snmp-dev libuuid libev-dev jansson-dev json-c-dev libevent-dev
33
+	linux-headers libmemcached-dev rabbitmq-c-dev hiredis-dev
34
+	ruby-dev libmaxminddb-dev libunistring-dev"
35
+
33 36
 install="$pkgname.pre-install $pkgname.pre-upgrade"
34 37
 
35 38
 # secfixes:
... ...
@@ -159,12 +162,18 @@ _mod_list_lua="app_lua"
159 162
 # - modules depending on perl library
160 163
 _mod_list_perl="app_perl db_perlvdb"
161 164
 
162
-# - modules depending on python library
165
+# - modules depending on python2 library
163 166
 _mod_list_python="app_python"
164 167
 
165 168
 # - modules depending on ruby library
166 169
 _mod_list_ruby="app_ruby"
167 170
 
171
+# - modules depending on python3 libarary
172
+_mod_list_python3="app_python3"
173
+
174
+# - modules depending on ruby library
175
+_mod_list_ruby="app_ruby"
176
+
168 177
 # - modules depending on rabbitmq
169 178
 _mod_list_rabbitmq="rabbitmq"
170 179
 
... ...
@@ -239,14 +248,15 @@ _module_group_kstandard="$_mod_list_basic $_mod_list_dbuid $_mod_list_pcre"
239 248
 
240 249
 # END Makefile.groups #############################################################
241 250
 
242
-subpackages="$pkgname-doc $pkgname-dbg"
251
+subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc"
243 252
 _modules="$_module_group_kstandard"
244 253
 for _i in db postgres sqlite dbtext mysql \
245 254
 	cpl xml unixodbc snmpstats xmpp carrierroute \
246 255
 	ldap utils tls presence lua ims outbound debugger \
247 256
 	extras json websocket authephemeral \
248 257
 	uuid ev memcached redis geoip2 jansson sqlang sipdump \
249
-	jsdt http_async kazoo rabbitmq sctp radius perl python ruby; do
258
+	jsdt http_async kazoo rabbitmq sctp radius perl python \
259
+	python3 ruby; do
250 260
 
251 261
    subpackages="$subpackages $pkgname-$_i"
252 262
    eval "_modules=\"\$_modules \$_mod_list_$_i\""
... ...
@@ -531,7 +541,7 @@ perl() {
531 541
 }
532 542
 
533 543
 python() {
534
-	_generic_pkg "Python extensions for Kamailio" \
544
+	_generic_pkg "Execute embedded Python2 scripts" \
535 545
 		"$_mod_list_python"
536 546
 }
537 547
 
... ...
@@ -540,6 +550,16 @@ ruby() {
540 550
 		"$_mod_list_ruby"
541 551
 }
542 552
 
553
+python3() {
554
+	_generic_pkg "Execute embedded Python3 scripts" \
555
+		"$_mod_list_python3"
556
+}
557
+
558
+ruby() {
559
+	_generic_pkg "Execute embedded Ruby scripts" \
560
+		"$_mod_list_ruby"
561
+}
562
+
543 563
 sqlang() {
544 564
 	_generic_pkg "Squirrel Language (SQLang) for Kamailio" \
545 565
 		"$_mod_list_sqlang"
Browse code

pkg/kamailio/alpine: Packaged pua_json, db_redis, ims_ocs, acc_json [skip ci]

Sergey Safarov authored on 18/05/2019 09:56:08
Showing 1 changed files
... ...
@@ -178,17 +178,17 @@ _mod_list_sqlite="db_sqlite"
178 178
 _mod_list_oracle="db_oracle"
179 179
 
180 180
 # - modules depending on json library
181
-_mod_list_json="json jsonrpcc jsonrpcs"
181
+_mod_list_json="json jsonrpcc jsonrpcs pua_json"
182 182
 
183 183
 # - modules depending on redis library
184
-_mod_list_redis="ndb_redis topos_redis"
184
+_mod_list_redis="db_redis ndb_redis topos_redis"
185 185
 
186 186
 # - modules depending on mono library
187 187
 _mod_list_mono="app_mono"
188 188
 
189 189
 # - modules related to IMS extensions
190 190
 _mod_list_ims="cdp cdp_avp ims_dialog ims_diameter_server ims_auth ims_isc ims_icscf ims_qos \
191
-		ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf \
191
+		ims_ocs ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf \
192 192
 		ims_usrloc_scscf ims_charging"
193 193
 
194 194
 # - modules depending on osp toolkit library
... ...
@@ -216,7 +216,7 @@ _mod_list_kazoo="kazoo"
216 216
 _mod_list_mongodb="db_mongodb ndb_mongodb"
217 217
 
218 218
 # - modules depending on jansson library
219
-_mod_list_jansson="jansson janssonrpcc"
219
+_mod_list_jansson="acc_json jansson janssonrpcc"
220 220
 
221 221
 # - modules depending on libm
222 222
 _mod_list_jsdt="app_jsdt"
Browse code

kamdbctl: Merged patch from alpine packaging (#1786)

- kamdbctl: Merged patch from alpine packaging (#1786)
- add proper quoting for DB table and module definitions

sergey-safarov authored on 04/01/2019 21:34:47 • Henning Westerholt committed on 04/01/2019 21:34:47
Showing 1 changed files
... ...
@@ -253,7 +253,6 @@ for _i in db postgres sqlite dbtext mysql \
253 253
 done
254 254
 
255 255
 source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
256
-	0001-kamdbctl.base.patch
257 256
 	kamailio.initd
258 257
 	"
259 258
 
... ...
@@ -557,5 +556,4 @@ sipdump() {
557 556
 }
558 557
 
559 558
 sha512sums="51ea5fccd27a9d3d1783cfc5596eb28ab27e34faeec3268600363f43c48a3634c3c584c479ba874fdb53b85766a0ce8fe7df0e20954c9c6514b1d9d41d9237e6  kamailio-5.1.0.20171125-991fe9b.tar.gz
560
-6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
561 559
 321b1b160434150bcde3c0ad7f47ddf259791b68d4ce74ba4c35034026421a2bc6f5e86f26f393f5fcdb523d8cd75f944709473065553ce860b0ea06b3dc2a1b  kamailio.initd"
Browse code

pkg/kamailio/alpine: Added app-ruby package #1761 [skip ci]

Sergey Safarov authored on 12/12/2018 19:23:06
Showing 1 changed files
... ...
@@ -29,7 +29,7 @@ makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev
29 29
 	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
30 30
 	lua-dev openldap-dev openssl-dev net-snmp-dev libuuid libev-dev
31 31
 	jansson-dev json-c-dev libevent-dev linux-headers libmemcached-dev
32
-	rabbitmq-c-dev hiredis-dev libmaxminddb-dev libunistring-dev"
32
+	rabbitmq-c-dev hiredis-dev libmaxminddb-dev libunistring-dev ruby-dev"
33 33
 install="$pkgname.pre-install $pkgname.pre-upgrade"
34 34
 
35 35
 # secfixes:
... ...
@@ -162,6 +162,9 @@ _mod_list_perl="app_perl db_perlvdb"
162 162
 # - modules depending on python library
163 163
 _mod_list_python="app_python"
164 164
 
165
+# - modules depending on ruby library
166
+_mod_list_ruby="app_ruby"
167
+
165 168
 # - modules depending on rabbitmq
166 169
 _mod_list_rabbitmq="rabbitmq"
167 170
 
... ...
@@ -243,7 +246,7 @@ for _i in db postgres sqlite dbtext mysql \
243 246
 	ldap utils tls presence lua ims outbound debugger \
244 247
 	extras json websocket authephemeral \
245 248
 	uuid ev memcached redis geoip2 jansson sqlang sipdump \
246
-	jsdt http_async kazoo rabbitmq sctp radius perl python; do
249
+	jsdt http_async kazoo rabbitmq sctp radius perl python ruby; do
247 250
 
248 251
    subpackages="$subpackages $pkgname-$_i"
249 252
    eval "_modules=\"\$_modules \$_mod_list_$_i\""
... ...
@@ -533,6 +536,11 @@ python() {
533 536
 		"$_mod_list_python"
534 537
 }
535 538
 
539
+ruby() {
540
+	_generic_pkg "Ruby extensions for Kamailio" \
541
+		"$_mod_list_ruby"
542
+}
543
+
536 544
 sqlang() {
537 545
 	_generic_pkg "Squirrel Language (SQLang) for Kamailio" \
538 546
 		"$_mod_list_sqlang"
Browse code

pkg/docker: Alpine switched to use openssl. Updated rules for alpine docker container

Sergey Safarov authored on 09/11/2018 13:01:31 • Victor Seva committed on 09/11/2018 16:38:21
Showing 1 changed files
... ...
@@ -27,7 +27,7 @@ depends="gawk"
27 27
 options="!check"
28 28
 makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev perl-dev postgresql-dev python2-dev pcre-dev mariadb-dev
29 29
 	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
30
-	lua-dev openldap-dev libressl-dev net-snmp-dev libuuid libev-dev
30
+	lua-dev openldap-dev openssl-dev net-snmp-dev libuuid libev-dev
31 31
 	jansson-dev json-c-dev libevent-dev linux-headers libmemcached-dev
32 32
 	rabbitmq-c-dev hiredis-dev libmaxminddb-dev libunistring-dev"
33 33
 install="$pkgname.pre-install $pkgname.pre-upgrade"
... ...
@@ -251,7 +251,6 @@ done
251 251
 
252 252
 source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
253 253
 	0001-kamdbctl.base.patch
254
-	0004-src_core_tcp_read_c.patch
255 254
 	kamailio.initd
256 255
 	"
257 256
 
... ...
@@ -551,5 +550,4 @@ sipdump() {
551 550
 
552 551
 sha512sums="51ea5fccd27a9d3d1783cfc5596eb28ab27e34faeec3268600363f43c48a3634c3c584c479ba874fdb53b85766a0ce8fe7df0e20954c9c6514b1d9d41d9237e6  kamailio-5.1.0.20171125-991fe9b.tar.gz
553 552
 6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
554
-af8362201957eae6b66baf7368c9ca884024209a396d77c5c52180c9aabe13772e9c6513e59721d39503e5bb7a8c1030f5c10301ea9055bddafb7f01ee2f3076  0004-src_core_tcp_read_c.patch
555 553
 321b1b160434150bcde3c0ad7f47ddf259791b68d4ce74ba4c35034026421a2bc6f5e86f26f393f5fcdb523d8cd75f944709473065553ce860b0ea06b3dc2a1b  kamailio.initd"
Browse code

pkg/kamailio/alpine: Update APKBUILD

Sergey Safarov authored on 09/11/2018 14:11:20 • Victor Seva committed on 09/11/2018 16:38:21
Showing 1 changed files
... ...
@@ -22,7 +22,7 @@ arch="all"
22 22
 pkgusers="kamailio"
23 23
 pkggroups="kamailio"
24 24
 arch="all"
25
-license="GPL2+"
25
+license="GPL-2.0"
26 26
 depends="gawk"
27 27
 options="!check"
28 28
 makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev perl-dev postgresql-dev python2-dev pcre-dev mariadb-dev
... ...
@@ -32,6 +32,10 @@ makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev
32 32
 	rabbitmq-c-dev hiredis-dev libmaxminddb-dev libunistring-dev"
33 33
 install="$pkgname.pre-install $pkgname.pre-upgrade"
34 34
 
35
+# secfixes:
36
+#   5.1.4-r0:
37
+#   - CVE-2018-14767
38
+
35 39
 # See Makefile.groups for the list of recommended modules for
36 40
 # each package.  What follows is a simplified version of Makefile.groups
37 41
 #
... ...
@@ -548,4 +552,4 @@ sipdump() {
548 552
 sha512sums="51ea5fccd27a9d3d1783cfc5596eb28ab27e34faeec3268600363f43c48a3634c3c584c479ba874fdb53b85766a0ce8fe7df0e20954c9c6514b1d9d41d9237e6  kamailio-5.1.0.20171125-991fe9b.tar.gz
549 553
 6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
550 554
 af8362201957eae6b66baf7368c9ca884024209a396d77c5c52180c9aabe13772e9c6513e59721d39503e5bb7a8c1030f5c10301ea9055bddafb7f01ee2f3076  0004-src_core_tcp_read_c.patch
551
-cd6e3b677d803cd78561ad14d9b2589fd35ad0096f48047fdcb4ddc7d9103871357efba3b350946844cb53dbb081210746421fc420c22ac845b90251168a628e  kamailio.initd"
555
+321b1b160434150bcde3c0ad7f47ddf259791b68d4ce74ba4c35034026421a2bc6f5e86f26f393f5fcdb523d8cd75f944709473065553ce860b0ea06b3dc2a1b  kamailio.initd"
Browse code

pkg/kamailio/alpine: Added function to build package from local git tree

Sergey Safarov authored on 01/09/2018 19:55:32
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@ pkgver=5.1.0
8 8
 pkgrel=0
9 9
 
10 10
 # If building from a git snapshot, specify the gitcommit
11
-# If building a proper release, leave gitcommit blank
11
+# If building a proper release, leave gitcommit blank or commented
12 12
 _gitcommit=991fe9b28e0e201309048f3b38a135037e40357a
13 13
 
14 14
 [ ! -z "${_gitcommit}" ] && pkgver="${pkgver}.$(date +%Y%m%d)"
... ...
@@ -24,6 +24,7 @@ pkggroups="kamailio"
24 24
 arch="all"
25 25
 license="GPL2+"
26 26
 depends="gawk"
27
+options="!check"
27 28
 makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev perl-dev postgresql-dev python2-dev pcre-dev mariadb-dev
28 29
 	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
29 30
 	lua-dev openldap-dev libressl-dev net-snmp-dev libuuid libev-dev
... ...
@@ -250,11 +251,22 @@ source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgn
250 251
 	kamailio.initd
251 252
 	"
252 253
 
254
+get_source_from_local_git(){
255
+        cd ../../.. && git archive --format=tar.gz --prefix=${pkgname}-${_gitcommit}/ -o "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz ${_gitcommit} && cd pkg/kamailio/alpine || return 1
256
+        echo Created dist archive "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz
257
+}
258
+
259
+get_source_from_github(){
260
+        echo Cannot create archive using local git repo. Trying create source from GutHub.
261
+        wget -O "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz https://github.com/kamailio/$pkgname/archive/${_gitcommit}.tar.gz || return 1
262
+        echo Created dist archive "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz
263
+}
264
+
253 265
 snapshot() {
254 266
         if [ ! -f "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz ]; then
255
-            wget -O "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
267
+            get_source_from_local_git || get_source_from_github
256 268
         fi
257
-        SHA512SUM=$(sha512sum "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz | sed -e "s:$SRCDEST/::")
269
+        SHA512SUM=$(sha512sum "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz | sed -e "s:${SRCDEST}/::")
258 270
         sed -i -e "s/^\(sha512sums=.\).*/\1$SHA512SUM/" APKBUILD
259 271
 }
260 272
 
Browse code

pkg/kamailio/alpine: Added sqlang, rabbitmq, sqlang packages

Sergey Safarov authored on 25/11/2017 21:23:24 • Daniel-Constantin Mierla committed on 27/11/2017 07:29:40
Showing 1 changed files
... ...
@@ -9,7 +9,7 @@ pkgrel=0
9 9
 
10 10
 # If building from a git snapshot, specify the gitcommit
11 11
 # If building a proper release, leave gitcommit blank
12
-_gitcommit=c5ffc265cf83c7e329ee8d21c3bafba78b670c58
12
+_gitcommit=991fe9b28e0e201309048f3b38a135037e40357a
13 13
 
14 14
 [ ! -z "${_gitcommit}" ] && pkgver="${pkgver}.$(date +%Y%m%d)"
15 15
 [ ! -z "${_gitcommit}" ] && _suffix="-${_gitcommit:0:7}"
... ...
@@ -23,7 +23,7 @@ pkgusers="kamailio"
23 23
 pkggroups="kamailio"
24 24
 arch="all"
25 25
 license="GPL2+"
26
-depends=""
26
+depends="gawk"
27 27
 makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev perl-dev postgresql-dev python2-dev pcre-dev mariadb-dev
28 28
 	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
29 29
 	lua-dev openldap-dev libressl-dev net-snmp-dev libuuid libev-dev
... ...
@@ -179,7 +179,7 @@ _mod_list_redis="ndb_redis topos_redis"
179 179
 _mod_list_mono="app_mono"
180 180
 
181 181
 # - modules related to IMS extensions
182
-_mod_list_ims="cdp cdp_avp ims_dialog ims_auth ims_isc ims_icscf ims_qos \
182
+_mod_list_ims="cdp cdp_avp ims_dialog ims_diameter_server ims_auth ims_isc ims_icscf ims_qos \
183 183
 		ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf \
184 184
 		ims_usrloc_scscf ims_charging"
185 185
 
... ...
@@ -213,6 +213,15 @@ _mod_list_jansson="jansson janssonrpcc"
213 213
 # - modules depending on libm
214 214
 _mod_list_jsdt="app_jsdt"
215 215
 
216
+# - modules depending on sqlang
217
+_mod_list_sqlang="app_sqlang"
218
+
219
+# - modules depending on rabbitmq
220
+_mod_list_rabbitmq="rabbitmq"
221
+
222
+# - modules depending on sipdump
223
+_mod_list_sipdump="sipdump"
224
+
216 225
 
217 226
 # Alpine Specific
218 227
 _mod_list_debugger="$_mod_list_devel benchmark debugger"
... ...
@@ -228,7 +237,7 @@ for _i in db postgres sqlite dbtext mysql \
228 237
 	cpl xml unixodbc snmpstats xmpp carrierroute \
229 238
 	ldap utils tls presence lua ims outbound debugger \
230 239
 	extras json websocket authephemeral \
231
-	uuid ev memcached redis geoip2 jansson \
240
+	uuid ev memcached redis geoip2 jansson sqlang sipdump \
232 241
 	jsdt http_async kazoo rabbitmq sctp radius perl python; do
233 242
 
234 243
    subpackages="$subpackages $pkgname-$_i"
... ...
@@ -509,8 +518,22 @@ python() {
509 518
 		"$_mod_list_python"
510 519
 }
511 520
 
521
+sqlang() {
522
+	_generic_pkg "Squirrel Language (SQLang) for Kamailio" \
523
+		"$_mod_list_sqlang"
524
+}
525
+
526
+rabbitmq() {
527
+	_generic_pkg "RabbitMQ related modules for Kamailio" \
528
+		"$_mod_list_rabbitmq"
529
+}
530
+
531
+sipdump() {
532
+	_generic_pkg "This module writes SIP traffic and some associated details into local files" \
533
+		"$_mod_list_sipdump"
534
+}
512 535
 
513
-sha512sums="245411ac2445f4865cd09f56a3cfc4d10a64c9a1be90bfb35cfe80149e845c34c1a867ff661bbd9dac1c48a0416bc577b57ae6133edb69e2a2b43d3a2305ffde  kamailio-5.1.0.20170930-c5ffc26.tar.gz
536
+sha512sums="51ea5fccd27a9d3d1783cfc5596eb28ab27e34faeec3268600363f43c48a3634c3c584c479ba874fdb53b85766a0ce8fe7df0e20954c9c6514b1d9d41d9237e6  kamailio-5.1.0.20171125-991fe9b.tar.gz
514 537
 6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
515 538
 af8362201957eae6b66baf7368c9ca884024209a396d77c5c52180c9aabe13772e9c6513e59721d39503e5bb7a8c1030f5c10301ea9055bddafb7f01ee2f3076  0004-src_core_tcp_read_c.patch
516 539
 cd6e3b677d803cd78561ad14d9b2589fd35ad0096f48047fdcb4ddc7d9103871357efba3b350946844cb53dbb081210746421fc420c22ac845b90251168a628e  kamailio.initd"
Browse code

pkg/kamailio/alpine_docker: Alpine docker scripts moved to subproject

Sergey Safarov authored on 07/11/2017 21:45:27
Showing 1 changed files
... ...
@@ -2,6 +2,7 @@
2 2
 # Contributor: Michael Mason <ms13sp@gmail.com>
3 3
 # Contributor: Leonardo Arena <rnalrd@gmail.com>
4 4
 # Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
5
+
5 6
 pkgname=kamailio
6 7
 pkgver=5.1.0
7 8
 pkgrel=0
Browse code

pkg/kamailio/alpine: Removed custom kamailio.cfg, now used default

Sergey Safarov authored on 30/09/2017 09:59:33
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@ pkgrel=0
8 8
 
9 9
 # If building from a git snapshot, specify the gitcommit
10 10
 # If building a proper release, leave gitcommit blank
11
-_gitcommit=1fe5970917f21e9d69127635e04ba8ae585e2da4
11
+_gitcommit=c5ffc265cf83c7e329ee8d21c3bafba78b670c58
12 12
 
13 13
 [ ! -z "${_gitcommit}" ] && pkgver="${pkgver}.$(date +%Y%m%d)"
14 14
 [ ! -z "${_gitcommit}" ] && _suffix="-${_gitcommit:0:7}"
... ...
@@ -237,7 +237,6 @@ done
237 237
 source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
238 238
 	0001-kamdbctl.base.patch
239 239
 	0004-src_core_tcp_read_c.patch
240
-	kamailio.cfg
241 240
 	kamailio.initd
242 241
 	"
243 242
 
... ...
@@ -281,13 +280,6 @@ package() {
281 280
 	cd "$builddir"
282 281
 	make  FREERADIUS=1 -j1 install || return 1
283 282
 
284
-	# move default config to -doc package and use our own default config
285
-
286
-	mv "$pkgdir"/etc/kamailio/kamailio.cfg \
287
-		"$pkgdir"/usr/share/doc/kamailio/
288
-	install -m644 -D "$srcdir"/kamailio.cfg \
289
-		"$pkgdir"/etc/kamailio/kamailio.cfg
290
-
291 283
 	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
292 284
 	install -d -o kamailio "$pkgdir"/var/run/kamailio
293 285
 }
... ...
@@ -517,8 +509,7 @@ python() {
517 509
 }
518 510
 
519 511
 
520
-sha512sums="6b4c58fe628270f8927721813607ce080b5e257cca8ace8c7b286c77c7880be258c07f1c7fb5711449cfc1f8841468e6ca647cf2e28be7a8d3dbb316527b7198  kamailio-5.1.0.20170922-1fe5970.tar.gz
512
+sha512sums="245411ac2445f4865cd09f56a3cfc4d10a64c9a1be90bfb35cfe80149e845c34c1a867ff661bbd9dac1c48a0416bc577b57ae6133edb69e2a2b43d3a2305ffde  kamailio-5.1.0.20170930-c5ffc26.tar.gz
521 513
 6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
522 514
 af8362201957eae6b66baf7368c9ca884024209a396d77c5c52180c9aabe13772e9c6513e59721d39503e5bb7a8c1030f5c10301ea9055bddafb7f01ee2f3076  0004-src_core_tcp_read_c.patch
523
-c1abf69b48847dc8c7ab0d11ef9adb531aa4635f9d44db6933981edc5a47df374664fb24867b19aa64abbcc9777bf1cd0360d9aea54e27b081065928c61e0f0b  kamailio.cfg
524 515
 cd6e3b677d803cd78561ad14d9b2589fd35ad0096f48047fdcb4ddc7d9103871357efba3b350946844cb53dbb081210746421fc420c22ac845b90251168a628e  kamailio.initd"
Browse code

pkg/kamailio/alpine: Packaged db_berkeley, app_python, app_perl, db_perlvdb, topos_redis

Sergey Safarov authored on 23/09/2017 10:35:20
Showing 1 changed files
... ...
@@ -23,7 +23,7 @@ pkggroups="kamailio"
23 23
 arch="all"
24 24
 license="GPL2+"
25 25
 depends=""
26
-makedepends="bison flex freeradius-client-dev expat-dev lksctp-tools-dev postgresql-dev pcre-dev mariadb-dev
26
+makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev perl-dev postgresql-dev python2-dev pcre-dev mariadb-dev
27 27
 	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
28 28
 	lua-dev openldap-dev libressl-dev net-snmp-dev libuuid libev-dev
29 29
 	jansson-dev json-c-dev libevent-dev linux-headers libmemcached-dev
... ...
@@ -57,7 +57,7 @@ _mod_list_extras="auth_diameter call_control cnxcc dmq domainpolicy log_custom \
57 57
 		auth_xkeys"
58 58
 
59 59
 # - common modules depending on database
60
-_mod_list_db="acc alias_db auth_db avpops cfg_db db_flatstore \
60
+_mod_list_db="acc alias_db auth_db avpops cfg_db db_berkeley db_flatstore \
61 61
 		db_cluster dialog dispatcher domain drouting group \
62 62
 		htable imc matrix mohqueue msilo mtree p_usrloc pdt permissions \
63 63
 		pipelimit prefix_route registrar sipcapture siptrace speeddial \
... ...
@@ -172,7 +172,7 @@ _mod_list_oracle="db_oracle"
172 172
 _mod_list_json="json jsonrpcc jsonrpcs"
173 173
 
174 174
 # - modules depending on redis library
175
-_mod_list_redis="ndb_redis"
175
+_mod_list_redis="ndb_redis topos_redis"
176 176
 
177 177
 # - modules depending on mono library
178 178
 _mod_list_mono="app_mono"
... ...
@@ -228,7 +228,7 @@ for _i in db postgres sqlite dbtext mysql \
228 228
 	ldap utils tls presence lua ims outbound debugger \
229 229
 	extras json websocket authephemeral \
230 230
 	uuid ev memcached redis geoip2 jansson \
231
-	jsdt http_async kazoo rabbitmq sctp radius; do
231
+	jsdt http_async kazoo rabbitmq sctp radius perl python; do
232 232
 
233 233
    subpackages="$subpackages $pkgname-$_i"
234 234
    eval "_modules=\"\$_modules \$_mod_list_$_i\""
... ...
@@ -506,6 +506,16 @@ sctp() {
506 506
 		"$_mod_list_sctp"
507 507
 }
508 508
 
509
+perl() {
510
+	_generic_pkg "Perl extensions and database driver for Kamailio" \
511
+		"$_mod_list_perl"
512
+}
513
+
514
+python() {
515
+	_generic_pkg "Python extensions for Kamailio" \
516
+		"$_mod_list_python"
517
+}
518
+
509 519
 
510 520
 sha512sums="6b4c58fe628270f8927721813607ce080b5e257cca8ace8c7b286c77c7880be258c07f1c7fb5711449cfc1f8841468e6ca647cf2e28be7a8d3dbb316527b7198  kamailio-5.1.0.20170922-1fe5970.tar.gz
511 521
 6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
Browse code

pkg/kamailio/alpine: Packaged rabbitmq, sctp, radius modules

Sergey Safarov authored on 22/09/2017 22:07:50
Showing 1 changed files
... ...
@@ -23,7 +23,7 @@ pkggroups="kamailio"
23 23
 arch="all"
24 24
 license="GPL2+"
25 25
 depends=""
26
-makedepends="bison flex expat-dev postgresql-dev pcre-dev mariadb-dev
26
+makedepends="bison flex freeradius-client-dev expat-dev lksctp-tools-dev postgresql-dev pcre-dev mariadb-dev
27 27
 	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
28 28
 	lua-dev openldap-dev libressl-dev net-snmp-dev libuuid libev-dev
29 29
 	jansson-dev json-c-dev libevent-dev linux-headers libmemcached-dev
... ...
@@ -228,7 +228,7 @@ for _i in db postgres sqlite dbtext mysql \
228 228
 	ldap utils tls presence lua ims outbound debugger \
229 229
 	extras json websocket authephemeral \
230 230
 	uuid ev memcached redis geoip2 jansson \
231
-	jsdt http_async kazoo; do
231
+	jsdt http_async kazoo rabbitmq sctp radius; do
232 232
 
233 233
    subpackages="$subpackages $pkgname-$_i"
234 234
    eval "_modules=\"\$_modules \$_mod_list_$_i\""
... ...
@@ -273,13 +273,13 @@ build() {
273 273
 		DESTDIR="$pkgdir" \
274 274
 		cfg_prefix="$pkgdir" \
275 275
 		cfg
276
-	make EMBEDDED_UTF8_DECODE=1 STUN=1 \
276
+	make EMBEDDED_UTF8_DECODE=1 STUN=1 FREERADIUS=1 \
277 277
 		all || return 1
278 278
 }
279 279
 
280 280
 package() {
281 281
 	cd "$builddir"
282
-	make -j1 install || return 1
282
+	make  FREERADIUS=1 -j1 install || return 1
283 283
 
284 284
 	# move default config to -doc package and use our own default config
285 285
 
... ...
@@ -496,6 +496,16 @@ kazoo() {
496 496
 		"$_mod_list_kazoo"
497 497
 }
498 498
 
499
+radius() {
500
+	_generic_pkg "RADIUS modules for Kamailio" \
501
+		"$_mod_list_radius"
502
+}
503
+
504
+sctp() {
505
+	_generic_pkg "SCTP transport for Kamailio" \
506
+		"$_mod_list_sctp"
507
+}
508
+
499 509
 
500 510
 sha512sums="6b4c58fe628270f8927721813607ce080b5e257cca8ace8c7b286c77c7880be258c07f1c7fb5711449cfc1f8841468e6ca647cf2e28be7a8d3dbb316527b7198  kamailio-5.1.0.20170922-1fe5970.tar.gz
501 511
 6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
Browse code

pkg/kamailio/alpine: Removed unnecessary patches

Sergey Safarov authored on 22/09/2017 09:12:46
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@ pkgrel=0
8 8
 
9 9
 # If building from a git snapshot, specify the gitcommit
10 10
 # If building a proper release, leave gitcommit blank
11
-#_gitcommit=65ed9b065c497266a4ecd9760e7c168c69b4c6e8
11
+_gitcommit=1fe5970917f21e9d69127635e04ba8ae585e2da4
12 12
 
13 13
 [ ! -z "${_gitcommit}" ] && pkgver="${pkgver}.$(date +%Y%m%d)"
14 14
 [ ! -z "${_gitcommit}" ] && _suffix="-${_gitcommit:0:7}"
... ...
@@ -236,7 +236,6 @@ done
236 236
 
237 237
 source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
238 238
 	0001-kamdbctl.base.patch
239
-	0003-src_modules_tls_tls_init_c.patch
240 239
 	0004-src_core_tcp_read_c.patch
241 240
 	kamailio.cfg
242 241
 	kamailio.initd
... ...
@@ -498,9 +497,8 @@ kazoo() {
498 497
 }
499 498
 
500 499
 
501
-sha512sums="e31c99c4300c2db6d324ca4253161bd55d634ec854809e75c3058bdea91caea789ff4b7022bfc60c1c38212d359d960b00908c6e257ce3de379082bc430d7794  kamailio-5.1.0.20170920-65ed9b0.tar.gz
500
+sha512sums="6b4c58fe628270f8927721813607ce080b5e257cca8ace8c7b286c77c7880be258c07f1c7fb5711449cfc1f8841468e6ca647cf2e28be7a8d3dbb316527b7198  kamailio-5.1.0.20170922-1fe5970.tar.gz
502 501
 6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db  0001-kamdbctl.base.patch
503
-384216758a9c95f019cbf9b548533ae88e2069a9f1f1730c51a36d1b8fe6b7c41ec51196eccaaaf8a70fcb74443a5cf94ee62cfe39772d7b4cda2aecce25e128  0003-src_modules_tls_tls_init_c.patch
504 502
 af8362201957eae6b66baf7368c9ca884024209a396d77c5c52180c9aabe13772e9c6513e59721d39503e5bb7a8c1030f5c10301ea9055bddafb7f01ee2f3076  0004-src_core_tcp_read_c.patch
505 503
 c1abf69b48847dc8c7ab0d11ef9adb531aa4635f9d44db6933981edc5a47df374664fb24867b19aa64abbcc9777bf1cd0360d9aea54e27b081065928c61e0f0b  kamailio.cfg
506 504
 cd6e3b677d803cd78561ad14d9b2589fd35ad0096f48047fdcb4ddc7d9103871357efba3b350946844cb53dbb081210746421fc420c22ac845b90251168a628e  kamailio.initd"
Browse code

pkg/kamailio/alpine: Added packaging script for Alpine dist.

Sergey Safarov authored on 20/09/2017 09:56:59
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,506 @@
1
+# Contributor: Łukasz Jendrysik <scadu@yandex.com>
2
+# Contributor: Michael Mason <ms13sp@gmail.com>
3
+# Contributor: Leonardo Arena <rnalrd@gmail.com>
4
+# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
5
+pkgname=kamailio
6
+pkgver=5.1.0
7
+pkgrel=0
8
+
9
+# If building from a git snapshot, specify the gitcommit
10
+# If building a proper release, leave gitcommit blank
11
+#_gitcommit=65ed9b065c497266a4ecd9760e7c168c69b4c6e8
12
+
13
+[ ! -z "${_gitcommit}" ] && pkgver="${pkgver}.$(date +%Y%m%d)"
14
+[ ! -z "${_gitcommit}" ] && _suffix="-${_gitcommit:0:7}"
15
+[ ! -z "${_gitcommit}" ] && builddir="$srcdir/$pkgname-$_gitcommit" || builddir="$srcdir/$pkgname-$pkgver"
16
+[ -z "${_gitcommit}" ] && _gitcommit="${pkgver}"
17
+
18
+pkgdesc="Open Source SIP Server"
19
+url="http://www.kamailio.org/"
20
+arch="all"
21
+pkgusers="kamailio"
22
+pkggroups="kamailio"
23
+arch="all"
24
+license="GPL2+"
25
+depends=""
26
+makedepends="bison flex expat-dev postgresql-dev pcre-dev mariadb-dev
27
+	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
28
+	lua-dev openldap-dev libressl-dev net-snmp-dev libuuid libev-dev
29
+	jansson-dev json-c-dev libevent-dev linux-headers libmemcached-dev
30
+	rabbitmq-c-dev hiredis-dev libmaxminddb-dev libunistring-dev"
31
+install="$pkgname.pre-install $pkgname.pre-upgrade"
32
+
33
+# See Makefile.groups for the list of recommended modules for
34
+# each package.  What follows is a simplified version of Makefile.groups
35
+#
36
+# Alpine specific changes:
37
+#
38
+# _mod_list_debugger is not defined in the orginal
39
+#
40
+# Move avp from _mod_list_extras to _mod_list_basic, so that we can create
41
+# a kamailio-extras package
42
+#
43
+# Remove db_text from _mod_list_db because we create a separate dbtext package
44
+#
45
+# - basic used modules, with no extra dependency (widespread usage)
46
+_mod_list_basic="avp async auth benchmark blst cfg_rpc cfgt cfgutils corex counters \
47
+		ctl debugger diversion enum exec gzcompress ipops kex mangler \
48
+		maxfwd mediaproxy mqueue \
49
+		nat_traversal nathelper path pike pv ratelimit rr rtimer \
50
+		rtpproxy sanity sdpops siputils sl smsops statsc statistics \
51
+		textops textopsx tm tmx topoh topos xlog rtpengine stun sipt"
52
+
53
+# - extra used modules, with no extra dependency
54
+_mod_list_extras="auth_diameter call_control cnxcc dmq domainpolicy log_custom \
55
+		msrp pdb qos sca seas sms sst timer tmrec tsilo uac_redirect \
56
+		xhttp xhttp_rpc xprint nosip dmq_usrloc statsd rtjson tcpops \
57
+		auth_xkeys"
58
+
59
+# - common modules depending on database
60
+_mod_list_db="acc alias_db auth_db avpops cfg_db db_flatstore \
61
+		db_cluster dialog dispatcher domain drouting group \
62
+		htable imc matrix mohqueue msilo mtree p_usrloc pdt permissions \
63
+		pipelimit prefix_route registrar sipcapture siptrace speeddial \
64
+		sqlops uac uri_db userblacklist usrloc"
65
+
66
+# - common modules depending on database, using UID db schema
67
+_mod_list_dbuid="db2_ops uid_auth_db uid_avp_db uid_domain uid_gflags \
68
+		uid_uri_db"
69
+
70
+# - modules for devel purposes
71
+_mod_list_devel="malloc_test print print_lib"
72
+
73
+# - modules depending on pcre3 library
74
+_mod_list_pcre="dialplan lcr regex"
75
+
76
+# - modules depending on radius client library
77
+_mod_list_radius="acc_radius auth_radius misc_radius peering"
78
+
79
+# - modules depending on ldap client library
80
+_mod_list_ldap="db2_ldap h350 ldap"
81
+
82
+# - modules depending on mysql client library
83
+_mod_list_mysql="db_mysql"
84
+
85
+# - modules depending on postgres client library
86
+_mod_list_postgres="db_postgres"
87
+
88
+# - modules depending on unixodbc library
89
+_mod_list_unixodbc="db_unixodbc"
90
+
91
+# - modules depending on mysql cassandra library
92
+_mod_list_cassandra="db_cassandra ndb_cassandra"
93
+
94
+# - modules depending on xml2 library
95
+_mod_list_cpl="cplc"
96
+
97
+# - modules depending on xml2 library
98
+_mod_list_xml="xhttp_pi xmlrpc xmlops"
99
+
100
+# - modules depending on net-snmp library
101
+_mod_list_snmpstats="snmpstats"
102
+
103
+# - modules depending on expat library
104
+_mod_list_xmpp="xmpp"
105
+
106
+# - modules depending on confuse library
107
+_mod_list_carrierroute="carrierroute"
108
+
109
+# - modules depending on bdb (db4) library
110
+_mod_list_berkeley="db_berkeley"
111
+
112
+# - modules depending on curl library
113
+_mod_list_utils="utils http_client"
114
+
115
+# - async http_async_client
116
+_mod_list_http_async="http_async_client"
117
+
118
+# - modules depending on purple library
119
+_mod_list_purple="purple"
120
+
121
+# - modules depending on memcache library
122
+_mod_list_memcached="memcached"
123
+
124
+# - modules depending on openssl library
125
+_mod_list_tls="auth_identity crypto tls"
126
+
127
+# - modules depending on openssl library
128
+_mod_list_outbound="outbound"
129
+
130
+# - modules depending on unistring library
131
+_mod_list_websocket="websocket"
132
+
133
+# - modules depending on libval-threads libcrypto libsres libpthread
134
+_mod_list_dnssec="dnssec"
135
+
136
+# - modules depending on libsctp
137
+_mod_list_sctp="sctp"
138
+
139
+# - modules depending on openssl library
140
+_mod_list_authephemeral="auth_ephemeral"
141
+
142
+# - modules related to SIMPLE presence extensions
143
+_mod_list_presence="presence presence_conference presence_dialoginfo \
144
+			presence_mwi presence_profile presence_reginfo \
145
+			presence_xml \
146
+			pua pua_bla pua_dialoginfo pua_reginfo \
147
+			pua_rpc pua_usrloc pua_xmpp \
148
+			rls xcap_client xcap_server"
149
+
150
+# - modules depending on lua library
151
+_mod_list_lua="app_lua"
152
+
153
+# - modules depending on perl library
154
+_mod_list_perl="app_perl db_perlvdb"
155
+
156
+# - modules depending on python library
157
+_mod_list_python="app_python"
158
+
159
+# - modules depending on rabbitmq
160
+_mod_list_rabbitmq="rabbitmq"
161
+
162
+# - modules depending on geoip2 library
163
+_mod_list_geoip2="geoip2"
164
+
165
+# - modules depending on sqlite library
166
+_mod_list_sqlite="db_sqlite"
167
+
168
+# - modules depending on oracle library
169
+_mod_list_oracle="db_oracle"
170
+
171
+# - modules depending on json library
172
+_mod_list_json="json jsonrpcc jsonrpcs"
173
+
174
+# - modules depending on redis library
175
+_mod_list_redis="ndb_redis"
176
+
177
+# - modules depending on mono library
178
+_mod_list_mono="app_mono"
179
+
180
+# - modules related to IMS extensions
181
+_mod_list_ims="cdp cdp_avp ims_dialog ims_auth ims_isc ims_icscf ims_qos \
182
+		ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf \
183
+		ims_usrloc_scscf ims_charging"
184
+
185
+# - modules depending on osp toolkit library
186
+_mod_list_osp="osp"
187
+
188
+# - modules depending on java library
189
+_mod_list_java="app_java"
190
+
191
+# - modules depending on iptables library
192
+_mod_list_iptrtpproxy="iptrtpproxy"
193
+
194
+# - modules depending on gzip library
195
+_mod_list_gzcompress="gzcompress"
196
+
197
+# - modules depending on uuid library
198
+_mod_list_uuid="uuid"
199
+
200
+# - modules depending on ev library
201
+_mod_list_ev="evapi"
202
+
203
+# - modules depending on kazoo/rabbitmq
204
+_mod_list_kazoo="kazoo"
205
+
206
+# - modules depending on mongodb
207
+_mod_list_mongodb="db_mongodb ndb_mongodb"
208
+
209
+# - modules depending on jansson library
210
+_mod_list_jansson="jansson janssonrpcc"
211
+
212
+# - modules depending on libm
213
+_mod_list_jsdt="app_jsdt"
214
+
215
+
216
+# Alpine Specific
217
+_mod_list_debugger="$_mod_list_devel benchmark debugger"
218
+
219
+# Standard modules in main pkg
220
+_module_group_kstandard="$_mod_list_basic $_mod_list_dbuid $_mod_list_pcre"
221
+
222
+# END Makefile.groups #############################################################
223
+
224
+subpackages="$pkgname-doc $pkgname-dbg"
225
+_modules="$_module_group_kstandard"
226
+for _i in db postgres sqlite dbtext mysql \
227
+	cpl xml unixodbc snmpstats xmpp carrierroute \
228
+	ldap utils tls presence lua ims outbound debugger \
229
+	extras json websocket authephemeral \
230
+	uuid ev memcached redis geoip2 jansson \
231
+	jsdt http_async kazoo; do
232
+
233
+   subpackages="$subpackages $pkgname-$_i"
234
+   eval "_modules=\"\$_modules \$_mod_list_$_i\""
235
+done
236
+
237
+source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
238
+	0001-kamdbctl.base.patch
239
+	0003-src_modules_tls_tls_init_c.patch
240
+	0004-src_core_tcp_read_c.patch
241
+	kamailio.cfg
242
+	kamailio.initd
243
+	"
244
+
245
+snapshot() {
246
+        if [ ! -f "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz ]; then
247
+            wget -O "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz
248
+        fi
249
+        SHA512SUM=$(sha512sum "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz | sed -e "s:$SRCDEST/::")
250
+        sed -i -e "s/^\(sha512sums=.\).*/\1$SHA512SUM/" APKBUILD
251
+}
252
+
253
+prepare() {
254
+	default_prepare
255
+	cd "$builddir"
256
+
257
+	cd utils/kamctl/
258
+	sed -i -e 's:/var/run/kamailio.pid:/var/run/kamailio/kamailio.pid:g' \
259
+		kamctl.base kamctlrc || return 1
260
+	# we actually dont need bash
261
+	sed -i -e 's:/bin/bash:/bin/sh:' kamctl kamdbctl \
262
+		|| return 1
263
+}
264
+
265
+build() {
266
+	cd "$builddir"
267
+	make FLAVOUR=kamailio STUN=1 \
268
+		PREFIX=/usr \
269
+		CC_EXTRA_OPTS="$CFLAGS -D_GNU_SOURCE" \
270
+		cfg_target=/etc/kamailio/ \
271
+		run_prefix="" \
272
+		include_modules="$_modules" \
273
+		LIBDIR=lib \
274
+		DESTDIR="$pkgdir" \
275
+		cfg_prefix="$pkgdir" \
276
+		cfg
277
+	make EMBEDDED_UTF8_DECODE=1 STUN=1 \
278
+		all || return 1
279
+}
280
+
281
+package() {
282
+	cd "$builddir"
283
+	make -j1 install || return 1
284
+
285
+	# move default config to -doc package and use our own default config
286
+
287
+	mv "$pkgdir"/etc/kamailio/kamailio.cfg \
288
+		"$pkgdir"/usr/share/doc/kamailio/
289
+	install -m644 -D "$srcdir"/kamailio.cfg \
290
+		"$pkgdir"/etc/kamailio/kamailio.cfg
291
+
292
+	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
293
+	install -d -o kamailio "$pkgdir"/var/run/kamailio
294
+}
295
+
296
+_mv_mod() {
297
+	local moddir=usr/lib/kamailio/modules i=
298
+	mkdir -p "$subpkgdir"/$moddir
299
+	for i in $@; do
300
+		mv "$pkgdir"/$moddir/$i.so "$subpkgdir"/$moddir/ || return 1
301
+	done