summaryrefslogtreecommitdiff
path: root/pcr/kamailio/PKGBUILD
blob: aeceecc36f869063bd3bddff85e5496c8f0b304a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# Maintainer (AUR): Josef Miegl <josef@miegl.cz>
# Contributor (AUR): Xavier Devlamynck <magicrhesus@ouranos.be>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgbase=kamailio
pkgname=('kamailio' 'kamailio-autheph-modules' 'kamailio-berkeley-modules' 'kamailio-cnxcc-modules'
         'kamailio-cpl-modules' 'kamailio-dnssec-modules' 'kamailio-erlang-modules' 'kamailio-extra-modules'
         'kamailio-geoip-modules' 'kamailio-geoip2-modules' 'kamailio-ims-modules' 'kamailio-json-modules'
         'kamailio-kazoo-modules' 'kamailio-ldap-modules' 'kamailio-lua-modules' 'kamailio-memcached-modules'
         'kamailio-mongodb-modules' 'kamailio-mono-modules' 'kamailio-mysql-modules' 'kamailio-outbound-modules'
         'kamailio-perl-modules' 'kamailio-phonenum-modules' 'kamailio-postgres-modules'
         'kamailio-presence-modules' 'kamailio-python-modules' 'kamailio-python3-modules'
         'kamailio-rabbitmq-modules' 'kamailio-radius-modules' 'kamailio-redis-modules' 'kamailio-ruby-modules'
         'kamailio-sctp-modules' 'kamailio-snmpstats-modules' 'kamailio-sqlite-modules'
         'kamailio-systemd-modules' 'kamailio-tls-modules' 'kamailio-unixodbc-modules' 'kamailio-utils-modules'
         'kamailio-websocket-modules' 'kamailio-xml-modules' 'kamailio-xmpp-modules')
pkgver=5.2.1
pkgrel=2
pkgdesc="Rock solid SIP server"
url="http://www.kamailio.org/"
license=('GPL2')
arch=('i686' 'x86_64' 'armv7h')
makedepends=('flex' 'bison' 'docbook2x' 'pcre' 'python2' 'python' 'openssl' 'db' 'libxml2' 'hiredis' 'libevent'
             'dnssec-tools' 'expat' 'libunistring' 'libev' 'jansson' 'geoip' 'libmaxminddb' 'curl' 'unixodbc'
             'json-c' 'librabbitmq-c' 'libldap' 'lua' 'libmemcached' 'mongo-c-driver' 'snappy' 'mono'
             'mariadb-clients' 'perl' 'erlang' 'libphonenumber' 'postgresql' 'sqlite' 'net-snmp' 'lksctp-tools'
             'ruby' 'freeradius-client')
source=("http://www.kamailio.org/pub/${pkgbase}/${pkgver}/src/${pkgbase}-${pkgver}_src.tar.gz"
        "${pkgname}.service")
sha256sums=('95d2158f97c76124a381364d99de1420f193275c5a1c9f88489c6409702f2c8f'
            '893d712dc2eb455865a795624ca388b4fb40a3faf838fcde16861dd710e7892c')

prepare() {
  cd "${pkgbase}-${pkgver}"
  sed -i 's/bin_dir = sbin\//bin_dir = bin\//g' src/Makefile.defs
}

build() {
  cd "${pkgbase}-${pkgver}"

  make FLAVOUR=kamailio STUN=1 \
    PREFIX=/usr \
    CC_EXTRA_OPTS="$CFLAGS -D_GNU_SOURCE" \
    LD_EXTRA_OPTS="$LDFLAGS" \
    cfg_target=/etc/kamailio/ \
    run_prefix="" \
    group_include="kstandard" \
    LIBDIR=lib \
    DESTDIR="${pkgdir}" \
    cfg_prefix="${pkgdir}" \
    cfg

  make -j1 EMBEDDED_UTF8_DECODE=1 STUN=1 FREERADIUS=1 all


  modules="kradius kldap kmysql kpostgres kunixodbc kxml kperl kcpl kxmpp kberkeley kutils kmemcached \
           ktls kwebsocket ksnmpstats kpresence klua kpython kpython3 kruby kgeoip ksqlite kjson \
           kredis kmono kims koutbound kdnssec ksctp kautheph kgzcompress kuuid kev kkazoo kmongodb kcnxcc \
           kjansson kgeoip2 kerlang ksystemd khttp_async krabbitmq kphonenum"

  for module in ${modules}; do
    make EMBEDDED_UTF8_DECODE=1 STUN=1 FREERADIUS=1 every-module group_include=${module}
  done
}

