aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-isdn/lcr
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-11-11 21:41:31 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-11-11 21:41:31 +0800
commit0b0ef8aae6dc7b065728211771862095ae3cc562 (patch)
treea169e552e4f874a90a1938d116c6871c485df0ee /recipes-isdn/lcr
parent6fe3d672990da107909a20c9870c702b32dc20ce (diff)
lcr: Introduce 1.10 of LCR with a custom start script for it.
Diffstat (limited to 'recipes-isdn/lcr')
-rw-r--r--recipes-isdn/lcr/files/gsm-diff.patch44
-rw-r--r--recipes-isdn/lcr/files/lcr.init21
-rw-r--r--recipes-isdn/lcr/lcr_git.bb41
3 files changed, 106 insertions, 0 deletions
diff --git a/recipes-isdn/lcr/files/gsm-diff.patch b/recipes-isdn/lcr/files/gsm-diff.patch
new file mode 100644
index 0000000..0a84cac
--- /dev/null
+++ b/recipes-isdn/lcr/files/gsm-diff.patch
@@ -0,0 +1,44 @@
+Index: git/Makefile.am
+===================================================================
+--- git.orig/Makefile.am 2011-10-14 00:53:48.245117239 +0800
++++ git/Makefile.am 2011-10-14 00:53:48.633117240 +0800
+@@ -53,7 +53,7 @@
+
+ GSM_SOURCE += gsm_audio.c gsm.cpp
+
+-GSM_LIB += /usr/lib/libgsm.a
++GSM_LIB += -lgsm
+
+ #gsm_audio.po: gsm_audio.c gsm_audio.h
+ # $(CC) -D_GNU_SOURCE -fPIC -c gsm_audio.c -o gsm_audio.po
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2011-10-14 00:53:48.257117239 +0800
++++ git/configure.ac 2011-10-14 00:53:48.633117240 +0800
+@@ -178,12 +178,7 @@
+ AM_CONDITIONAL(ENABLE_GSM, test "x$with_gsm_bs" == "xyes" -o "x$with_gsm_ms" == "xyes")
+
+ AS_IF([test "x$with_gsm_bs" == xyes -o "x$with_gsm_ms" == xyes],
+- [AC_MSG_CHECKING(/usr/include/gsm/gsm.h)
+- if test -e /usr/include/gsm/gsm.h; then
+- AC_MSG_RESULT(yes)
+- else
+- AC_MSG_FAILURE([You have enabled GSM, but /usr/include/gsm/gsm.h not found! Please install the lossy GSM codec. Be sure to install it in /usr/ and not in /usr/local/. You will also find a copy on http://www.linux-call-router.de.])
+- fi
++ AC_MSG_RESULT(yes...why not use ac_check_headers...)
+ ])
+
+ # check for ss5
+Index: git/gsm_audio.c
+===================================================================
+--- git.orig/gsm_audio.c 2011-10-14 00:53:48.000000000 +0800
++++ git/gsm_audio.c 2011-10-14 00:55:12.929117386 +0800
+@@ -10,7 +10,7 @@
+ \*****************************************************************************/
+
+ extern "C" {
+-#include "/usr/include/gsm/gsm.h"
++#include <gsm/gsm.h>
+
+
+ /* create gsm instance */
diff --git a/recipes-isdn/lcr/files/lcr.init b/recipes-isdn/lcr/files/lcr.init
new file mode 100644
index 0000000..f9924c5
--- /dev/null
+++ b/recipes-isdn/lcr/files/lcr.init
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+NAME=lcr
+
+set -e
+
+case "$1" in
+ start)
+ /usr/sbin/lcr fork
+ echo "Forked asterisk"
+ ;;
+ stop)
+ echo "Can not stop it"
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+esac
+
+exit 0
diff --git a/recipes-isdn/lcr/lcr_git.bb b/recipes-isdn/lcr/lcr_git.bb
new file mode 100644
index 0000000..de820e6
--- /dev/null
+++ b/recipes-isdn/lcr/lcr_git.bb
@@ -0,0 +1,41 @@
+DESCRITOPN = "Linux Call Router"
+DEPENDS = "misdn-utils asterisk libgsm"
+HOMEPAGE = "http://isdn.eversberg.eu/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=de9327a12ae1ccc94dade892a360f996"
+
+PV = "1.10"
+PR = "r10"
+
+SRCREV = "27ade6eeb9859a0702e77b27ca0abed63d298cda"
+SRC_URI = "git://git.misdn.org/lcr.git \
+ file://lcr.init \
+ file://gsm-diff.patch"
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-gsm-bs --with-asterisk"
+
+RDEPENDS_${PN} += "kernel-module-misdn-l1loop kernel-module-misdn-dsp"
+
+inherit autotools update-rc.d
+
+PACKAGES =+ "${PN}-tones-de ${PN}-vbox-de \
+ ${PN}-tones-en ${PN}-vbox-en "
+
+FILES_${PN} += "/usr/local ${libdir}/asterisk/modules"
+FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug"
+CONFFILES_${PN} = "/usr/local/lcr/interface.conf /usr/local/lcr/routing.conf /usr/local/lcr/options.conf"
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "lcr"
+INITSCRIPT_PARAMS_${PN} = "defaults 30 30"
+
+FILES_${PN}-tones-de = "/usr/local/lcr/tones_german"
+FILES_${PN}-tones-en = "/usr/local/lcr/tones_american"
+FILES_${PN}-vbox-de = "/usr/local/lcr/vbox_german"
+FILES_${PN}-vbox-en = "/usr/local/lcr/vbox_english"
+
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0775 ${WORKDIR}/lcr.init ${D}${sysconfdir}/init.d/lcr
+}