aboutsummaryrefslogtreecommitdiffstats
path: root/main/sems/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/sems/APKBUILD')
-rw-r--r--main/sems/APKBUILD228
1 files changed, 180 insertions, 48 deletions
diff --git a/main/sems/APKBUILD b/main/sems/APKBUILD
index 04ab8bc5b8..80a387e028 100644
--- a/main/sems/APKBUILD
+++ b/main/sems/APKBUILD
@@ -1,72 +1,204 @@
# Contributor: Francesco Colista <francesco.colista@gmail.com>
-# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sems
-pkgver=1.2.1
+pkgver=1.4.0
pkgrel=1
-pkgdesc="High performance, extensible media server for SIP (RFC3261) based VoIP services"
+pkgdesc="SIP Express Media Server, an extensible SIP media server"
url="http://iptel.org/sems/"
arch="all"
-license="GPL-2"
-install="$pkgname.pre-install $pkgname.post-install"
-makedepends="python-dev openssl-dev cmake bash"
+license="GPLv2+"
+pkgusers="sems"
+pkggroups="sems"
+install="$pkgname.pre-install"
+makedepends="python-dev cmake bash openssl-dev
+ libsamplerate-dev spandsp-dev flite-dev gsm-dev speex-dev
+ "
+subpackages="$pkgname-doc $pkgname-conf_auth $pkgname-conference
+ $pkgname-diameter_client $pkgname-dsm $pkgname-early_announce
+ $pkgname-g722 $pkgname-gsm $pkgname-ivr $pkgname-mailbox
+ $pkgname-pin_collect $pkgname-speex $pkgname-xmlrpc2di"
+
source="http://ftp.iptel.org/pub/sems/sems-$pkgver.tar.gz
- 0003-cc-and-cflags.patch
- sems.conf
+ sems-0001-Force-to-use-system-wide-GSM-includes.patch
+ sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch
+ sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch
+ sems-0011-Avoid-using-private-Glibc-functions.patch
+
sems.initd
"
+# sems-0005-Add-sw_prepaid_sip-plugin-to-default-exclude-list-du.patch
+# sems-0006-last-minute-fix-proper-version.patch
+# sems-0008-Install-email-template.patch
+# sems-0009-Don-t-start-py_sems-by-default.patch
+# applied:
+# sems-0007-Fix-gateway-module-s-version-passing-in-CMake.patch
+# sems-0010-Move-CMake-defines.patch
+
+_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- cd "$srcdir"/$pkgname-$pkgver
- for i in "$srcdir"/*.patch; do
- [ -f "$i" ] || continue
- msg "Applying $i"
- patch -p1 -i $i || return 1
+ cd "$_builddir"
+ rm -rf core/plug-in/gsm/gsm-1.0-pl10/
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
done
+}
- sed -i -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' \
- -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \
- Makefile.defs \
+
+build() {
+ cd "$_builddir"
+ cmake \
+ -DSEMS_USE_SPANDSP=yes \
+ -DSEMS_USE_LIBSAMPLERATE=yes \
+ -DSEMS_USE_ZRTP=NO \
+ -DSEMS_USE_MP3=NO \
+ -DSEMS_USE_ILBC=NO \
+ -DSEMS_USE_TTS=yes \
+ -DSEMS_USE_OPENSSL=yes \
+ -DSEMS_USE_MONITORING=yes \
+ -DSEMS_USE_IPV6=NO \
+ -DSEMS_CFG_PREFIX= \
+ -DSEMS_AUDIO_PREFIX=/usr/share \
+ -DSEMS_EXEC_PREFIX=/usr \
+ -DSEMS_LIBDIR=lib \
|| return 1
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make install DESTDIR="$pkgdir"
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ # is empty
+ rm -f "$pkgdir"/etc/sems/etc/conf_auth.conf
- # Patch for fixin unistd.h
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/AmArg.cpp
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/AmMediaProcessor.cpp
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/AmRtpReceiver.cpp
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/plug-in/sipctrl/udp_trsp.cpp
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' core/plug-in/stats/query_stats.cxx
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' apps/annrecorder/AnnRecorder.cpp
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' apps/callback/CallBack.cpp
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' apps/diameter_client/ServerConnection.cpp
- sed -i -e 's:\*\/:\n*\/\n#include <unistd.h>:' apps/dsm/mods/mod_sys/ModSys.cpp
+ install -o sems -g sems -d "$pkgdir"/var/spool/voicebox
+ install -d -o sems "$pkgdir"/var/run/sems
}
+_mv_sub() {
+ local i
+ for i in "$@"; do
+ mkdir -p "$subpkgdir"/${i%/*}
+ mv "$pkgdir"/$i "$subpkgdir"/$i
+ done
+}
-build() {
- cd "$srcdir"/$pkgname-$pkgver
+conf_auth() {
+ pkgdesc="Conference with authorization for SEMS"
+ depends="sems sems-ivr"
+ cd "$pkgdir"
+ _mv_sub usr/lib/sems/ivr/conf_auth*
+}
- make PREFIX=/usr \
- cfg-target=/etc/sems/ \
- exclude_modules+="ivr examples py_sems speex gateway mp3 echo g722" \
- WITH_MPG123DECODER=no \
- all || return 1
+conference() {
+ pkgdesc="Conferencing application for SEMS"
+ depends="sems"
+ cd "$pkgdir"
+ _mv_sub etc/sems/etc/conference.conf \
+ usr/lib/sems/plug-in/conference.so \
+ usr/share/sems/audio/conference
}
-package() {
- cd "$srcdir"/$pkgname-$pkgver
+diameter_client() {
+ pkgdesc="A simple DIAMETER client implementation for SEMS"
+ depends="sems"
+ cd "$pkgdir"
+ _mv_sub usr/lib/sems/plug-in/diameter_client.so
+}
- make PREFIX=/usr \
- DESTDIR="$pkgdir" \
- cfg-target=/etc/sems/ \
- cfg-prefix="$pkgdir" \
- exclude_modules+="ivr examples py_sems speex gateway mp3 echo g722" \
- WITH_MPG123DECODER=no \
- install || return 1
+dsm() {
+ pkgdesc="The state machine interpreter for SEMS"
+ depends="sems"
+ cd "$pkgdir"
+ _mv_sub etc/sems/etc/dsm* \
+ usr/lib/sems/plug-in/dsm.so \
+ usr/lib/sems/dsm
+}
- install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/sems/$pkgname.conf
+early_announce() {
+ pkgdesc="Early announce application for SEMS"
+ depends="sems"
+ cd "$pkgdir"
+ _mv_sub etc/sems/etc/early_announce.conf \
+ usr/lib/sems/plug-in/early_announce.so
}
-md5sums="f0545c0708849e1a723d453244c2a79e sems-1.2.1.tar.gz
-0054e6ed7e11393e71204876179d3199 0003-cc-and-cflags.patch
-8b74528c8605b7adb01a0133fcd0c247 sems.conf
-14aee84a05afc347b6e6b34889ed9504 sems.initd"
+g722() {
+ pkgdesc="G.722 support for SEMS"
+ depends="sems"
+ _mv_sub usr/lib/sems/plug-in/g722.so
+}
+
+#gateway() {
+# pkgdesc="ISDN gateway for SEMS"
+# depends="sems"
+#}
+
+gsm() {
+ pkgdesc="GSM support for SEMS"
+ depends="sems"
+ _mv_sub usr/lib/sems/plug-in/gsm.so
+}
+
+ivr() {
+ pkgdesc="IVR functionallity for SEMS"
+ depends="sems python"
+ cd "$pkgdir"
+ _mv_sub etc/sems/etc/ivr.conf \
+ usr/lib/sems/plug-in/ivr.so \
+ usr/lib/sems/ivr/log.*
+}
+
+mailbox() {
+ pkgdesc="Mailbox application for SEMS"
+ depends="sems sems-ivr"
+ cd "$pkgdir"
+ _mv_sub etc/sems/etc/mailbox*.conf \
+ usr/share/sems/audio/mailbox \
+ usr/lib/sems/plug-in/ivr.so \
+ usr/lib/sems/ivr/*mailbox*
+}
+
+pin_collect() {
+ pkgdesc="Collects a PIN for SEMS"
+ depends="sems sems-ivr"
+ cd "$pkgdir"
+ _mv_sub etc/sems/etc/pin_collect.conf \
+ usr/share/sems/audio/pin_collect \
+ usr/lib/sems/plug-in/ivr.so \
+ usr/lib/sems/ivr/pin_collect*
+}
+
+_python() {
+ pkgdesc="Python bindings for SEMS"
+ depends="python sems"
+ cd "$pkgdir"
+ _mv_sub \
+ usr/lib/sems/plug-in/py_sems*
+}
+
+speex() {
+ pkgdesc="Speex support for SEMS"
+ depends="sems"
+ _mv_sub usr/lib/sems/plug-in/speex.so
+}
+
+xmlrpc2di() {
+ pkgdesc="XMLRPC interface for SEMS"
+ depends="sems"
+ _mv_sub \
+ etc/sems/etc/xmlrpc2di.conf \
+ usr/lib/sems/plug-in/xmlrpc2di.so
+}
+
+
+md5sums="ebd5d646f71c8f62c7da51d1f4b89b9d sems-1.4.0.tar.gz
+5b2fded836b44bda33f39adc37de4de7 sems-0001-Force-to-use-system-wide-GSM-includes.patch
+b8efd1a6415afa08f7c676f6976fca36 sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch
+331e7529833c906b4738006f32a65fde sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch
+bf4070f110489ef21540b009347fcd81 sems-0011-Avoid-using-private-Glibc-functions.patch
+36c2f993ba874781f5d3974b4f4c1503 sems.initd"