summaryrefslogtreecommitdiff
path: root/extra/misdnuser
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-04-01 00:01:56 +0000
committerroot <root@rshg054.dnsready.net>2012-04-01 00:01:56 +0000
commit939efb693a8b362edc0c6ccba62c5ce54fb501af (patch)
tree0aac5505f763d7331e27a11c0f843b9c6623195a /extra/misdnuser
parent977b78df305a06797773799a7295f2a5f3f013cf (diff)
Sun Apr 1 00:01:56 UTC 2012
Diffstat (limited to 'extra/misdnuser')
-rw-r--r--extra/misdnuser/PKGBUILD33
-rwxr-xr-xextra/misdnuser/misdncapid.rc45
2 files changed, 78 insertions, 0 deletions
diff --git a/extra/misdnuser/PKGBUILD b/extra/misdnuser/PKGBUILD
new file mode 100644
index 000000000..00dd5e1c2
--- /dev/null
+++ b/extra/misdnuser/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 154556 2012-03-30 08:32:21Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=misdnuser
+pkgver=2.0.11
+pkgrel=2
+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=('!libtool')
+source=(ftp://ftp.archlinux.org/other/misdnuser/${pkgname}-${pkgver}.tar.gz
+ misdncapid.rc)
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --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}/lib/udev/rules.d
+ mv ${pkgdir}/etc/udev/rules.d/45-misdn.rules ${pkgdir}/lib/udev/rules.d
+ rm -r ${pkgdir}/etc/udev/
+}
+md5sums=('1c8825afde76e290727240077bbd37ea'
+ '2009563b144de037ecb20f8d727a772e')
diff --git a/extra/misdnuser/misdncapid.rc b/extra/misdnuser/misdncapid.rc
new file mode 100755
index 000000000..5c47ca0a9
--- /dev/null
+++ b/extra/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