package_kamailio() {
  depends=('pcre' 'python')
  backup=('etc/kamailio/kamctlrc' 'etc/kamailio/kamailio.cfg')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR="${pkgdir}" cfg_prefix="${pkgdir}" install group_include="kstandard"
  install -Dm0644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
}

package_kamailio-autheph-modules() {
  pkgdesc="Ephemeral authentication module for Kamailio"
  depends=('kamailio' 'openssl')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kautheph"
}

package_kamailio-berkeley-modules() {
  pkgdesc="Berkeley database module for Kamailio"
  depends=('kamailio' 'db')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kberkeley"
}

package_kamailio-cnxcc-modules() {
  pkgdesc="cnxcc call charging control module for Kamailio"
  depends=('kamailio' 'hiredis' 'libevent')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kcnxcc"
}

package_kamailio-cpl-modules() {
  pkgdesc="CPL (Call Processing Language) interpreter for Kamailio"
  depends=('kamailio' 'libxml2')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kcpl"
}

package_kamailio-dnssec-modules() {
  pkgdesc="DNSSEC module for Kamailio"
  depends=('kamailio' 'dnssec-tools')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kdnssec"
}

package_kamailio-erlang-modules() {
  pkgdesc="Erlang node interaction module for Kamailio"
  depends=('kamailio')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kerlang"
}

package_kamailio-extra-modules() {
  pkgdesc="gzcompress, ev, uuid, jansson and http_async modules for Kamailio"
  depends=('kamailio' 'libevent' 'libev' 'jansson' 'curl')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kgzcompress kev kuuid kjansson khttp_async"
}

package_kamailio-geoip-modules() {
  pkgdesc="GeoIP module for Kamailio"
  depends=('kamailio' 'geoip')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kgeoip"
}

package_kamailio-geoip2-modules() {
  pkgdesc="GeoIP2 module for Kamailio"
  depends=('kamailio' 'libmaxminddb')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kgeoip2"
}

package_kamailio-ims-modules() {
  pkgdesc="Various Diameter interfaces and modules for Kamailio to run as an IMS core"
  depends=('kamailio' 'libmnl' 'libxml2')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kims"
}

package_kamailio-json-modules() {
  pkgdesc="JSON parser module for Kamailio"
  depends=('kamailio' 'libevent' 'json-c')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kjson"
}

package_kamailio-kazoo-modules() {
  pkgdesc="Kazoo application server integration module for Kamailio"
  depends=('kamailio' 'libevent' 'json-c' 'librabbitmq-c')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kkazoo"
}

package_kamailio-ldap-modules() {
  pkgdesc="Ldap and h350 modules for Kamailio"
  depends=('kamailio' 'libldap')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kldap"
}

package_kamailio-lua-modules() {
  pkgdesc="Lua extension module for Kamailio"
  depends=('kamailio' 'lua')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="klua"
}

package_kamailio-memcached-modules() {
  pkgdesc="memcached module for Kamailio"
  depends=('kamailio' 'libmemcached')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kmemcached"
}

package_kamailio-mongodb-modules() {
  pkgdesc="Mongodb database driver and non-db connector for Kamailio"
  depends=('kamailio' 'mongo-c-driver' 'openssl' 'snappy')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kmongodb"
}

package_kamailio-mono-modules() {
  pkgdesc="Mono extension module for Kamailio"
  depends=('kamailio' 'mono')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kmono"
}

