diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-11-06 13:37:54 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-11-06 13:37:54 -0300 |
commit | a48d075b90120462b9f97ab95a224d47e072f7dd (patch) | |
tree | 8ba729381a11d91f09b298d888636425c549498b /pcr/yate | |
parent | 4ce84837520f8c56ae998d5d2d98380faf3e3eb5 (diff) | |
parent | 8ab3c2d0517cb4db3ab2f7635d0b71b701e464ba (diff) | |
download | abslibre-a48d075b90120462b9f97ab95a224d47e072f7dd.tar.gz abslibre-a48d075b90120462b9f97ab95a224d47e072f7dd.tar.bz2 abslibre-a48d075b90120462b9f97ab95a224d47e072f7dd.zip |
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
Diffstat (limited to 'pcr/yate')
-rw-r--r-- | pcr/yate/PKGBUILD | 37 | ||||
-rwxr-xr-x | pcr/yate/yate.init | 61 |
2 files changed, 98 insertions, 0 deletions
diff --git a/pcr/yate/PKGBUILD b/pcr/yate/PKGBUILD new file mode 100644 index 000000000..e668cd3ae --- /dev/null +++ b/pcr/yate/PKGBUILD @@ -0,0 +1,37 @@ + # Maintainer: said + # Contributor: Yejun Yang <yejunx AT gmail DOT com> + # Contributor: Biru Ionut <ionut@archlinux.ro> + pkgname=yate + pkgver=4.2.0 + pkgrel=1 + pkgdesc="next-generation telephony engine" + arch=('i686' 'x86_64') + url="http://yate.null.ro" + license=('GPL') + depends=('speex' 'gsm' 'postgresql-libs' 'libmysqlclient' \ + 'alsa-lib' 'qt') + makedepends=('pkgconfig') + source=(http://yate.null.ro/tarballs/yate4/${pkgname}-${pkgver}-2.tar.gz yate.init) + options=(!makeflags) + + md5sums=('e6fd37f26ff5c50aa3fa16f6b2803d68' + 'c0d344607046c47c1d75ac23d323817a') + + + build() { + cd $srcdir/${pkgname} + export LDFLAGS="${LDFLAGS//-Wl,--as-needed}" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --with-libpq \ + --with-mysql \ + --without-openh323 + make + } + + package(){ + cd $srcdir/${pkgname} + make DESTDIR=$pkgdir install + install -D -m755 $srcdir/yate.init $pkgdir/etc/rc.d/yate + } +
\ No newline at end of file diff --git a/pcr/yate/yate.init b/pcr/yate/yate.init new file mode 100755 index 000000000..762fff8c7 --- /dev/null +++ b/pcr/yate/yate.init @@ -0,0 +1,61 @@ +#!/bin/bash +OPTS="-rs -vvv -l /var/log/yate" + +# Source function library. +. /etc/rc.conf +. /etc/rc.d/functions + +RETVAL=0 + +# See how we were called. +case "$1" in + start) + stat_busy "Starting YATE" + unset DISPLAY + + yate -d -p /var/run/yate.pid $OPTS + RETVAL=$? + if [ $RETVAL -gt 0 ]; then + stat_fail + else + add_daemon yate + touch /var/lock/yate + stat_done + fi + ;; + stop) + stat_busy "Stopping YATE" + [ -f /var/run/yate.pid ] && kill $(cat /var/run/yate.pid) > /dev/null 2>&1 + RETVAL=$? + if [ $RETVAL -gt 0 ]; then + stat_fail + else + rm -f /var/run/yate.pid + rm -f /var/lock/yate + rm_daemon yate + stat_done + fi + ;; + status) + [ -f /var/run/yate.pid ] && echo -e "Yate is running" || echo -e "Yate is not running" + ;; + restart) + $0 stop + sleep 1 + $1 start + ;; + condrestart) + if [ -f /var/lock/yate ]; then + $0 stop + $0 start + fi + ;; + reload) + pkill yate -HUP + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" + ;; +esac +exit $RETVAL |