aboutsummaryrefslogtreecommitdiffstats
path: root/testing/kamailio/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/kamailio/APKBUILD')
-rw-r--r--testing/kamailio/APKBUILD77
1 files changed, 66 insertions, 11 deletions
diff --git a/testing/kamailio/APKBUILD b/testing/kamailio/APKBUILD
index 07dee300ba..f40d89fac3 100644
--- a/testing/kamailio/APKBUILD
+++ b/testing/kamailio/APKBUILD
@@ -1,14 +1,16 @@
# Contributor: Michael Mason <ms13sp@gmail.com>
pkgname=kamailio
pkgver=1.5.2
-pkgrel=0
+pkgrel=2
pkgdesc="Open Source SIP Server"
url="http://www.kamailio.org/"
license="GPL"
-depends="expat postgresql"
-makedepends="bison flex coreutils expat-dev libpq"
+depends=
+makedepends="bison flex expat-dev postgresql-dev mysql-dev pcre-dev
+ libxml2-dev curl-dev"
install=
-subpackages="$pkgname-doc"
+subpackages="$pkgname-doc $pkgname-mysql $pkgname-postgres $pkgname-pcre
+ $pkgname-presence"
source="http://www.kamailio.org/pub/kamailio/$pkgver/src/$pkgname-$pkgver-notls_src.tar.gz
kamailio.initd
kamailio.pre-install
@@ -17,18 +19,71 @@ source="http://www.kamailio.org/pub/kamailio/$pkgver/src/$pkgname-$pkgver-notls_
build() {
cd "$srcdir/$pkgname-$pkgver-notls"
sed -i -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \
- -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' Makefile.defs
+ -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' Makefile.defs \
+ || return 1
cd scripts
- sed -i -e 's:/var/run/kamailio.pid:/var/run/kamailio/kamailio.pid:g' \
- kamctl.base kamctlrc
+ sed -i -e 's:/var/run/kamailio.pid:/var/run/kamailio/kamailio.pid:g' \
+ kamctl.base kamctlrc || return 1
cd ..
- make prefix=/usr || return 1
- make prefix=/usr basedir="$pkgdir" install
+ make prefix=/usr \
+ MODS_MYSQL=yes \
+ MODS_PCRE=yes \
+ MODS_PRESENCE=yes \
+ MODS_RADIUS= \
+ TLS= \
+ include_modules=db_postgres \
+ all || return 1
+ make prefix=/usr \
+ MODS_MYSQL=yes \
+ MODS_PCRE=yes \
+ MODS_PRESENCE=yes \
+ MODS_RADIUS= \
+ TLS= \
+ include_modules=db_postgres \
+ basedir="$pkgdir" install || return 1
- install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+_mv_mod() {
+ local moddir=usr/lib/kamailio/modules i=
+ mkdir -p "$subpkgdir"/$moddir
+ for i in $@; do
+ mv "$pkgdir"/$moddir/$i.so "$subpkgdir"/$moddir/ || return 1
+ done
+}
+
+
+mysql() {
+ pkgdesc="MySQL support for kamailio"
+ depends="kamailio mysql-client"
+ _mv_mod db_mysql
+ mkdir -p "$subpkgdir"/usr/share/kamailio
+ mv "$pkgdir"/usr/share/kamailio/mysql \
+ "$subpkgdir"/usr/share/kamailio/
+}
+
+postgres() {
+ pkgdesc="PostgreSQL support for kamailio"
+ depends="kamailio postgresql-client"
+ _mv_mod db_postgres
+ mkdir -p "$subpkgdir"/usr/share/kamailio
+ mv "$pkgdir"/usr/share/kamailio/postgres \
+ "$subpkgdir"/usr/share/kamailio/
+}
+
+pcre() {
+ pkgdesc="Regular expressions support for kamailio"
+ _mv_mod dialplan lcr regex
+}
+
+presence() {
+ pkgdesc="Precense support for kamailio"
+ _mv_mod presence presence_xml presence_mwi pua pua_bla pua_mi \
+ pua_usrloc pua_xmpp rls xcap_client presence_dialoginfo \
+ pua_dialoginfo
}
md5sums="6c6f4ed6fbcb4d008b8ac3de5b99ce99 kamailio-1.5.2-notls_src.tar.gz