diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-10-31 18:33:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-07 16:46:13 +0000 |
commit | e29781a3f93996b2c9b9503bb300708c8fe917aa (patch) | |
tree | 251b4cf9721234aa0681e41a03998c7f64ca998c /unmaintained/sems | |
parent | feb6490b3aa4d8eac2ba4bc975c5e3ec3e512704 (diff) | |
download | aports-e29781a3f93996b2c9b9503bb300708c8fe917aa.tar.bz2 aports-e29781a3f93996b2c9b9503bb300708c8fe917aa.tar.xz |
unmaintained/sems: move from main
does not build with openssl 1.1
Diffstat (limited to 'unmaintained/sems')
-rw-r--r-- | unmaintained/sems/APKBUILD | 273 | ||||
-rw-r--r-- | unmaintained/sems/sems-0001-Force-to-use-system-wide-GSM-includes.patch | 26 | ||||
-rw-r--r-- | unmaintained/sems/sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch | 33 | ||||
-rw-r--r-- | unmaintained/sems/sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch | 26 | ||||
-rw-r--r-- | unmaintained/sems/sems-0004-musl-fixes.patch | 56 | ||||
-rw-r--r-- | unmaintained/sems/sems-0005-stats-needs-version.patch | 12 | ||||
-rw-r--r-- | unmaintained/sems/sems-0010-Move-CMake-defines.patch | 66 | ||||
-rw-r--r-- | unmaintained/sems/sems-0011-Add-SBC-dependencies.patch | 22 | ||||
-rw-r--r-- | unmaintained/sems/sems-0013-Fix-for-C-11.patch | 45 | ||||
-rwxr-xr-x | unmaintained/sems/sems.initd | 48 | ||||
-rw-r--r-- | unmaintained/sems/sems.pre-install | 6 | ||||
-rw-r--r-- | unmaintained/sems/std-types.patch | 281 |
12 files changed, 894 insertions, 0 deletions
diff --git a/unmaintained/sems/APKBUILD b/unmaintained/sems/APKBUILD new file mode 100644 index 0000000000..fc566adb2e --- /dev/null +++ b/unmaintained/sems/APKBUILD @@ -0,0 +1,273 @@ +# Contributor: Francesco Colista <francesco.colista@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=sems +pkgver=1.6.0 +pkgrel=8 +pkgdesc="SIP Express Media Server, an extensible SIP media server" +url="http://iptel.org/sems/" +arch="all" +license="GPL-2.0-or-later" +# upstream does not provide test +options="!check" +pkgusers="sems" +pkggroups="sems" +install="$pkgname.pre-install" +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" +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-mp3 + $pkgname-pin_collect $pkgname-speex $pkgname-xmlrpc2di + $pkgname-webconference $pkgname-voicebox $pkgname-voicemail + $pkgname-annrecorder $pkgname-jsonrpc $pkgname-registrar" + +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 + +builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + default_prepare + cd "$builddir" + rm -rf core/plug-in/gsm/gsm-1.0-pl10/ +} + +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=yes \ + -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 + make +} + +package() { + cd "$builddir" + make install DESTDIR="$pkgdir" + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname + # 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 +} + +_mv_sub() { + local i + for i in "$@"; do + mkdir -p "$subpkgdir"/${i%/*} + mv "$pkgdir"/$i "$subpkgdir"/$i + done +} + +conf_auth() { + pkgdesc="Conference with authorization for SEMS" + depends="sems sems-ivr" + cd "$pkgdir" + _mv_sub usr/lib/sems/ivr/conf_auth* +} + +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 +} + +diameter_client() { + pkgdesc="A simple DIAMETER client implementation for SEMS" + depends="sems" + cd "$pkgdir" + _mv_sub usr/lib/sems/plug-in/diameter_client.so +} + +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 +} + +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 +} + +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 (python) functionallity for SEMS" + depends="sems python2" + 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/ivr/*mailbox* +} + +mp3() { + pkgdesc="MP3 support for SEMS" + depends="sems" + _mv_sub usr/lib/sems/plug-in/mp3.so +} + +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/ivr/pin_collect* +} + +webconference() { + pkgdesc="Conference bridge via DI (xmlrpc) for SEMS" + 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 +} + +annrecorder() { + pkgdesc="Allow user to record personal greeting for SEMS" + depends="sems" + cd "$pkgdir" + _mv_sub etc/sems/etc/annrecorder.conf \ + usr/share/sems/audio/annrecorder \ + usr/lib/sems/plug-in/annrecorder.so +} + +voicebox() { + pkgdesc="Voicebox (call in for messsages) for SEMS" + 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 +} + +voicemail() { + pkgdesc="Play greeting and record voicemail for SEMS" + depends="sems" + cd "$pkgdir" + _mv_sub etc/sems/etc/voicemail.conf \ + usr/share/sems/audio/voicemail \ + usr/lib/sems/plug-in/voicemail.so +} + +_python() { + pkgdesc="Python bindings for SEMS" + depends="python2 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 +} + +jsonrpc() { + pkgdesc="Jsonrpc support for SEMS" + depends="sems" + _mv_sub \ + etc/sems/etc/jsonrpc.conf \ + usr/lib/sems/plug-in/jsonrpc.so +} + +registrar() { + pkgdesc="Support for SEMS to register to a SIP server" + 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 +} + +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" diff --git a/unmaintained/sems/sems-0001-Force-to-use-system-wide-GSM-includes.patch b/unmaintained/sems/sems-0001-Force-to-use-system-wide-GSM-includes.patch new file mode 100644 index 0000000000..d09b793395 --- /dev/null +++ b/unmaintained/sems/sems-0001-Force-to-use-system-wide-GSM-includes.patch @@ -0,0 +1,26 @@ +From de3c54f85f893e4ee985b1da93cc014b00456fa8 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov <lemenkov@gmail.com> +Date: Wed, 31 Mar 2010 11:52:52 +0400 +Subject: [PATCH 01/11] Force to use system-wide GSM includes + +Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> +--- + core/plug-in/gsm/gsm.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/core/plug-in/gsm/gsm.c b/core/plug-in/gsm/gsm.c +index 286a989..3517e59 100644 +--- a/core/plug-in/gsm/gsm.c ++++ b/core/plug-in/gsm/gsm.c +@@ -27,7 +27,7 @@ + + #include "amci.h" + #include "codecs.h" +-#include "gsm-1.0-pl10/inc/gsm.h" ++#include <gsm.h> + #include "../../log.h" + + #include <stdlib.h> +-- +1.7.3.4 + diff --git a/unmaintained/sems/sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch b/unmaintained/sems/sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch new file mode 100644 index 0000000000..0cfeab8c83 --- /dev/null +++ b/unmaintained/sems/sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch @@ -0,0 +1,33 @@ +From 26929b6a7a62299b71bf7c99f17f75670a2040e2 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov <lemenkov@gmail.com> +Date: Wed, 31 Mar 2010 11:53:48 +0400 +Subject: [PATCH 02/11] Allow rewrite of custom makefiles by CMake + +Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> +--- + CMakeLists.txt | 9 --------- + 1 files changed, 0 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a6ff425..ef3934e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,15 +26,6 @@ ELSE(IS_DEVEL) + ENDIF(IS_DEVEL) + MESSAGE(STATUS "Configuring ${CMAKE_PROJECT_NAME} v. ${SEMS_VERSION}") + +-IF(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE) +- message(FATAL_ERROR "In-source builds are not allowed. +-CMake would overwrite all makefiles distributed with SEMS. +-Please create a directory and run cmake from there, passing the path +-to this source directory as the last argument. +-This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. +-Please delete them.") +-ENDIF(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE) +- + OPTION(SEMS_USE_SPANDSP "Build with spandsp" OFF) + OPTION(SEMS_USE_LIBSAMPLERATE "Build with libsamplerate" OFF) + OPTION(SEMS_USE_ZRTP "Build with ZRTP" OFF) +-- +1.7.3.4 + diff --git a/unmaintained/sems/sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch b/unmaintained/sems/sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch new file mode 100644 index 0000000000..df0a5ad405 --- /dev/null +++ b/unmaintained/sems/sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch @@ -0,0 +1,26 @@ +From e322f2e00e48b639b5d87ed06738aa24d99396bf Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov <lemenkov@gmail.com> +Date: Wed, 31 Mar 2010 18:56:39 +0400 +Subject: [PATCH 03/11] Set CFG_PREFIX to empty string by default + +Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> +--- + CMakeLists.txt | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ef3934e..c36ce62 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -48,7 +48,7 @@ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STREQUAL "2.4") + SET(CMAKE_DL_LIBS ${CMAKE_DL_LIBS} m pthread) + + IF (NOT SEMS_CFG_PREFIX) +- SET(SEMS_CFG_PREFIX "/usr/local") ++ SET(SEMS_CFG_PREFIX "") + ENDIF (NOT SEMS_CFG_PREFIX) + MESSAGE(STATUS "SEMS cfg prefix was set to: ${SEMS_CFG_PREFIX}") + +-- +1.7.3.4 + diff --git a/unmaintained/sems/sems-0004-musl-fixes.patch b/unmaintained/sems/sems-0004-musl-fixes.patch new file mode 100644 index 0000000000..6302f30b39 --- /dev/null +++ b/unmaintained/sems/sems-0004-musl-fixes.patch @@ -0,0 +1,56 @@ +diff --git a/core/AmBasicSipDialog.cpp b/core/AmBasicSipDialog.cpp +index 8a9fc04..d6d5ab7 100644 +--- a/core/AmBasicSipDialog.cpp ++++ b/core/AmBasicSipDialog.cpp +@@ -591,7 +591,7 @@ int AmBasicSipDialog::reply(const AmSipRequest& req, + "remote_tag=%s\n", + req.cseq,code,callid.c_str(), + local_tag.c_str(),remote_tag.c_str()); +- log_stacktrace(L_ERR); ++ // log_stacktrace(L_ERR); + return -1; + } + DBG("reply: transaction found!\n"); +diff --git a/core/log.cpp b/core/log.cpp +index 933657e..efc2ae2 100644 +--- a/core/log.cpp ++++ b/core/log.cpp +@@ -206,6 +206,7 @@ void register_log_hook(AmLoggingFacility* fac) + log_hooks.push_back(fac); + } + ++#ifdef MUSL_SUPPORTS_BACKTRACE + /** + * Print stack-trace through logging function + */ +@@ -300,3 +301,5 @@ void __lds(int ll, unsigned int max_frames) + free(funcname); + free(symbollist); + } ++ ++#endif +diff --git a/core/log.h b/core/log.h +index 253d824..5ffda75 100644 +--- a/core/log.h ++++ b/core/log.h +@@ -33,7 +33,7 @@ + #include <stdio.h> + #include <unistd.h> /* getpid() */ + #include <pthread.h> /* pthread_self() */ +-#include <execinfo.h> /* backtrace_symbols() */ ++// #include <execinfo.h> /* backtrace_symbols() */ + + #ifdef __cplusplus + #include <cxxabi.h> /* __cxa_demangle() */ +diff --git a/core/sems.cpp b/core/sems.cpp +index 6f03e5c..d7030eb 100644 +--- a/core/sems.cpp ++++ b/core/sems.cpp +@@ -69,6 +69,7 @@ + using std::string; + + #if defined(__linux__) ++#include <sys/resource.h> + #include <sys/prctl.h> + #endif + diff --git a/unmaintained/sems/sems-0005-stats-needs-version.patch b/unmaintained/sems/sems-0005-stats-needs-version.patch new file mode 100644 index 0000000000..01a7108e0c --- /dev/null +++ b/unmaintained/sems/sems-0005-stats-needs-version.patch @@ -0,0 +1,12 @@ +diff --git a/core/plug-in/stats/StatsUDPServer.cpp b/core/plug-in/stats/StatsUDPServer.cpp +index c78dc10..8d92720 100644 +--- a/core/plug-in/stats/StatsUDPServer.cpp ++++ b/core/plug-in/stats/StatsUDPServer.cpp +@@ -26,6 +26,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++#include "sems.h" + #include "StatsUDPServer.h" + #include "Statistics.h" + #include "AmConfigReader.h" diff --git a/unmaintained/sems/sems-0010-Move-CMake-defines.patch b/unmaintained/sems/sems-0010-Move-CMake-defines.patch new file mode 100644 index 0000000000..be1b8be7a8 --- /dev/null +++ b/unmaintained/sems/sems-0010-Move-CMake-defines.patch @@ -0,0 +1,66 @@ +From c6fe28de4a05e33c317019261711f2babe98b95d Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov <lemenkov@gmail.com> +Date: Mon, 3 Jan 2011 22:16:24 +0300 +Subject: [PATCH 10/11] Move CMake defines + +Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> +--- + CMakeLists.txt | 3 +++ + core/CMakeLists.txt | 6 ------ + 2 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 78a6dfb..fdc88f4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,6 +80,7 @@ SET(CMAKE_VERBOSE_MAKEFILE ON) + # (which means that current debian and gentoo packages don't work) + IF(SEMS_USE_SPANDSP) + FIND_PACKAGE(Spandsp REQUIRED) ++ ADD_DEFINITIONS(-DUSE_SPANDSP -D__STDC_LIMIT_MACROS) + MESSAGE(STATUS "Using spandsp: YES") + ELSE(SEMS_USE_SPANDSP) + MESSAGE(STATUS "Using spandsp: NO (default)") +@@ -89,6 +90,7 @@ ENDIF(SEMS_USE_SPANDSP) + # (see http://www.mega-nerd.com/SRC/) + IF(SEMS_USE_LIBSAMPLERATE) + FIND_PACKAGE(Libsamplerate REQUIRED) ++ ADD_DEFINITIONS(-DUSE_LIBSAMPLERATE) + MESSAGE(STATUS "Using libsamplerate: YES") + ELSE(SEMS_USE_LIBSAMPLERATE) + MESSAGE(STATUS "Using libsamplerate: NO (default)") +@@ -128,6 +130,7 @@ ELSE(SEMS_USE_MONITORING) + ENDIF(SEMS_USE_MONITORING) + + IF(SEMS_USE_IPV6) ++ ADD_DEFINITIONS(-DSUPPORT_IPV6) + MESSAGE(STATUS "Enable IPv6 support: YES") + ELSE(SEMS_USE_IPV6) + MESSAGE(STATUS "Enable IPv6 support: NO (default)") +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index 7bd1341..5f0fb3f 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -18,19 +18,13 @@ ENDIF(NOT MAX_RTP_SESSIONS) + ADD_DEFINITIONS(-DMAX_RTP_SESSIONS=${MAX_RTP_SESSIONS}) + + IF(SPANDSP_FOUND) +- ADD_DEFINITIONS(-DUSE_SPANDSP -D__STDC_LIMIT_MACROS) + TARGET_LINK_LIBRARIES(sems ${CMAKE_DL_LIBS} spandsp) + ENDIF(SPANDSP_FOUND) + + IF(LIBSAMPLERATE_FOUND) +- ADD_DEFINITIONS(-DUSE_LIBSAMPLERATE) + TARGET_LINK_LIBRARIES(sems ${CMAKE_DL_LIBS} samplerate) + ENDIF(LIBSAMPLERATE_FOUND) + +-IF(SEMS_USE_IPV6) +- ADD_DEFINITIONS(-DSUPPORT_IPV6) +-ENDIF(SEMS_USE_IPV6) +- + ADD_SUBDIRECTORY(plug-in) + + # Create config-file from template +-- +1.7.3.4 + diff --git a/unmaintained/sems/sems-0011-Add-SBC-dependencies.patch b/unmaintained/sems/sems-0011-Add-SBC-dependencies.patch new file mode 100644 index 0000000000..cf572a0315 --- /dev/null +++ b/unmaintained/sems/sems-0011-Add-SBC-dependencies.patch @@ -0,0 +1,22 @@ +--- a/apps/sbc/CMakeLists.txt ++++ b/apps/sbc/CMakeLists.txt +@@ -6,6 +6,19 @@ + SBC.cpp + SBCCallProfile.cpp + SDPFilter.cpp ++ ++CallLeg.cpp ++RateLimit.cpp ++RegisterCache.cpp ++RegisterDialog.cpp ++ReplacesMapper.cpp ++SBCCallLeg.cpp ++SBCCallRegistry.cpp ++SBCEventLog.cpp ++SBCSimpleRelay.cpp ++SessionUpdate.cpp ++SubscriptionDialog.cpp ++arg_conversion.cpp + ) + + SET(sbc_config_files diff --git a/unmaintained/sems/sems-0013-Fix-for-C-11.patch b/unmaintained/sems/sems-0013-Fix-for-C-11.patch new file mode 100644 index 0000000000..5dd06b1cab --- /dev/null +++ b/unmaintained/sems/sems-0013-Fix-for-C-11.patch @@ -0,0 +1,45 @@ +From: Peter Lemenkov <lemenkov@gmail.com> +Date: Fri, 8 Apr 2016 14:50:23 +0300 +Subject: [PATCH] Fix for C++11 + +Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> + +diff --git a/apps/sbc/RegisterCache.cpp b/apps/sbc/RegisterCache.cpp +index cbd3c30..5cd1235 100644 +--- a/apps/sbc/RegisterCache.cpp ++++ b/apps/sbc/RegisterCache.cpp +@@ -955,7 +955,7 @@ bool _RegisterCache::throttleRegister(RegisterCacheCtx& ctx, + return false; // fwd + } + +- alias_updates.push_back(make_pair<string,long int>(reg_binding.alias, ++ alias_updates.push_back(make_pair(reg_binding.alias, + contact_expires)); + } + +diff --git a/apps/sbc/RegisterDialog.cpp b/apps/sbc/RegisterDialog.cpp +index 820e03d..88b94cb 100644 +--- a/apps/sbc/RegisterDialog.cpp ++++ b/apps/sbc/RegisterDialog.cpp +@@ -239,7 +239,7 @@ int RegisterDialog::fixUacContacts(const AmSipRequest& req) + continue; + } + +- alias_updates.push_back(make_pair<string,long int>(reg_binding.alias, ++ alias_updates.push_back(make_pair(reg_binding.alias, + contact_expires)); + } + +diff --git a/core/sip/resolver.cpp b/core/sip/resolver.cpp +index 9793069..7bc6ff7 100644 +--- a/core/sip/resolver.cpp ++++ b/core/sip/resolver.cpp +@@ -823,7 +823,7 @@ dns_entry_map::insert(const dns_entry_map::value_type& x) + bool dns_entry_map::insert(const string& key, dns_entry* e) + { + std::pair<iterator, bool> res = +- insert(make_pair<const key_type&,mapped_type>(key,e)); ++ insert(make_pair(key,e)); + + if(res.second) { + inc_ref(e); diff --git a/unmaintained/sems/sems.initd b/unmaintained/sems/sems.initd new file mode 100755 index 0000000000..fda1e8a838 --- /dev/null +++ b/unmaintained/sems/sems.initd @@ -0,0 +1,48 @@ +#!/sbin/openrc-run +# SIP Express Media Server configuration file +# Follows Gentoo/AlpineLinux standards +# GPL 2 License - N. Angelacos 2011 + +SVC="${SVCNAME#*.}" +SEMS_CFG_FILE=${SEMS_CFG_FILE:-/etc/sems/${SVC}.conf} +SEMS_PIDDIR=/var/run/sems +SEMS_PIDFILE=${SEMS_PIDFILE:-${SEMS_PIDDIR}/${SVC}.pid} +SEMS_BINARY=${SEMS_BINARY:-/usr/sbin/sems} +SEMS_USER=${SEMS_USER:-sems} +SEMS_GROUP=${SEMS_GROUP:-sems} + +checkconfig() { + if [ ! -f "${SEMS_CFG_FILE}" ] ; then + eerror "You need a "${SEMS_CFG_FILE}" file to run sems" + return 1; + fi +} + + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + mkdir -p "${SEMS_PIDDIR}" + chown ${SEMS_USER}:${SEMS_GROUP} "${SEMS_PIDDIR}" + + start-stop-daemon --start --exec "${SEMS_BINARY}" \ + --pidfile "${SEMS_PIDFILE}" \ + --wait ${SEMS_WAIT:-500} \ + -- \ + -f "${SEMS_CFG_FILE}" \ + -P "${SEMS_PIDFILE}" \ + -u "${SEMS_USER}" \ + -g "${SEMS_GROUP}" + eend $? +} + +stop() { + if [ "${RC_CMD}" = "restart" ] ; then + checkconfig || return 1 + fi + + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec "${SEMS_BINARY}" \ + --pidfile "${SEMS_PIDFILE}" --quiet + eend $? +} diff --git a/unmaintained/sems/sems.pre-install b/unmaintained/sems/sems.pre-install new file mode 100644 index 0000000000..5fe904da65 --- /dev/null +++ b/unmaintained/sems/sems.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S sems 2>/dev/null +adduser -S -D -H -h /var/empty -s /sbin/nologin -G sems -g sems sems 2>/dev/null + +exit 0 diff --git a/unmaintained/sems/std-types.patch b/unmaintained/sems/std-types.patch new file mode 100644 index 0000000000..edaf8d53aa --- /dev/null +++ b/unmaintained/sems/std-types.patch @@ -0,0 +1,281 @@ +diff --git a/apps/gateway/mISDNChannel.cpp b/apps/gateway/mISDNChannel.cpp +index 8abd77a..36e8778 100644 +--- a/apps/gateway/mISDNChannel.cpp ++++ b/apps/gateway/mISDNChannel.cpp +@@ -118,8 +118,8 @@ int mISDN_get_free_ext_ie(mISDN::Q931_info_t *qi) { + return (-1); + } + +-int mISDN_AddIE(mISDN::Q931_info_t *qi, u_char *p, u_char ie, u_char *iep) { +- u_char *ps; ++int mISDN_AddIE(mISDN::Q931_info_t *qi, unsigned char *p, unsigned char ie, unsigned char *iep) { ++ unsigned char *ps; + mISDN::ie_info_t *ies; + int l; + +@@ -158,7 +158,7 @@ int mISDN_AddIE(mISDN::Q931_info_t *qi, u_char *p, u_char ie, u_char *iep) { + } + l = iep[0] + 1; + } +- ps = (u_char *) qi; ++ ps = (unsigned char *) qi; + ps += L3_EXTRA_SIZE; + ies->off = (u16)(p - ps); + *p++ = ie; +diff --git a/core/sip/parse_dns.cpp b/core/sip/parse_dns.cpp +index 2b62f3e..d24f537 100644 +--- a/core/sip/parse_dns.cpp ++++ b/core/sip/parse_dns.cpp +@@ -6,10 +6,10 @@ + #define SECTION_COUNTS_OFF 4 + #define HEADER_OFFSET 12 + +-unsigned short dns_msg_count(u_char* begin, dns_section_type sect); +-int dns_skip_name(u_char** p, u_char* end); +-int dns_expand_name(u_char** ptr, u_char* begin, u_char* end, +- u_char* buf, unsigned int len); ++unsigned short dns_msg_count(unsigned char* begin, dns_section_type sect); ++int dns_skip_name(unsigned char** p, unsigned char* end); ++int dns_expand_name(unsigned char** ptr, unsigned char* begin, unsigned char* end, ++ unsigned char* buf, unsigned int len); + + + const char* dns_rr_type_str(dns_rr_type t) +@@ -27,11 +27,11 @@ const char* dns_rr_type_str(dns_rr_type t) + + + +-int dns_msg_parse(u_char* msg, int len, dns_parse_fct fct, void* data) ++int dns_msg_parse(unsigned char* msg, int len, dns_parse_fct fct, void* data) + { +- u_char* begin = msg; +- u_char* p = begin + HEADER_OFFSET; +- u_char* end = msg + len; ++ unsigned char* begin = msg; ++ unsigned char* p = begin + HEADER_OFFSET; ++ unsigned char* end = msg + len; + + if(p >= end) return -1; + +@@ -48,7 +48,7 @@ int dns_msg_parse(u_char* msg, int len, dns_parse_fct fct, void* data) + for(int i=0; i<dns_msg_count(begin,(dns_section_type)s); i++){ + + // expand name +- if(dns_expand_name(&p,begin,end,(u_char*)rr.name,NS_MAXDNAME) < 0) return -1; ++ if(dns_expand_name(&p,begin,end,(unsigned char*)rr.name,NS_MAXDNAME) < 0) return -1; + + // at least 8 bytes for type+class+ttl left? + if((p + 8) > end) return -1; +@@ -79,14 +79,14 @@ int dns_msg_parse(u_char* msg, int len, dns_parse_fct fct, void* data) + return 0; + } + +-unsigned short dns_msg_count(u_char* begin, dns_section_type sect) ++unsigned short dns_msg_count(unsigned char* begin, dns_section_type sect) + { +- u_char* p = begin + SECTION_COUNTS_OFF + 2*sect; ++ unsigned char* p = begin + SECTION_COUNTS_OFF + 2*sect; + + return ((u_short)*p)<<8 | ((u_short)*(p+1)); + } + +-int dns_skip_name(u_char** p, u_char* end) ++int dns_skip_name(unsigned char** p, unsigned char* end) + { + while(*p < end) { + +@@ -106,11 +106,11 @@ int dns_skip_name(u_char** p, u_char* end) + return -1; + } + +-int dns_expand_name(u_char** ptr, u_char* begin, u_char* end, +- u_char* start_buf, unsigned int len) ++int dns_expand_name(unsigned char** ptr, unsigned char* begin, unsigned char* end, ++ unsigned char* start_buf, unsigned int len) + { +- u_char* buf = start_buf; +- u_char* p = *ptr; ++ unsigned char* buf = start_buf; ++ unsigned char* p = *ptr; + bool is_ptr=false; + + while(p < end) { +diff --git a/core/sip/parse_dns.h b/core/sip/parse_dns.h +index c5de8b6..34406b0 100644 +--- a/core/sip/parse_dns.h ++++ b/core/sip/parse_dns.h +@@ -39,18 +39,18 @@ struct dns_record + + class dns_entry; + +-typedef int (*dns_parse_fct)(dns_record* rr, dns_section_type t, u_char* begin, u_char* end, void* data); ++typedef int (*dns_parse_fct)(dns_record* rr, dns_section_type t, unsigned char* begin, unsigned char* end, void* data); + +-int dns_msg_parse(u_char* msg, int len, dns_parse_fct fct, void* data); +-int dns_expand_name(u_char** ptr, u_char* begin, u_char* end, +- u_char* buf, unsigned int len); ++int dns_msg_parse(unsigned char* msg, int len, dns_parse_fct fct, void* data); ++int dns_expand_name(unsigned char** ptr, unsigned char* begin, unsigned char* end, ++ unsigned char* buf, unsigned int len); + +-inline uint16_t dns_get_16(const u_char* p) ++inline uint16_t dns_get_16(const unsigned char* p) + { + return ntohs(*(uint16_t*)p); + } + +-inline uint32_t dns_get_32(const u_char* p) ++inline uint32_t dns_get_32(const unsigned char* p) + { + return ntohl(*(uint32_t*)p); + } +diff --git a/core/sip/resolver.cpp b/core/sip/resolver.cpp +index 9793069..80c547c 100644 +--- a/core/sip/resolver.cpp ++++ b/core/sip/resolver.cpp +@@ -169,7 +169,7 @@ public: + stable_sort(ip_vec.begin(),ip_vec.end(),srv_less); + } + +- dns_base_entry* get_rr(dns_record* rr, u_char* begin, u_char* end); ++ dns_base_entry* get_rr(dns_record* rr, unsigned char* begin, unsigned char* end); + + int next_ip(dns_handle* h, sockaddr_storage* sa) + { +@@ -316,7 +316,7 @@ dns_entry* dns_entry::make_entry(dns_rr_type t) + } + } + +-void dns_entry::add_rr(dns_record* rr, u_char* begin, u_char* end, long now) ++void dns_entry::add_rr(dns_record* rr, unsigned char* begin, unsigned char* end, long now) + { + dns_base_entry* e = get_rr(rr,begin,end); + if(!e) return; +@@ -451,7 +451,7 @@ void ip_entry::to_sa(sockaddr_storage* sa) + string ip_entry::to_str() + { + if(type == IPv4) { +- u_char* cp = (u_char*)&addr; ++ unsigned char* cp = (unsigned char*)&addr; + return int2str(cp[0]) + + "." + int2str(cp[1]) + + "." + int2str(cp[2]) + +@@ -496,7 +496,7 @@ string ip_port_entry::to_str() + return ip_entry::to_str() + ":" + int2str(port); + } + +-dns_base_entry* dns_ip_entry::get_rr(dns_record* rr, u_char* begin, u_char* end) ++dns_base_entry* dns_ip_entry::get_rr(dns_record* rr, unsigned char* begin, unsigned char* end) + { + if(rr->type != dns_r_a) + return NULL; +@@ -516,16 +516,16 @@ dns_base_entry* dns_ip_entry::get_rr(dns_record* rr, u_char* begin, u_char* end) + return new_ip; + } + +-dns_base_entry* dns_srv_entry::get_rr(dns_record* rr, u_char* begin, u_char* end) ++dns_base_entry* dns_srv_entry::get_rr(dns_record* rr, unsigned char* begin, unsigned char* end) + { + if(rr->type != dns_r_srv) + return NULL; + +- u_char name_buf[NS_MAXDNAME]; +- const u_char * rdata = ns_rr_rdata(*rr); ++ unsigned char name_buf[NS_MAXDNAME]; ++ const unsigned char * rdata = ns_rr_rdata(*rr); + + /* Expand the target's name */ +- u_char* p = (u_char*)rdata+6; ++ unsigned char* p = (unsigned char*)rdata+6; + if (dns_expand_name(&p,begin,end, + name_buf, /* Result */ + NS_MAXDNAME) /* Size of result buffer */ +@@ -570,7 +570,7 @@ struct dns_search_h + }; + + int rr_to_dns_entry(dns_record* rr, dns_section_type t, +- u_char* begin, u_char* end, void* data) ++ unsigned char* begin, unsigned char* end, void* data) + { + // only answer and additional sections + if(t != dns_s_an && t != dns_s_ar) +@@ -668,7 +668,7 @@ void dns_naptr_entry::init() + stable_sort(ip_vec.begin(),ip_vec.end(),naptr_less); + } + +-dns_base_entry* dns_naptr_entry::get_rr(dns_record* rr, u_char* begin, u_char* end) ++dns_base_entry* dns_naptr_entry::get_rr(dns_record* rr, unsigned char* begin, unsigned char* end) + { + enum NAPTR_FieldIndex { + NAPTR_Flags = 0, +@@ -681,7 +681,7 @@ dns_base_entry* dns_naptr_entry::get_rr(dns_record* rr, u_char* begin, u_char* e + if(rr->type != dns_r_naptr) + return NULL; + +- const u_char * rdata = ns_rr_rdata(*rr); ++ const unsigned char * rdata = ns_rr_rdata(*rr); + + unsigned short order = dns_get_16(rdata); + rdata += 2; +@@ -856,7 +856,7 @@ _resolver::~_resolver() + + int _resolver::query_dns(const char* name, dns_entry_map& entry_map, dns_rr_type t) + { +- u_char dns_res[NS_PACKETSZ]; ++ unsigned char dns_res[NS_PACKETSZ]; + + if(!name) return -1; + +diff --git a/core/sip/resolver.h b/core/sip/resolver.h +index 7565898..caa81e8 100644 +--- a/core/sip/resolver.h ++++ b/core/sip/resolver.h +@@ -77,7 +77,7 @@ class dns_entry + : public atomic_ref_cnt, + public dns_base_entry + { +- virtual dns_base_entry* get_rr(dns_record* rr, u_char* begin, u_char* end)=0; ++ virtual dns_base_entry* get_rr(dns_record* rr, unsigned char* begin, unsigned char* end)=0; + + public: + vector<dns_base_entry*> ip_vec; +@@ -87,7 +87,7 @@ public: + dns_entry(); + virtual ~dns_entry(); + virtual void init()=0; +- virtual void add_rr(dns_record* rr, u_char* begin, u_char* end, long now); ++ virtual void add_rr(dns_record* rr, unsigned char* begin, unsigned char* end, long now); + virtual int next_ip(dns_handle* h, sockaddr_storage* sa)=0; + + virtual string to_str(); +@@ -140,7 +140,7 @@ public: + {} + + void init(){}; +- dns_base_entry* get_rr(dns_record* rr, u_char* begin, u_char* end); ++ dns_base_entry* get_rr(dns_record* rr, unsigned char* begin, unsigned char* end); + int next_ip(dns_handle* h, sockaddr_storage* sa); + + int fill_ip_list(const list<sip_destination>& ip_list); +@@ -199,7 +199,7 @@ public: + {} + + void init(); +- dns_base_entry* get_rr(dns_record* rr, u_char* begin, u_char* end); ++ dns_base_entry* get_rr(dns_record* rr, unsigned char* begin, unsigned char* end); + + // not needed + int next_ip(dns_handle* h, sockaddr_storage* sa) { return -1; } +diff --git a/core/sip/udp_trsp.cpp b/core/sip/udp_trsp.cpp +index eb3a1ce..e33a156 100644 +--- a/core/sip/udp_trsp.cpp ++++ b/core/sip/udp_trsp.cpp +@@ -300,7 +300,7 @@ void udp_trsp::run() + msg.msg_namelen = sizeof(sockaddr_storage); + msg.msg_iov = iov; + msg.msg_iovlen = 1; +- msg.msg_control = new u_char[DSTADDR_DATASIZE]; ++ msg.msg_control = new unsigned char[DSTADDR_DATASIZE]; + msg.msg_controllen = DSTADDR_DATASIZE; + + if(sock->get_sd()<=0){ |