diff options
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | patch-Makefile.defs.patch | 10 | ||||
-rw-r--r-- | patch-python2.patch | 29 | ||||
-rw-r--r-- | rc.d-sems | 38 |
5 files changed, 143 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..099097cf0379 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = sems + pkgdesc = Free, high performance, extensible media and application server for SIP (RFC3261) based VoIP services. + pkgver = 1.5.0 + pkgrel = 1 + url = http://iptel.org/sems + arch = i686 + arch = x86_64 + license = GPLv2+ + depends = speex + depends = bash + depends = python + source = http://ftp.iptel.org/pub/sems/sems-1.5.0.tar.gz + source = rc.d-sems + source = patch-Makefile.defs.patch + source = patch-python2.patch + md5sums = ec0a88f9081679b3b4ab9d06e84ea759 + md5sums = 01cbd7bc12dd94b35ef9f723156f4105 + md5sums = dbf2ffd36d0527a8eb24bd4f82736972 + md5sums = 47dc4e26f3370b52edf494b7c37b293a + +pkgname = sems + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f8312da1efff --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Xavier Devlamynck <magicrhesus@ouranos.be> +# Contributor: Aleshus <podskale@fel.cvut.cz> + +pkgname=sems +pkgver=1.5.0 +pkgrel=1 +pkgdesc="Free, high performance, extensible media and application server for SIP (RFC3261) based VoIP services." +url="http://iptel.org/sems" +license=(GPLv2+) +arch=('i686' 'x86_64') +depends=('speex' 'bash' 'python') +makedepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +intall=() +source=(http://ftp.iptel.org/pub/sems/sems-$pkgver.tar.gz rc.d-sems patch-Makefile.defs.patch patch-python2.patch) +md5sums=('ec0a88f9081679b3b4ab9d06e84ea759' + '01cbd7bc12dd94b35ef9f723156f4105' + 'dbf2ffd36d0527a8eb24bd4f82736972' + '47dc4e26f3370b52edf494b7c37b293a') +build() { + cd ${srcdir}/$pkgname-$pkgver + + msg "Patching..." + patch Makefile.defs ${srcdir}/patch-Makefile.defs.patch + patch -Np1 -i "${srcdir}/patch-python2.patch" + + msg "Building..." + make all + + msg "Installing..." + make DESTDIR=${pkgdir} PREFIX="" install + rm -rf ${pkgdir}/share + + install -D -m755 ${srcdir}/rc.d-sems ${pkgdir}/etc/rc.d/sems + mv -b ${pkgdir}/lib/sems/ivr ${pkgdir}/usr/lib/sems/ + rm -rf ${pkgdir}/lib +} + +# vim:set ts=2 sw=2 et: diff --git a/patch-Makefile.defs.patch b/patch-Makefile.defs.patch new file mode 100644 index 000000000000..86376e30c521 --- /dev/null +++ b/patch-Makefile.defs.patch @@ -0,0 +1,10 @@ +197,200c197,200 +< bin-dir = sbin/ +< modules-dir = lib/sems/plug-in/ +< audio-dir = lib/sems/audio/ +< lib-dir = lib/sems/ +--- +> bin-dir = usr/bin/ +> modules-dir = usr/lib/sems/plug-in/ +> audio-dir = usr/lib/sems/audio/ +> lib-dir = usr/lib/sems/ diff --git a/patch-python2.patch b/patch-python2.patch new file mode 100644 index 000000000000..9f705f32207e --- /dev/null +++ b/patch-python2.patch @@ -0,0 +1,29 @@ +diff -aur sems-1.4.1-orig//apps/dsm/mods/mod_py/Makefile sems-1.4.1/apps/dsm/mods/mod_py/Makefile +--- sems-1.4.1-orig//apps/dsm/mods/mod_py/Makefile 2011-07-18 10:14:51.172843572 +0200 ++++ sems-1.4.1/apps/dsm/mods/mod_py/Makefile 2011-07-18 10:15:38.022840968 +0200 +@@ -1,6 +1,6 @@ + plug_in_name = mod_py + +-PYTHON_VERSION ?= $(shell python -c 'import sys;print sys.version[0:3]') ++PYTHON_VERSION ?= $(shell python2 -c 'import sys;print sys.version[0:3]') + PY_VER = $(PYTHON_VERSION) + PY_EXE = python$(PY_VER) + +@@ -36,4 +36,4 @@ + ifneq ($(OS),solaris) + PYTHON_module_ldflags += -Xlinker --export-dynamic + endif +-endif +\ No newline at end of file ++endif +diff -aur sems-1.4.1-orig//apps/ivr/Makefile.defs sems-1.4.1/apps/ivr/Makefile.defs +--- sems-1.4.1-orig//apps/ivr/Makefile.defs 2011-07-18 10:14:51.162843570 +0200 ++++ sems-1.4.1/apps/ivr/Makefile.defs 2011-07-18 10:15:19.269508826 +0200 +@@ -1,6 +1,6 @@ + # Python version: 2.5, 2.4 or 2.3 + # +-PYTHON_VERSION ?= $(shell python -c 'import sys;print sys.version[0:3]') ++PYTHON_VERSION ?= $(shell python2 -c 'import sys;print sys.version[0:3]') + + PY_VER = $(PYTHON_VERSION) + PY_EXE = python$(PY_VER) diff --git a/rc.d-sems b/rc.d-sems new file mode 100644 index 000000000000..f1f66e791696 --- /dev/null +++ b/rc.d-sems @@ -0,0 +1,38 @@ +#!/bin/bash + +daemon_name=sems + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/bin/sems` +case "$1" in + start) + stat_busy "Starting $daemon_name" + [ -z "$PID" ] && /usr/bin/sems -f /etc/sems/sems.conf >/dev/null 2>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon sems + stat_done + fi + ;; + stop) + stat_busy "Stopping $daemon_name" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon sems + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |