packages: lcr/lcr-dirs.patch (NEW), lcr/lcr-ncurses.patch (NEW), lcr/lcr.in...
jajcus
jajcus at pld-linux.org
Mon Jun 15 15:27:50 CEST 2009
Author: jajcus Date: Mon Jun 15 13:27:50 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- new package: Linux-Call-Router
---- Files affected:
packages/lcr:
lcr-dirs.patch (NONE -> 1.1) (NEW), lcr-ncurses.patch (NONE -> 1.1) (NEW), lcr.init (NONE -> 1.1) (NEW), lcr.spec (NONE -> 1.1) (NEW), lcr.sysconfig (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/lcr/lcr-dirs.patch
diff -u /dev/null packages/lcr/lcr-dirs.patch:1.1
--- /dev/null Mon Jun 15 15:27:50 2009
+++ packages/lcr/lcr-dirs.patch Mon Jun 15 15:27:44 2009
@@ -0,0 +1,31 @@
+diff -dur -x '*~' lcr.orig/Makefile.am lcr/Makefile.am
+--- lcr.orig/Makefile.am 2009-06-10 21:31:03.000000000 +0200
++++ lcr/Makefile.am 2009-06-15 14:56:48.000000000 +0200
+@@ -20,22 +20,15 @@
+ ## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ ## Boston, MA 02110-1301, USA.
+
+-INSTALLdir = $(DESTDIR)/usr/local/lcr
+-
+ pkglogdir=$(localstatedir)/log/@PACKAGE@
+ pkgsysconfdir=$(sysconfdir)/@PACKAGE@
+
+-#CONFIGdir=$(DESTDIR)$(pkgsysconfdir)
+-#SHAREdir=$(DESTDIR)$(pkgdatadir)
+-#LOGdir=$(DESTDIR)$(pkglogdir)
+-#EXTENSIONdir=$(DESTDIR)$(localstatedir)/lib/lcr
+-
+-CONFIGdir=$(INSTALLdir)
+-SHAREdir=$(INSTALLdir)
+-LOGdir=$(INSTALLdir)
+-EXTENSIONdir=$(INSTALLdir)/extensions
++CONFIGdir=$(DESTDIR)$(pkgsysconfdir)
++SHAREdir=$(DESTDIR)$(pkgdatadir)
++LOGdir=$(DESTDIR)$(pkglogdir)
++EXTENSIONdir=$(DESTDIR)$(localstatedir)/lib/lcr
+
+-astmoddir = $(DESTDIR)/usr/lib/asterisk/modules
++astmoddir = $(DESTDIR)$(libdir)/asterisk/modules
+
+ INSTALLATION_DEFINES = \
+ -DCONFIG_DATA="\"$(CONFIGdir)\"" \
================================================================
Index: packages/lcr/lcr-ncurses.patch
diff -u /dev/null packages/lcr/lcr-ncurses.patch:1.1
--- /dev/null Mon Jun 15 15:27:50 2009
+++ packages/lcr/lcr-ncurses.patch Mon Jun 15 15:27:44 2009
@@ -0,0 +1,24 @@
+diff -dur lcr.orig/lcradmin.c lcr/lcradmin.c
+--- lcr.orig/lcradmin.c 2009-05-08 11:19:47.000000000 +0200
++++ lcr/lcradmin.c 2009-06-15 14:43:24.000000000 +0200
+@@ -21,7 +21,7 @@
+ #include <sys/un.h>
+ #include <sys/time.h>
+ #include <errno.h>
+-#include <curses.h>
++#include <ncurses/curses.h>
+ #include "macro.h"
+ #include "options.h"
+ #include "join.h"
+diff -dur lcr.orig/socket_server.c lcr/socket_server.c
+--- lcr.orig/socket_server.c 2009-04-05 11:40:18.000000000 +0200
++++ lcr/socket_server.c 2009-06-15 14:43:36.000000000 +0200
+@@ -12,7 +12,7 @@
+ #include "main.h"
+ #include <sys/socket.h>
+ #include <sys/un.h>
+-#include <curses.h>
++#include <ncurses/curses.h>
+
+
+ char socket_name[128];
================================================================
Index: packages/lcr/lcr.init
diff -u /dev/null packages/lcr/lcr.init:1.1
--- /dev/null Mon Jun 15 15:27:50 2009
+++ packages/lcr/lcr.init Mon Jun 15 15:27:44 2009
@@ -0,0 +1,90 @@
+#!/bin/sh
+#
+# lcr Linux-Call-Router
+#
+# chkconfig: 345 85 15
+# description: Formerly known as "PBX4Linux", Linux-Call-Router is not only a
+# router, it is a real ISDN PBX which interconnects ISDN
+# telephones and ISDN lines.
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/lcr ] && . /etc/sysconfig/lcr
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down "Linux-Call-Router"
+ exit 1
+ fi
+else
+ exit 0
+fi
+
+start() {
+ # Check if the service is already running?
+ if [ ! -f /var/lock/subsys/lcr ]; then
+ msg_starting "Linux-Call-Router"
+ daemon $SERVICE_RUN_NICE_LEVEL lcr fork
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lcr
+ else
+ msg_already_running "Linux-Call-Router"
+ fi
+}
+
+stop() {
+ # Stop daemons.
+ if [ -f /var/lock/subsys/lcr ]; then
+ msg_stopping "Linux-Call-Router"
+ killproc lcr
+ rm -f /var/lock/subsys/lcr >/dev/null 2>&1
+ else
+ msg_not_running "Linux-Call-Router"
+ fi
+}
+
+reload() {
+ lcradmin interface && lcradmin route
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status lcr
+ RETVAL=$?
+ ;;
+ restart|force-reload)
+ stop
+ start
+ ;;
+ reload)
+ if [ -f /var/lock/subsys/lcr ]; then
+ msg_reloading "Linux-Call-Router"
+ reload
+ RETVAL=$?
+ else
+ msg_not_running "Linux-Call-Router"
+ RETVAL=7
+ fi
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ exit 3
+ ;;
+esac
+
+exit $RETVAL
================================================================
Index: packages/lcr/lcr.spec
diff -u /dev/null packages/lcr/lcr.spec:1.1
--- /dev/null Mon Jun 15 15:27:50 2009
+++ packages/lcr/lcr.spec Mon Jun 15 15:27:44 2009
@@ -0,0 +1,106 @@
+# $Revision$, $Date$
+#
+%define _snap 20090615
+Summary: Linux-Call-Router - an ISDN PBX for Linux
+Summary(pl.UTF-8): Linux-Call-Router - centralka ISDN dla Linuksa
+Name: lcr
+Version: 1.5
+Release: 0.%{_snap}.1
+License: GPL v2+
+Group: Applications/System
+Source0: http://www.linux-call-router.de/download/lcr-1.5/lcr_%{_snap}.tar.gz
+# Source0-md5: 84eabeba617c578f89c33e1aadd59d03
+Source1: %{name}.sysconfig
+Source2: %{name}.init
+Patch0: %{name}-ncurses.patch
+Patch1: %{name}-dirs.patch
+URL: http://www.linux-call-router.de/
+BuildRequires: rpmbuild(macros) >= 1.228
+Requires(post,preun): /sbin/chkconfig
+BuildRequires: asterisk-devel
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: mISDNuser-devel >= 2.0
+BuildRequires: ncurses-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Formerly known as "PBX4Linux", Linux-Call-Router is not only a router, it is a
+real ISDN PBX which interconnects ISDN telephones and ISDN lines. It is
+possible to connect telephones to a Linux box. It is a pure software solution
+except for the ISDN cards and telephones. The great benefit is the NT-mode that
+allows to connect telephones to an ISDN card. Special cards are needed and a
+little bit of different cabeling. It supports lots of features, that only
+expensive PBXs have. It include a channel driver that can link LCR to Asterisk
+PBX.
+
+%description -l pl.UTF-8
+
+%package -n asterisk-chan_lcr
+Summary: Linux-Call-Router channel for Asterisk
+Group: Applications/System
+
+%description -n asterisk-chan_lcr
+chan_lcr turns LCR into an ISDN channel driver for Asterisk PBX.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+
+%preun
+if [ "$1" = "0" ]; then
+ %service -q %{name} stop
+ /sbin/chkconfig --del %{name}
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README
+%dir %{_sysconfdir}/lcr
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lcr/*
+%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_sbindir}/*
+%{_datadir}/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+
+%files -n asterisk-chan_lcr
+%defattr(644,root,root,755)
+%{_libdir}/asterisk/modules/*
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2009/06/15 13:27:44 jajcus
+- new package: Linux-Call-Router
+
================================================================
Index: packages/lcr/lcr.sysconfig
diff -u /dev/null packages/lcr/lcr.sysconfig:1.1
--- /dev/null Mon Jun 15 15:27:50 2009
+++ packages/lcr/lcr.sysconfig Mon Jun 15 15:27:44 2009
@@ -0,0 +1,4 @@
+# Customized settings for lcr
+
+# Define nice level for lcr
+#SERVICE_RUN_NICE_LEVEL="+0"
================================================================
More information about the pld-cvs-commit
mailing list