package_kamailio-mysql-modules() {
  pkgdesc="MySQL database driver for Kamailio"
  depends=('kamailio' 'mariadb-clients')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kmysql"
}

package_kamailio-outbound-modules() {
  pkgdesc="SIP outbound extension module for Kamailio"
  depends=('kamailio' 'openssl')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="koutbound"
}

package_kamailio-perl-modules() {
  pkgdesc="Perl modules for Kamailio"
  depends=('kamailio' 'perl')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kperl"
}

package_kamailio-phonenum-modules() {
  pkgdesc="libphonenumber module for Kamailio"
  depends=('kamailio' 'libphonenumber')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kphonenum"
}

package_kamailio-postgres-modules() {
  pkgdesc="PostgreSQL database driver for Kamailio"
  depends=('kamailio' 'postgresql')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kpostgres"
}

package_kamailio-presence-modules() {
  pkgdesc="presence modules for Kamailio"
  depends=('kamailio' 'libxml2' 'curl')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kpresence"
}

package_kamailio-python-modules() {
  pkgdesc="Python2 extension module for Kamailio"
  depends=('kamailio' 'python2')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kpython"
}

package_kamailio-python3-modules() {
  pkgdesc="Python3 extension module for Kamailio"
  depends=('kamailio' 'python')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kpython3"
}

package_kamailio-rabbitmq-modules() {
  pkgdesc="RabbitMQ module for Kamailio"
  depends=('kamailio' 'librabbitmq-c')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="krabbitmq"
}

package_kamailio-radius-modules() {
  pkgdesc="RADIUS modules for Kamailio"
  depends=('kamailio' 'freeradius-client')
  backup=('etc/kamailio/dictionary.kamailio')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" FREERADIUS=1 install-modules-all group_include="kradius"
}

package_kamailio-redis-modules() {
  pkgdesc="Redis NOSQL database driver for Kamailio"
  depends=('kamailio' 'hiredis')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kredis"
}

package_kamailio-ruby-modules() {
  pkgdesc="Ruby extension module for Kamailio"
  depends=('kamailio' 'ruby')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kruby"
}

package_kamailio-sctp-modules() {
  pkgdesc="SCTP SIP transport module for Kamailio"
  depends=('kamailio' 'lksctp-tools')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="ksctp"
}

package_kamailio-snmpstats-modules() {
  pkgdesc="snmpstats module for Kamailio"
  depends=('kamailio' 'net-snmp')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="ksnmpstats"
}

package_kamailio-sqlite-modules() {
  pkgdesc="SQLite database driver for Kamailio"
  depends=('kamailio' 'sqlite')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="ksqlite"
}

package_kamailio-systemd-modules() {
  pkgdesc="systemd modules for Kamailio"
  depends=('kamailio')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="ksystemd"
}

package_kamailio-tls-modules() {
  pkgdesc="TLS modules for Kamailio"
  depends=('kamailio' 'openssl' 'curl')
  backup=('etc/kamailio/tls.cfg')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="ktls"
}

package_kamailio-unixodbc-modules() {
  pkgdesc="unixODBC database driver for Kamailio"
  depends=('kamailio' 'unixodbc' 'libunistring')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kunixodbc"
}

package_kamailio-utils-modules() {
  pkgdesc="Utility modules for Kamailio"
  depends=('kamailio' 'libxml2' 'curl')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kutils"
}

package_kamailio-websocket-modules() {
  pkgdesc="WebSocket modules for Kamailio"
  depends=('kamailio' 'openssl' 'libunistring')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kwebsocket"
}

package_kamailio-xml-modules() {
  pkgdesc="xml modules for Kamailio"
  depends=('kamailio' 'libxml2')
  backup=('etc/kamailio/pi_framework.xml')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kxml"
}

package_kamailio-xmpp-modules() {
  pkgdesc="SIP to XMPP IM translator module for Kamailio"
  depends=('kamailio' 'expat')
  cd "${pkgbase}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} cfg_prefix="${pkgdir}" install-modules-all group_include="kxmpp"
}

# vim:set ts=2 sw=2 et: