From f9e0f79bdd41d822c22688513f68e30ebb4d4003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Fri, 14 Sep 2012 19:23:23 -0300 Subject: AICCU - Automatic IPv6 Connectivity Client Utility --- social/aiccu/PKGBUILD | 33 +++++++++++++++++++++++++++ social/aiccu/aiccu.rc.d | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 social/aiccu/PKGBUILD create mode 100644 social/aiccu/aiccu.rc.d (limited to 'social') diff --git a/social/aiccu/PKGBUILD b/social/aiccu/PKGBUILD new file mode 100644 index 000000000..5fc4cb086 --- /dev/null +++ b/social/aiccu/PKGBUILD @@ -0,0 +1,33 @@ +pkgname=aiccu +pkgver=20070115 +pkgrel=7 +pkgdesc="SixXS Automatic IPv6 Connectivity Client Utility - AICCU" +arch=('i686' 'x86_64') +url="http://www.sixxs.net/tools/aiccu/" +license=('BSD') +depends=('gnutls' 'iproute2') +makedepends=('glibc' 'libgpg-error' 'libtasn1' 'libgcrypt' 'zlib') +backup=(etc/aiccu.conf) +source=(http://www.sixxs.net/archive/sixxs/aiccu/unix/${pkgname}_${pkgver}.tar.gz + aiccu.rc.d) +md5sums=('c9bcc83644ed788e22a7c3f3d4021350' + '9eb63ae132d4835a822ea925c6440b04') + +build() { + cd "$srcdir/$pkgname" + + sed -i 's|Installing Debian-style init.d||' Makefile + + LDFLAGS="" make + make DESTDIR="$pkgdir" install +} + +package() { + cd "$srcdir/$pkgname" + + install -D -m600 doc/aiccu.conf "$pkgdir/etc/aiccu.conf" + install -D -m755 "$srcdir/aiccu.rc.d" "$pkgdir/etc/rc.d/aiccu" + install -D -m444 doc/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + rm -fr "$pkgdir/etc/init.d" +} diff --git a/social/aiccu/aiccu.rc.d b/social/aiccu/aiccu.rc.d new file mode 100644 index 000000000..b0ca08fce --- /dev/null +++ b/social/aiccu/aiccu.rc.d @@ -0,0 +1,60 @@ +#!/bin/bash + +daemon_name=aiccu + +. /etc/rc.conf +. /etc/rc.d/functions + +get_pid() { + pidof $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name daemon" + + PID=`get_pid` + if [ -z "$PID" ]; then + [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid + # RUN + $daemon_name start > /dev/null + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo `get_pid` > /var/run/$daemon_name.pid + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=`get_pid` + # RUN + $daemon_name stop + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f /var/run/$daemon_name.pid &> /dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 -- cgit v1.2.3