diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2013-02-16 00:18:10 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2013-02-16 00:18:10 -0500 |
commit | 0174f5578fd28a78c48e99e1730fdae27c0fdb1b (patch) | |
tree | a5a2e7697ed94031e7226f7adb508716f3c4b953 /pcr/olsrd | |
parent | 49eec46aeb12ce8e0d269ef9a04d48b64b0b5628 (diff) | |
download | abslibre-0174f5578fd28a78c48e99e1730fdae27c0fdb1b.tar.gz abslibre-0174f5578fd28a78c48e99e1730fdae27c0fdb1b.tar.bz2 abslibre-0174f5578fd28a78c48e99e1730fdae27c0fdb1b.zip |
Adding packages to pcr
Diffstat (limited to 'pcr/olsrd')
-rw-r--r-- | pcr/olsrd/PKGBUILD | 31 | ||||
-rwxr-xr-x | pcr/olsrd/olsrd.install | 21 | ||||
-rwxr-xr-x | pcr/olsrd/rc.d.olsrd | 36 |
3 files changed, 88 insertions, 0 deletions
diff --git a/pcr/olsrd/PKGBUILD b/pcr/olsrd/PKGBUILD new file mode 100644 index 000000000..668e39cea --- /dev/null +++ b/pcr/olsrd/PKGBUILD @@ -0,0 +1,31 @@ +# Contributor: William Rea <sillywilly@gmail.com> +# Maintainer: Claudio Pisa <clauz@ninux.org> +pkgname=olsrd +pkgver=0.6.1 +pkgrel=2 +pkgdesc="OLSR routing daemon (RFC 3626)" +arch=(i686 x86_64 ppc mips64el) +url="http://www.olsr.org" +license=('BSD') +depends=('glibc') +makedepends=('bison') +backup=etc/olsrd.conf +install=olsrd.install +source=(http://www.olsr.org/releases/0.6/${pkgname}-${pkgver}.tar.bz2 rc.d.olsrd) +md5sums=('a75fc9b6252df5b5f49f13418fafeff1' 'bc3e393e0179ffff0a6d6c9d6a5c4b60') + +build() { + cd $srcdir/$pkgname-$pkgver + + CFLAGS+=" -fPIC " \ + make OS=linux build_all +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install_all + + install -D -m755 $srcdir/rc.d.olsrd $pkgdir/etc/rc.d/olsrd + install -D -m644 license.txt $pkgdir/usr/share/licenses/olsrd/LICENSE +} + diff --git a/pcr/olsrd/olsrd.install b/pcr/olsrd/olsrd.install new file mode 100755 index 000000000..f49372538 --- /dev/null +++ b/pcr/olsrd/olsrd.install @@ -0,0 +1,21 @@ +post_install() { +echo "--------------------------------------------------------------------" +echo " Remember to edit /etc/olsrd.conf to match your network settings." +echo "--------------------------------------------------------------------" +/bin/true +} + +post_upgrade() { +/bin/true +} + +pre_remove() { +/etc/rc.d/olsrd stop +/bin/true +} + +op=$1 +shift + +$op "$@" + diff --git a/pcr/olsrd/rc.d.olsrd b/pcr/olsrd/rc.d.olsrd new file mode 100755 index 000000000..d257e22ef --- /dev/null +++ b/pcr/olsrd/rc.d.olsrd @@ -0,0 +1,36 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/olsrd` +case "$1" in + start) + stat_busy "Starting OLSR Daemon" + [ -z "$PID" ] && /usr/sbin/olsrd -d 0 &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon olsrd + stat_done + fi + ;; + stop) + stat_busy "Stopping OLSR Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon olsrd + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 + |