summaryrefslogtreecommitdiff
path: root/community/miredo
diff options
context:
space:
mode:
Diffstat (limited to 'community/miredo')
-rw-r--r--community/miredo/PKGBUILD35
-rw-r--r--community/miredo/isatapd.rc.d37
-rw-r--r--community/miredo/miredo-server.rc.d37
-rw-r--r--community/miredo/miredo.install8
-rw-r--r--community/miredo/miredo.rc.d37
5 files changed, 154 insertions, 0 deletions
diff --git a/community/miredo/PKGBUILD b/community/miredo/PKGBUILD
new file mode 100644
index 000000000..f69a94afa
--- /dev/null
+++ b/community/miredo/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 31503 2010-11-01 10:29:17Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=miredo
+pkgver=1.2.3
+pkgrel=1
+pkgdesc="Teredo client and server."
+arch=('i686' 'x86_64')
+url="http://www.remlab.net/miredo/"
+license=('GPL')
+depends=(judy iproute2)
+backup=('etc/miredo/miredo.conf' 'etc/miredo/miredo-server.conf' 'etc/miredo/isatapd.conf')
+source=(http://www.remlab.net/files/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ isatapd.rc.d
+ miredo.install
+ miredo.rc.d
+ miredo-server.rc.d)
+md5sums=('6ba484ad5e331514a8a3452da2b144e7'
+ '51ab6d091192605ee9206944869cb2ab'
+ 'd1b655d7a851cdb46c91c3418ed1962f'
+ 'c5a9be5c3175fecec387f1710bfd2788'
+ '319aba1ae06349b76cb25fda0dba60a9')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-Judy
+ make
+ make DESTDIR="$pkgdir" install
+
+ install -D -m755 $startdir/miredo.rc.d $pkgdir/etc/rc.d/miredo
+ install -D -m755 $startdir/miredo-server.rc.d $pkgdir/etc/rc.d/miredo-server
+ install -D -m755 $startdir/isatapd.rc.d $pkgdir/etc/rc.d/isatapd
+ sed -i 's#/sbin/ip#/usr/sbin/ip#' $pkgdir/etc/miredo/client-hook
+}
diff --git a/community/miredo/isatapd.rc.d b/community/miredo/isatapd.rc.d
new file mode 100644
index 000000000..fa7bbd708
--- /dev/null
+++ b/community/miredo/isatapd.rc.d
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/isatapd`
+case "$1" in
+ start)
+ stat_busy "Starting userspace ISATAP client"
+ if [ -z "$PID" ]; then
+ /usr/sbin/isatapd
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon isatapd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping userspace ISATAP client"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon isatapd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/community/miredo/miredo-server.rc.d b/community/miredo/miredo-server.rc.d
new file mode 100644
index 000000000..d05513b23
--- /dev/null
+++ b/community/miredo/miredo-server.rc.d
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/miredo-server`
+case "$1" in
+ start)
+ stat_busy "Starting teredo protocol server"
+ if [ -z "$PID" ]; then
+ /usr/sbin/miredo-server
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon miredo-server
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping teredo protocol server"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon miredo-server
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/community/miredo/miredo.install b/community/miredo/miredo.install
new file mode 100644
index 000000000..338459fb3
--- /dev/null
+++ b/community/miredo/miredo.install
@@ -0,0 +1,8 @@
+post_remove() {
+
+ # clean up just in case
+ rm -f /var/run/miredo.pid
+ rm -f /var/run/miredo-server.pid
+ rm -f /var/run/isatapd.pid
+}
+
diff --git a/community/miredo/miredo.rc.d b/community/miredo/miredo.rc.d
new file mode 100644
index 000000000..500374b12
--- /dev/null
+++ b/community/miredo/miredo.rc.d
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/miredo`
+case "$1" in
+ start)
+ stat_busy "Starting teredo protocol client"
+ if [ -z "$PID" ]; then
+ /usr/sbin/miredo
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon miredo
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping teredo protocol client"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon miredo
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac