diff options
author | Nathan Angelacos <nangel@alpinelinux.org> | 2013-04-25 16:13:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-04-26 09:28:42 +0000 |
commit | 924229b72ac5f4a85bd0795fa3c099891ad26fb1 (patch) | |
tree | 3ac3573a25ca34ba1e84dea37e878bde93da8ef6 /main/kamailio/APKBUILD | |
parent | 871dd194e68719bcef84b37a602e0d01884ab2b6 (diff) | |
download | aports-924229b72ac5f4a85bd0795fa3c099891ad26fb1.tar.bz2 aports-924229b72ac5f4a85bd0795fa3c099891ad26fb1.tar.xz |
main/kamailio:
- upgrade to 4.0.1
- add kamailio.groups file to build packages similar to other distros
- add additional packages to the Alpine set (e.g. ldap, snmpstats)
Diffstat (limited to 'main/kamailio/APKBUILD')
-rw-r--r-- | main/kamailio/APKBUILD | 215 |
1 files changed, 118 insertions, 97 deletions
diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD index 797240c6aa..13b03c6fc4 100644 --- a/main/kamailio/APKBUILD +++ b/main/kamailio/APKBUILD @@ -1,9 +1,9 @@ # Contributor: Michael Mason <ms13sp@gmail.com> # Maintainer: Nathan Angelacos <nangel@alpinelinux.org> pkgname=kamailio -pkgver=3.3.3 +pkgver=4.0.1 pkgrel=0 -pkgdesc="Open Source SIP Proxy" +pkgdesc="Open Source SIP Server" url="http://www.kamailio.org/" pkgusers="kamailio" pkggroups="kamailio" @@ -13,36 +13,33 @@ depends= arch=all makedepends="bison flex expat-dev postgresql-dev pcre-dev mysql-dev libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev - lua-dev openldap-dev openssl-dev" + lua-dev openldap-dev openssl-dev net-snmp-dev" install="$pkgname.pre-install $pkgname.pre-upgrade" -subpackages="$pkgname-doc $pkgname-postgres $pkgname-presence $pkgname-pcre - $pkgname-mediaproxy $pkgname-unixodbc $pkgname-mysql $pkgname-sqlite - $pkgname-lua $pkgname-ldap $pkgname-sipcapture $pkgname-tls" + +# Source the kamailio.groups file for the definition of all the various modules +. ./kamailio.groups + +subpackages="$pkgname-doc" +_modules="$module_group_kstandard" +for i in db postgres sqlite dbtext mysql \ + cpl xml unixodbc snmpstats xmpp carrierroute \ + ldap utils tls presence lua ims outbound dbg \ + extra; do + + subpackages="$subpackages $pkgname-$i" + _modules="$_modules `eval echo $\module_group_k$i`" +done + source="http://www.kamailio.org/pub/kamailio/$pkgver/src/kamailio-${pkgver}_src.tar.gz fix-sql-module-loading-order.patch - kamailio-3.2-backslash.patch kamailio.cfg kamailio.initd + kamailio.groups " _builddir="$srcdir"/$pkgname-$pkgver -_default="carrierroute xmlrpc tm" -_presence="presence presence_xml presence_mwi pua pua_bla pua_mi pua_usrloc pua_xmpp rls xcap_server xcap_client presence_dialoginfo pua_dialoginfo presence_reginfo pua_reginfo" -_sipcapture="sipcapture" -_pcre="dialplan lcr regex" -_postgres="db_postgres" -_mysql="db_mysql" -_mediaproxy="mediaproxy" -_odbc="db_unixodbc" -_sqlite="db_sqlite" -_lua="app_lua" -_ldap="ldap" -_tls="tls" - -# Makefile does not handle newline -_modules="$_default $_postgres $_mediaproxy $_odbc $_presence $_mysql $_pcre $_lua $_sqlite $_ldap $_sipcapture async $_tls" prepare() { @@ -79,7 +76,7 @@ prepare() { build() { cd "$_builddir" - make FLAVOUR=kamailio \ + make FLAVOUR=kamailio STUN=1 \ PREFIX=/usr \ cfg_target=/etc/kamailio/ \ include_modules="$_modules" \ @@ -87,7 +84,7 @@ build() { DESTDIR="$pkgdir" \ cfg_prefix="$pkgdir" \ cfg - make -j1 all || return 1 + make all || return 1 } package() { @@ -113,113 +110,137 @@ _mv_mod() { done } -_mv_mod_k() { - local moddir=usr/lib/kamailio/modules_k i= - mkdir -p "$subpkgdir"/$moddir - for i in $@; do - mv "$pkgdir"/$moddir/$i.so "$subpkgdir"/$moddir/ || return 1 - done +_generic_pkg() { + pkgdesc="Kamailio $1" + depends="$pkgname" + _mv_mod $2 } -_mv_mod_s() { - local moddir=usr/lib/kamailio/modules_s i= - mkdir -p "$subpkgdir"/$moddir - for i in $@; do - mv "$pkgdir"/$moddir/$i.so "$subpkgdir"/$moddir/ || return 1 - done -} -lua() { - pkgdesc="Lua script support for kamailio" - _mv_mod app_lua -} - -mysql() { - pkgdesc="MySQL support for kamailio" - depends="kamailio mysql-client" - replaces="kamailio" - _mv_mod db_mysql +_db_driver() { + pkgdesc="Database drivers for $1" + depends="$pkgname $pkgname-db" + _mv_mod db_$2 || return 1 mkdir -p "$subpkgdir"/usr/share/kamailio \ "$subpkgdir"/usr/lib/kamailio/kamctl - mv "$pkgdir"/usr/share/kamailio/mysql \ + mv "$pkgdir"/usr/share/kamailio/$3 \ "$subpkgdir"/usr/share/kamailio/ || return 1 - mv "$pkgdir"/usr/lib/kamailio/kamctl/*.mysql \ + mv "$pkgdir"/usr/lib/kamailio/kamctl/*.$4 \ "$subpkgdir"/usr/lib/kamailio/kamctl/ || return 1 } +db() { + _generic_pkg "modules using a database backend" "$module_group_db" +} + postgres() { - pkgdesc="PostgreSQL support for kamailio" - depends="kamailio postgresql-client" - replaces="kamailio" - _mv_mod db_postgres - mkdir -p "$subpkgdir"/usr/share/kamailio \ - "$subpkgdir"/usr/lib/kamailio/kamctl - mv "$pkgdir"/usr/share/kamailio/postgres \ - "$subpkgdir"/usr/share/kamailio/ - mv "$pkgdir"/usr/lib/kamailio/kamctl/*.pgsql \ - "$subpkgdir"/usr/lib/kamailio/kamctl/ || return 1 + _db_driver Postgres postgres postgres pgsql +} + +mysql() { + _db_driver Mysql mysql mysql mysql } sqlite() { - pkgdesc="Sqlite support for kamailio" - depends="kamailio sqlite" - replaces="kamailio" - _mv_mod_k db_sqlite || return 1 - mkdir -p "$subpkgdir"/usr/share/kamailio \ - "$subpkgdir"/usr/lib/kamailio/kamctl - mv "$pkgdir"/usr/share/kamailio/db_sqlite \ - "$subpkgdir"/usr/share/kamailio/ || return 1 - mv "$pkgdir"/usr/lib/kamailio/kamctl/*.sqlite \ - "$subpkgdir"/usr/lib/kamailio/kamctl/ || return 1 + _db_driver SQlite sqlite db_sqlite sqlite } -pcre() { - pkgdesc="Regular expressions support for kamailio" - _mv_mod dialplan lcr - _mv_mod_k regex +dbtext() { + _db_driver DBText text dbtext dbtext || return 1 + depends="$depends python" + mkdir -p "$subpkgdir"/usr/lib/kamailio/kamctl + mv "$pkgdir"/usr/lib/kamailio/kamctl/dbtextdb \ + "$subpkgdir"/usr/lib/kamailio/kamctl/ } -presence() { - pkgdesc="Presence support for kamailio" - _mv_mod_k $_presence + +cpl() { + _generic_pkg "CPL (Call Processing Language) interpreter" \ + "$module_group_kcpl" } -mediaproxy() { - pkgdesc="Mediaproxy support for kamailio" - depends="kamailio" - _mv_mod $_mediaproxy +xml() { + _generic_pkg "XML related modules: $module_group_kxml" \ + "$module_group_kxml" || return 1 + mkdir -p "$subpkgdir"/usr/share/kamailio + mv "$pkgdir"/usr/share/kamailio/xhttp_pi \ + "$subpkgdir"/usr/share/kamailio || return 1 + mkdir -p "$subpkgdir"/etc/kamailio/ + mv "$pkgdir"/etc/kamailio/pi_framework.xml \ + "$subpkgdir"/etc/kamailio || return 1 } unixodbc() { - pkgdesc="UnixODBC support for kamailio" - depends="kamailio" - _mv_mod_k $_odbc + _generic_pkg "Database drivers for unixodbc" \ + "$module_group_kunixodbc" +} + +snmpstats() { + _generic_pkg "SNMP statistics support" \ + "$module_group_ksnmpstats" || return 1 + mkdir -p "$subpkgdir"/usr/share/snmp + mv "$_builddir"/modules/snmpstats/mibs \ + "$subpkgdir"/usr/share/snmp/ || return 1 +} + +xmpp() { + _generic_pkg "XMPP (Jabber) gateway" \ + "$module_group_kxmpp" +} + +carrierroute() { + _generic_pkg "carrier grade routing functions" \ + "$module_group_kcarrierroute" } ldap() { - pkgdesc="LDAP support for kamailio" - depends="kamailio" - _mv_mod_k ldap - _mv_mod_s ldap + _generic_pkg "LDAP search functions" \ + "$module_group_kldap" } +utils() { + _generic_pkg "miscelaneous utility functions" \ + "$module_group_kutils" +} tls() { - pkgdesc="TLS support for kamailio" - depends="kamailio" - _mv_mod tls + _generic_pkg "TLS support" \ + "$module_group_ktls" +} + +presence() { + _generic_pkg "SIP Notify (Presence) support" \ + "$module_group_kpresence" +} + +lua() { + _generic_pkg "Lua script support" \ + "$module_group_klua" +} + +ims() { + _generic_pkg "IP Multimedia Subsystem (IMS) support" \ + "$module_group_kims" } +outbound() { + _generic_pkg "RFC 5626 section 5 Outbound suppport" \ + "$module_group_koutbound" +} + +dbg() { + _generic_pkg "debugging modules" \ + "$module_group_kdbg" +} -sipcapture() { - pkgdesc="HOMER sipcapture support for kamailio" - depends="kamailio" - _mv_mod $_sipcapture +extra() { + _generic_pkg "extra modules" \ + "$mod_list_extra" } -md5sums="98c082b70048d2e9a9c4acfaa6cf556d kamailio-3.3.3_src.tar.gz +md5sums="ab57fcb1eb1195fa45f5c0935810e42a kamailio-4.0.1_src.tar.gz 53cca39c47399eb2df20a1044d1e29eb fix-sql-module-loading-order.patch -b0100ca0ad52b725b92e3b409e036d47 kamailio-3.2-backslash.patch a3c959ec568c43a905710e7d25cd8c25 kamailio.cfg -9c190575e28772a784c4172216d85333 kamailio.initd" +9c190575e28772a784c4172216d85333 kamailio.initd +56a85be6c8e1b2c30d72a9b4acbdb5da kamailio.groups" |