# Contributor: Francesco Colista # Maintainer: Natanael Copa setvar pkgname = 'sems' setvar pkgver = '1.6.0' setvar pkgrel = '5' setvar pkgdesc = ""SIP Express Media Server, an extensible SIP media server"" setvar url = ""http://iptel.org/sems/"" setvar arch = ""all"" setvar license = ""GPLv2+"" setvar pkgusers = ""sems"" setvar pkggroups = ""sems"" setvar install = ""$pkgname.pre-install"" setvar makedepends = ""python2-dev cmake bash libressl-dev linux-headers libsamplerate-dev spandsp-dev flite-dev gsm-dev speex-dev libevent-dev libev-dev lame-dev"" setvar 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 $pkgname-webconference $pkgname-voicebox $pkgname-voicemail $pkgname-annrecorder $pkgname-jsonrpc $pkgname-registrar"" setvar source = ""$pkgname-$pkgver.tar.gz::https://github.com/sems-server/sems/archive/$pkgver.tar.gz 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-0004-musl-fixes.patch sems-0005-stats-needs-version.patch sems-0011-Add-SBC-dependencies.patch std-types.patch sems-0013-Fix-for-C-11.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-0004-fix-PRACK-route.patch # sems-0007-Fix-gateway-module-s-version-passing-in-CMake.patch # sems-0010-Move-CMake-defines.patch setvar _builddir = ""$srcdir/$pkgname-$pkgver"" proc prepare { cd $_builddir rm -rf core/plug-in/gsm/gsm-1.0-pl10/ for i in $source { case (i) { *.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1} } } } proc build { cd $_builddir # force cmake to use relative paths. It helps us avoid having the # full file path in the logs cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_USE_RELATIVE_PATHS=yes \ -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 || return 1 } proc 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 install -o sems -g sems -d "$pkgdir"/var/spool/voicebox install -d -o sems "$pkgdir"/var/run/sems } proc _mv_sub { local i for i in "$@" { mkdir -p "$subpkgdir"/${i%/*} mv "$pkgdir"/$i "$subpkgdir"/$i } } proc conf_auth { setvar pkgdesc = ""Conference with authorization for SEMS"" setvar depends = ""sems sems-ivr"" cd $pkgdir _mv_sub usr/lib/sems/ivr/conf_auth* } proc conference { setvar pkgdesc = ""Conferencing application for SEMS"" setvar depends = ""sems"" cd $pkgdir _mv_sub etc/sems/etc/conference.conf \ usr/lib/sems/plug-in/conference.so \ usr/share/sems/audio/conference } proc diameter_client { setvar pkgdesc = ""A simple DIAMETER client implementation for SEMS"" setvar depends = ""sems"" cd $pkgdir _mv_sub usr/lib/sems/plug-in/diameter_client.so } proc dsm { setvar pkgdesc = ""The state machine interpreter for SEMS"" setvar depends = ""sems"" cd $pkgdir _mv_sub etc/sems/etc/dsm* \ usr/lib/sems/plug-in/dsm.so \ usr/lib/sems/dsm } proc early_announce { setvar pkgdesc = ""Early announce application for SEMS"" setvar depends = ""sems"" cd $pkgdir _mv_sub etc/sems/etc/early_announce.conf \ usr/lib/sems/plug-in/early_announce.so } proc g722 { setvar pkgdesc = ""G.722 support for SEMS"" setvar depends = ""sems"" _mv_sub usr/lib/sems/plug-in/g722.so } #gateway() { # pkgdesc="ISDN gateway for SEMS" # depends="sems" #} proc gsm { setvar pkgdesc = ""GSM support for SEMS"" setvar depends = ""sems"" _mv_sub usr/lib/sems/plug-in/gsm.so } proc ivr { setvar pkgdesc = ""IVR (python) functionallity for SEMS"" setvar depends = ""sems python2"" cd $pkgdir _mv_sub etc/sems/etc/ivr.conf \ usr/lib/sems/plug-in/ivr.so \ usr/lib/sems/ivr/log.* } proc mailbox { setvar pkgdesc = ""Mailbox application for SEMS"" setvar depends = ""sems sems-ivr"" cd $pkgdir _mv_sub etc/sems/etc/mailbox*.conf \ usr/share/sems/audio/mailbox \ usr/lib/sems/ivr/*mailbox* } proc pin_collect { setvar pkgdesc = ""Collects a PIN for SEMS"" setvar depends = ""sems sems-ivr"" cd $pkgdir _mv_sub etc/sems/etc/pin_collect.conf \ usr/share/sems/audio/pin_collect \ usr/lib/sems/ivr/pin_collect* } proc webconference { setvar pkgdesc = ""Conference bridge via DI (xmlrpc) for SEMS"" setvar depends = ""sems sems-xmlrpc2di"" cd $pkgdir _mv_sub etc/sems/etc/webconference.conf \ usr/share/sems/audio/webconference \ usr/lib/sems/plug-in/webconference.so } proc annrecorder { setvar pkgdesc = ""Allow user to record personal greeting for SEMS"" setvar depends = ""sems"" cd $pkgdir _mv_sub etc/sems/etc/annrecorder.conf \ usr/share/sems/audio/annrecorder \ usr/lib/sems/plug-in/annrecorder.so } proc voicebox { setvar pkgdesc = ""Voicebox (call in for messsages) for SEMS"" setvar depends = ""sems"" cd $pkgdir _mv_sub etc/sems/etc/voicebox.conf \ usr/share/sems/audio/voicebox \ usr/lib/sems/plug-in/voicebox.so \ var/spool/voicebox } proc voicemail { setvar pkgdesc = ""Play greeting and record voicemail for SEMS"" setvar depends = ""sems"" cd $pkgdir _mv_sub etc/sems/etc/voicemail.conf \ usr/share/sems/audio/voicemail \ usr/lib/sems/plug-in/voicemail.so } proc _python { setvar pkgdesc = ""Python bindings for SEMS"" setvar depends = ""python2 sems"" cd $pkgdir _mv_sub \ usr/lib/sems/plug-in/py_sems* } proc speex { setvar pkgdesc = ""Speex support for SEMS"" setvar depends = ""sems"" _mv_sub usr/lib/sems/plug-in/speex.so } proc xmlrpc2di { setvar pkgdesc = ""XMLRPC interface for SEMS"" setvar depends = ""sems"" _mv_sub \ etc/sems/etc/xmlrpc2di.conf \ usr/lib/sems/plug-in/xmlrpc2di.so } proc jsonrpc { setvar pkgdesc = ""Jsonrpc support for SEMS"" setvar depends = ""sems"" _mv_sub \ etc/sems/etc/jsonrpc.conf \ usr/lib/sems/plug-in/jsonrpc.so } proc registrar { setvar pkgdesc = ""Support for SEMS to register to a SIP server"" setvar depends = ""sems"" _mv_sub \ etc/sems/etc/reg_agent.conf \ usr/lib/sems/plug-in/reg_agent.so \ usr/lib/sems/plug-in/registrar_client.so } setvar md5sums = ""dc33c71af73e315c72b99c8618649ffb sems-1.6.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 83d66d121d4f3e823a93f3e2dfbcbcff sems-0004-musl-fixes.patch 305081ea41aebd3544cc2c528f7612c6 sems-0005-stats-needs-version.patch 43a7423bb809b40a635f56f57c4d8fa1 sems-0011-Add-SBC-dependencies.patch bbcbee0f73342b4c35deff15c1d708d5 std-types.patch d9e752348c9e90bda4bb90278f84802c sems-0013-Fix-for-C-11.patch 4b537f18cda6c72d7afda582a6f5858e sems.initd"" setvar sha256sums = ""fd8ece47ea2ef47f7dc62a410ec94f5a162531ce7c1a9a4e5979b8b1d944fd63 sems-1.6.0.tar.gz a36950f68e78af21f0e1152bb01e2f25f74b8c63210eecc01e4a4f90cf841371 sems-0001-Force-to-use-system-wide-GSM-includes.patch 0992f15e2a5c58d63a5a06dda027323e203fbf67d57022c11d5d63fd953088bc sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch 04e0b2a944c5f64305e5711f5dfdcf4675fc7980225ef87267fcaff241168d46 sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch be53fb504459c59d31d03a89246cba555d796b9b08516e08f50a15ce423d4618 sems-0004-musl-fixes.patch 0609ddae2ce3035e5d0dc40e33814dcc83dd848ae854e535e8b3140bb5f23eda sems-0005-stats-needs-version.patch a573a0f5dda4f5d89ed582ab7c337469ed4f1fd86082fa20d7ac973591eb4b66 sems-0011-Add-SBC-dependencies.patch c4aac6f50d8ba85d389a859d9067fb7e7589daf4b84cd1d68ac231bcdb0d2aeb std-types.patch 46998ca77b6abb1577e0f4b18ac555529fb2d5694fd6045171e10ada42731df9 sems-0013-Fix-for-C-11.patch 5bc8ece09cf1c47c8f0880fdeca40d1e72eb4bc5c6356ffc2d738179b9463e19 sems.initd"" setvar sha512sums = ""80190dbdc1d68dc7aa377b2af6a962f08c058a42cd618cb422d6d4e0f9138059fad71b7f284c6420de462ad4dcd65ea5e65b3c5b82dc1850dbd5b5a45644d3d4 sems-1.6.0.tar.gz 87c6f878c3ad5e947a9a80431ddf28f08c04ce1415b7c42878f66b423c78d909efda836c7c2d3ed97e075c08d7a07c4707a49c14ce42c1a3aa350de1878c8d09 sems-0001-Force-to-use-system-wide-GSM-includes.patch 4c09033d6acd1bbef2aa2d02571f74da29532decca67b9ce861872d8d9522ca31808d6e26c3b536913ef7a988f90d374e217187b9cadb6a79d5c830571e94b67 sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch ba6f0d917464729c63628255bee3d864a954af4a510b802f0de1d51f35ff5d7c1c33cbe14db31818133a3c94f84da0f4bea4184ce1e8eae6aa9a1ba79f2e5347 sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch 0d3deeb8617a96f81a05fc27b94bca70f4f6dfbdb3c75f0cd4abc5df002ff16f70ec2836717f317b0d03a8178415c2c09ca2d7099bf10c7ac3c58b273ee98776 sems-0004-musl-fixes.patch 28f07142a0b8b6698948d41bfb198e59637d5a921960adc496111b5cad4685a0b1cade821ac9cd9dbbf3f25ed6195f29485a12d077abf81428b9b6f8bfced79e sems-0005-stats-needs-version.patch d616448e70d1cdfc7016f7ff3cab3615063a65f551b4b03cd004ced60b7a24681e85a871788ef2bf13d37c6cb3c84a6d76ba44fd9b9d1a921ad4b8469f3c6ed1 sems-0011-Add-SBC-dependencies.patch 79e3ac2b202b3f6c710b3d2bc8ac459e3622f2bf5945eaaa81778f53bcbddc7951266f88c2fd9862fbed44f10a160368af7d19b5e81929a3b1e8ee150111f74b std-types.patch d21eb55ebcbf3d20703dcb3843415b9f7e8d4fa029396738b843d8ece80abf87475e7d06794f86c75e8c3205273c013e99da4772d169bf127d7985522230265a sems-0013-Fix-for-C-11.patch 5be93b6444a9592daa6c883c78e5906e9e662891e1daa850d872bdaa657eb756f1bc0879732033479b279b75c2fd42ef79aa530ebf3b1692e7fb222d484f804b sems.initd""