summaryrefslogtreecommitdiff
path: root/community-testing/miredo
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-18 00:01:40 +0000
committerroot <root@rshg054.dnsready.net>2012-06-18 00:01:40 +0000
commit0838a7ed482f29ddf71cf05e7ec6cf7c2728ce34 (patch)
treec7eab7aecb6ae497d23cfa7074bffd060d5eb8fe /community-testing/miredo
parent61f450a3578b7e51c337e1a687c0cef2bc07ff35 (diff)
Mon Jun 18 00:01:40 UTC 2012
Diffstat (limited to 'community-testing/miredo')
-rw-r--r--community-testing/miredo/PKGBUILD49
-rw-r--r--community-testing/miredo/isatapd.rc.d37
-rw-r--r--community-testing/miredo/miredo-server.rc.d37
-rw-r--r--community-testing/miredo/miredo.install8
-rw-r--r--community-testing/miredo/miredo.rc.d37
-rw-r--r--community-testing/miredo/miredo.service11
6 files changed, 179 insertions, 0 deletions
diff --git a/community-testing/miredo/PKGBUILD b/community-testing/miredo/PKGBUILD
new file mode 100644
index 000000000..4825572df
--- /dev/null
+++ b/community-testing/miredo/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 72555 2012-06-16 17:09:54Z dreisner $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=miredo
+pkgver=1.2.5
+pkgrel=2
+pkgdesc="Teredo client and server."
+arch=('i686' 'x86_64')
+url="http://www.remlab.net/miredo/"
+license=('GPL')
+depends=('judy' 'iproute2' 'libcap')
+backup=('etc/miredo/miredo.conf'
+ 'etc/miredo/client-hook')
+options=('!libtool')
+source=(http://www.remlab.net/files/${pkgname}/${pkgname}-${pkgver}.tar.xz
+ isatapd.rc.d
+ miredo.install
+ miredo.rc.d
+ miredo-server.rc.d
+ miredo.service)
+md5sums=('5114debbf9fcab5d292176e4548f8cd1'
+ '51ab6d091192605ee9206944869cb2ab'
+ 'd1b655d7a851cdb46c91c3418ed1962f'
+ 'c5a9be5c3175fecec387f1710bfd2788'
+ '319aba1ae06349b76cb25fda0dba60a9'
+ '3216d47d5aa979706b17b72d8b6e19b0')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib \
+ --with-Judy
+ make
+ make DESTDIR="$pkgdir" install
+
+ install -D -m755 $srcdir/miredo.rc.d $pkgdir/etc/rc.d/miredo
+ install -D -m755 $srcdir/miredo-server.rc.d $pkgdir/etc/rc.d/miredo-server
+ install -D -m755 $srcdir/isatapd.rc.d $pkgdir/etc/rc.d/isatapd
+ sed -i 's#/sbin/ip#/usr/sbin/ip#' $pkgdir/etc/miredo/client-hook
+
+ # avoid conflict with filesystem>=2012.06
+ rmdir "$pkgdir/var/run" "$pkgdir/var"
+
+ install -Dm644 "$srcdir/miredo.service" "$pkgdir/usr/lib/systemd/system/miredo.service"
+}
diff --git a/community-testing/miredo/isatapd.rc.d b/community-testing/miredo/isatapd.rc.d
new file mode 100644
index 000000000..fa7bbd708
--- /dev/null
+++ b/community-testing/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-testing/miredo/miredo-server.rc.d b/community-testing/miredo/miredo-server.rc.d
new file mode 100644
index 000000000..d05513b23
--- /dev/null
+++ b/community-testing/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-testing/miredo/miredo.install b/community-testing/miredo/miredo.install
new file mode 100644
index 000000000..338459fb3
--- /dev/null
+++ b/community-testing/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-testing/miredo/miredo.rc.d b/community-testing/miredo/miredo.rc.d
new file mode 100644
index 000000000..500374b12
--- /dev/null
+++ b/community-testing/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
diff --git a/community-testing/miredo/miredo.service b/community-testing/miredo/miredo.service
new file mode 100644
index 000000000..299a887de
--- /dev/null
+++ b/community-testing/miredo/miredo.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Teredo IPv6 Tunneling Daemon
+After=network.target
+
+[Service]
+ExecStartPre=/usr/sbin/miredo-checkconf /etc/miredo/miredo.conf
+ExecStart=/usr/sbin/miredo -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file