# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=sems pkgver=1.2.1 pkgrel=0 pkgdesc="High performance, extensible media server for SIP (RFC3261) based VoIP services" url="http://iptel.org/sems/" license="GPL-2" install="$pkgname.pre-install $pkgname.post-install" makedepends="python-dev openssl-dev cmake bash" source="http://ftp.iptel.org/pub/sems/sems-$pkgver.tar.gz 0003-cc-and-cflags.patch sems.conf sems.initd " prepare() { cd "$srcdir"/$pkgname-$pkgver for i in "$srcdir"/*.patch; do [ -f "$i" ] || continue msg "Applying $i" patch -p1 -i $i || return 1 done sed -i -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' \ -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \ Makefile.defs \ || return 1 # Patch for fixin unistd.h sed -i -e 's:\*\/:\n*\/\n#include :' core/AmArg.cpp sed -i -e 's:\*\/:\n*\/\n#include :' core/AmMediaProcessor.cpp sed -i -e 's:\*\/:\n*\/\n#include :' core/AmRtpReceiver.cpp sed -i -e 's:\*\/:\n*\/\n#include :' core/plug-in/sipctrl/udp_trsp.cpp sed -i -e 's:\*\/:\n*\/\n#include :' core/plug-in/stats/query_stats.cxx sed -i -e 's:\*\/:\n*\/\n#include :' apps/annrecorder/AnnRecorder.cpp sed -i -e 's:\*\/:\n*\/\n#include :' apps/callback/CallBack.cpp sed -i -e 's:\*\/:\n*\/\n#include :' apps/diameter_client/ServerConnection.cpp sed -i -e 's:\*\/:\n*\/\n#include :' apps/dsm/mods/mod_sys/ModSys.cpp } build() { cd "$srcdir"/$pkgname-$pkgver make PREFIX=/usr \ cfg-target=/etc/sems/ \ exclude_modules+="ivr examples py_sems speex gateway mp3 echo g722" \ WITH_MPG123DECODER=no \ all || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver 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 install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/sems/$pkgname.conf } md5sums="f0545c0708849e1a723d453244c2a79e sems-1.2.1.tar.gz 0054e6ed7e11393e71204876179d3199 0003-cc-and-cflags.patch 8b74528c8605b7adb01a0133fcd0c247 sems.conf 2e738c6402eb1fbceb279cf050a9090f sems.initd"