summaryrefslogtreecommitdiff
path: root/community/misdnuser
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-01-28 00:05:59 -0800
committerroot <root@rshg054.dnsready.net>2013-01-28 00:05:59 -0800
commit1b9f6dc846379470b620b5dbb9d4d7acd1de148c (patch)
tree2305b950a3c94970b05c1a38af473f5cca95af02 /community/misdnuser
parentb9b96ada56ad38df20b1e528a095a1e86ab67a2b (diff)
Mon Jan 28 00:05:59 PST 2013
Diffstat (limited to 'community/misdnuser')
-rw-r--r--community/misdnuser/PKGBUILD50
-rw-r--r--community/misdnuser/c2faxrecv-mISDNcapid.service11
-rw-r--r--community/misdnuser/mISDNcapid.conf1
-rw-r--r--community/misdnuser/mISDNcapid.service11
-rwxr-xr-xcommunity/misdnuser/misdncapid.rc45
5 files changed, 118 insertions, 0 deletions
diff --git a/community/misdnuser/PKGBUILD b/community/misdnuser/PKGBUILD
new file mode 100644
index 000000000..dde4a06f8
--- /dev/null
+++ b/community/misdnuser/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 83164 2013-01-27 16:21:34Z pierre $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=misdnuser
+pkgver=2.0.17_20120917
+pkgrel=1
+pkgdesc="Tools and library for mISDN"
+arch=('i686' 'x86_64')
+url="http://www.misdn.org"
+license=('GPL')
+depends=('isdn4k-utils' 'spandsp')
+backup=('etc/capi20.conf')
+options=('!makeflags' '!libtool' '!strip')
+source=(ftp://ftp.archlinux.org/other/misdnuser/${pkgname}-${pkgver}.tar.gz
+ misdncapid.rc
+ mISDNcapid.service
+ c2faxrecv-mISDNcapid.service
+ mISDNcapid.conf)
+
+build() {
+ # only enable for debugging!
+ #export CFLAGS+=" -g -O0"
+ #export CXXFLAGS+=" -g -O0"
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make
+ ./configure --prefix=/usr --sysconfdir=/etc --enable-capi --enable-softdsp --with-mISDN_group=uucp
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+ install -D -m 755 ${srcdir}/misdncapid.rc ${pkgdir}/etc/rc.d/misdncapid
+ # fix udev rule
+ mkdir -p ${pkgdir}/usr/lib/udev/rules.d
+ mv ${pkgdir}/etc/udev/rules.d/45-misdn.rules ${pkgdir}/usr/lib/udev/rules.d
+ rm -r ${pkgdir}/etc/udev/
+ # add systemd files
+ install -D -m644 ${srcdir}/mISDNcapid.service ${pkgdir}/usr/lib/systemd/system/mISDNcapid.service
+ # mISDNcapid:
+ # tends to crash on avmfritz card, add an extra systemd file for
+ # restarting the services until segfaults are fixed!
+ install -D -m644 ${srcdir}/c2faxrecv-mISDNcapid.service ${pkgdir}/usr/lib/systemd/system/c2faxrecv-mISDNcapid.service
+ install -D -m644 ${srcdir}/mISDNcapid.conf ${pkgdir}/usr/lib/tmpfiles.d/mISDNcapid.conf
+}
+md5sums=('4cdb52f2c0ff1a1426573ac5ef09e9f8'
+ '2009563b144de037ecb20f8d727a772e'
+ '8f305ee6e35fa12a8bec0632bfe7a076'
+ '32ead7f063e007c784aa883d441f33c2'
+ '42c3b46880a68c3883ee1ed00af34b45')
diff --git a/community/misdnuser/c2faxrecv-mISDNcapid.service b/community/misdnuser/c2faxrecv-mISDNcapid.service
new file mode 100644
index 000000000..7a98ca435
--- /dev/null
+++ b/community/misdnuser/c2faxrecv-mISDNcapid.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=mISDN CAPI to fax receive
+Requires=faxq.service mISDNcapid.service
+After=faxq.service mISDNcapid.service
+
+[Service]
+ExecStart=/usr/bin/c2faxrecv
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community/misdnuser/mISDNcapid.conf b/community/misdnuser/mISDNcapid.conf
new file mode 100644
index 000000000..7607e262d
--- /dev/null
+++ b/community/misdnuser/mISDNcapid.conf
@@ -0,0 +1 @@
+D /var/run/mISDNcapid 0755 root root -
diff --git a/community/misdnuser/mISDNcapid.service b/community/misdnuser/mISDNcapid.service
new file mode 100644
index 000000000..94f38478a
--- /dev/null
+++ b/community/misdnuser/mISDNcapid.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=mISDN CAPI daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/mISDNcapid
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community/misdnuser/misdncapid.rc b/community/misdnuser/misdncapid.rc
new file mode 100755
index 000000000..5c47ca0a9
--- /dev/null
+++ b/community/misdnuser/misdncapid.rc
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+# general config
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID="$(pidof -o %PPID /usr/sbin/mISDNcapid)"
+case "$1" in
+ start)
+ stat_busy "Starting misdncapid"
+ if [ ! -x /var/run/mISDNcapid ] ; then
+ install -m755 -d /var/run/mISDNcapid
+ fi
+
+ [ -z "$PID" ] && /usr/sbin/mISDNcapid >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ PID=$(pidof -o %PPID /usr/sbin/mISDNcapid)
+ echo $PID > /var/run/misdncapid.pid
+ add_daemon misdncapid
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping misdncapid"
+ [ -f /var/run/misdncapid.pid ] && kill `cat /var/run/misdncapid.pid` >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm -f /var/run/misdncapid.pid
+ rm_daemon misdncapid
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ ;;
+esac
+exit 0