diff options
Diffstat (limited to 'main/kamailio/APKBUILD')
-rw-r--r-- | main/kamailio/APKBUILD | 118 |
1 files changed, 70 insertions, 48 deletions
diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD index 0abfa469e1..c5e5efc370 100644 --- a/main/kamailio/APKBUILD +++ b/main/kamailio/APKBUILD @@ -2,19 +2,19 @@ # Contributor: Michael Mason <ms13sp@gmail.com> # Contributor: Leonardo Arena <rnalrd@gmail.com> # Maintainer: Nathan Angelacos <nangel@alpinelinux.org> + pkgname=kamailio +pkgver=5.1.2 +pkgrel=0 # If building from a git snapshot, specify the gitcommit -# run "abuild snapshot", then abuild as normal # If building a proper release, leave gitcommit blank -#_gitcommit=e27802533cee -_giturl="git://github.com/$pkgname/$pkgname.git" -_gittag=HEAD - +#_gitcommit=991fe9b28e0e201309048f3b38a135037e40357a -pkgver=5.0.6 -pkgrel=4 -[ -z "${_gitcommit}" ] && _suffix="_src" || _suffix="-${_gitcommit}" +[ ! -z "${_gitcommit}" ] && pkgver="${pkgver}.$(date +%Y%m%d)" +[ ! -z "${_gitcommit}" ] && _suffix="-${_gitcommit:0:7}" +[ ! -z "${_gitcommit}" ] && builddir="$srcdir/$pkgname-$_gitcommit" || builddir="$srcdir/$pkgname-$pkgver" +[ -z "${_gitcommit}" ] && _gitcommit="${pkgver}" pkgdesc="Open Source SIP Server" url="http://www.kamailio.org/" @@ -23,8 +23,8 @@ pkgusers="kamailio" pkggroups="kamailio" arch="all" license="GPL-2.0-or-later" -depends="" -makedepends="bison flex expat-dev postgresql-dev pcre-dev mariadb-connector-c-dev +depends="gawk" +makedepends="bison db-dev flex freeradius-client-dev expat-dev lksctp-tools-dev perl-dev postgresql-dev python2-dev pcre-dev mariadb-dev libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev lua-dev openldap-dev libressl-dev net-snmp-dev libuuid libev-dev jansson-dev json-c-dev libevent-dev linux-headers libmemcached-dev @@ -58,7 +58,7 @@ _mod_list_extras="auth_diameter call_control cnxcc dmq domainpolicy log_custom \ auth_xkeys" # - common modules depending on database -_mod_list_db="acc alias_db auth_db avpops cfg_db db_flatstore \ +_mod_list_db="acc alias_db auth_db avpops cfg_db db_berkeley db_flatstore \ db_cluster dialog dispatcher domain drouting group \ htable imc matrix mohqueue msilo mtree p_usrloc pdt permissions \ pipelimit prefix_route registrar sipcapture siptrace speeddial \ @@ -173,13 +173,13 @@ _mod_list_oracle="db_oracle" _mod_list_json="json jsonrpcc jsonrpcs" # - modules depending on redis library -_mod_list_redis="ndb_redis" +_mod_list_redis="ndb_redis topos_redis" # - modules depending on mono library _mod_list_mono="app_mono" # - modules related to IMS extensions -_mod_list_ims="cdp cdp_avp ims_dialog ims_auth ims_isc ims_icscf ims_qos \ +_mod_list_ims="cdp cdp_avp ims_dialog ims_diameter_server ims_auth ims_isc ims_icscf ims_qos \ ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf \ ims_usrloc_scscf ims_charging" @@ -213,6 +213,15 @@ _mod_list_jansson="jansson janssonrpcc" # - modules depending on libm _mod_list_jsdt="app_jsdt" +# - modules depending on sqlang +_mod_list_sqlang="app_sqlang" + +# - modules depending on rabbitmq +_mod_list_rabbitmq="rabbitmq" + +# - modules depending on sipdump +_mod_list_sipdump="sipdump" + # Alpine Specific _mod_list_debugger="$_mod_list_devel benchmark debugger" @@ -228,41 +237,30 @@ for _i in db postgres sqlite dbtext mysql \ cpl xml unixodbc snmpstats xmpp carrierroute \ ldap utils tls presence lua ims outbound debugger \ extras json websocket authephemeral \ - uuid ev memcached redis geoip2 jansson \ - jsdt http_async kazoo; do + uuid ev memcached redis geoip2 jansson sqlang sipdump \ + jsdt http_async kazoo rabbitmq sctp radius perl python; do subpackages="$subpackages $pkgname-$_i" eval "_modules=\"\$_modules \$_mod_list_$_i\"" done -source="http://www.kamailio.org/pub/kamailio/$pkgver/src/${pkgname}-${pkgver}${_suffix}.tar.gz +source="${pkgname}-${pkgver}${_suffix}.tar.gz::https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz 0001-kamdbctl.base.patch - 0002-remove-spurious-execinfo.patch - 0003-src_modules_tls_tls_init_c.patch 0004-src_core_tcp_read_c.patch - kamailio.cfg kamailio.initd " snapshot() { - mkdir -p "$srcdir" - cd "${SRCDEST:-$srcdir}" - if ! [ -d $pkgname.git ]; then - git clone --bare $_giturl || return 1 - cd $pkgname.git - else - cd $pkgname.git - git fetch || return 1 + if [ ! -f "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz ]; then + wget -O "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz https://github.com/kamailio/$pkgname/archive/$_gitcommit.tar.gz fi - git archive --prefix=$pkgname-$pkgver/ -o "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz $_gittag + SHA512SUM=$(sha512sum "$SRCDEST"/${pkgname}-${pkgver}${_suffix}.tar.gz | sed -e "s:$SRCDEST/::") + sed -i -e "s/^\(sha512sums=.\).*/\1$SHA512SUM/" APKBUILD } - - -_builddir="$srcdir"/$pkgname-$pkgver prepare() { - cd "$_builddir" default_prepare + cd "$builddir" cd utils/kamctl/ sed -i -e 's:/var/run/kamailio.pid:/var/run/kamailio/kamailio.pid:g' \ @@ -273,7 +271,7 @@ prepare() { } build() { - cd "$_builddir" + cd "$builddir" make FLAVOUR=kamailio STUN=1 \ PREFIX=/usr \ CC_EXTRA_OPTS="$CFLAGS -D_GNU_SOURCE" \ @@ -284,20 +282,13 @@ build() { DESTDIR="$pkgdir" \ cfg_prefix="$pkgdir" \ cfg - make EMBEDDED_UTF8_DECODE=1 STUN=1 \ + make EMBEDDED_UTF8_DECODE=1 STUN=1 FREERADIUS=1 \ all || return 1 } package() { - cd "$_builddir" - make -j1 install || return 1 - - # move default config to -doc package and use our own default config - - mv "$pkgdir"/etc/kamailio/kamailio.cfg \ - "$pkgdir"/usr/share/doc/kamailio/ - install -m644 -D "$srcdir"/kamailio.cfg \ - "$pkgdir"/etc/kamailio/kamailio.cfg + cd "$builddir" + make FREERADIUS=1 -j1 install || return 1 install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -d -o kamailio "$pkgdir"/var/run/kamailio @@ -382,7 +373,7 @@ snmpstats() { _generic_pkg "SNMP statistics support" \ "$_mod_list_snmpstats" || return 1 mkdir -p "$subpkgdir"/usr/share/snmp - mv "$_builddir"/src/modules/snmpstats/mibs \ + mv "$builddir"/src/modules/snmpstats/mibs \ "$subpkgdir"/usr/share/snmp/ || return 1 } @@ -507,11 +498,42 @@ kazoo() { "$_mod_list_kazoo" } +radius() { + _generic_pkg "RADIUS modules for Kamailio" \ + "$_mod_list_radius" +} + +sctp() { + _generic_pkg "SCTP transport for Kamailio" \ + "$_mod_list_sctp" +} + +perl() { + _generic_pkg "Perl extensions and database driver for Kamailio" \ + "$_mod_list_perl" +} + +python() { + _generic_pkg "Python extensions for Kamailio" \ + "$_mod_list_python" +} + +sqlang() { + _generic_pkg "Squirrel Language (SQLang) for Kamailio" \ + "$_mod_list_sqlang" +} + +rabbitmq() { + _generic_pkg "RabbitMQ related modules for Kamailio" \ + "$_mod_list_rabbitmq" +} + +sipdump() { + _generic_pkg "This module writes SIP traffic and some associated details into local files" \ + "$_mod_list_sipdump" +} -sha512sums="fc37f9f0be7a809d910392201b8b6bc2a3a31ea6ead706c8bedd6d52152635834696918bcd154106ed235b4a0112ee79c458b65ef9d9a32254fec1f9cba2591f kamailio-5.0.6_src.tar.gz +sha512sums="3cf6f06a46227114be0bfcc39b6bc766a1951de04e914cd8436c91a08c2a7074774b93455e024fb11419abd3c042ea68670feacdc2d6f6470e03f8eff46b0d8e kamailio-5.1.2.tar.gz 6badfb611c02ffcb4c2e9937731162ea1a4b737f042ed52120e2f96ebb80b5b7d240b5612c9ca565e693eec9b8c52c1ee5db04dfc47d204501021f984b4b11db 0001-kamdbctl.base.patch -e60e8d41e55008f0473e4d645af3b43f2bc097e341bb3bb81daec8bc47abcd6d037cbb56082675c24ffb1c50b2eb93e3c4fc50b0dc2df9cdfe4f28ad7b9fbf9e 0002-remove-spurious-execinfo.patch -84b8645e551a41737863085dad6c2c865e60bbe505bfdf750dec530cdd0501025a69e60a48b54971f0d0daaf5f52d1cc0aa8d275395f5c110a3563bb269bb6df 0003-src_modules_tls_tls_init_c.patch af8362201957eae6b66baf7368c9ca884024209a396d77c5c52180c9aabe13772e9c6513e59721d39503e5bb7a8c1030f5c10301ea9055bddafb7f01ee2f3076 0004-src_core_tcp_read_c.patch -c1abf69b48847dc8c7ab0d11ef9adb531aa4635f9d44db6933981edc5a47df374664fb24867b19aa64abbcc9777bf1cd0360d9aea54e27b081065928c61e0f0b kamailio.cfg cd6e3b677d803cd78561ad14d9b2589fd35ad0096f48047fdcb4ddc7d9103871357efba3b350946844cb53dbb081210746421fc420c22ac845b90251168a628e kamailio.initd" |