summaryrefslogtreecommitdiff
path: root/community-testing/ipsec-tools
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/ipsec-tools')
-rw-r--r--community-testing/ipsec-tools/PKGBUILD35
-rwxr-xr-xcommunity-testing/ipsec-tools/ipsec.rc35
-rwxr-xr-xcommunity-testing/ipsec-tools/racoon.rc35
3 files changed, 105 insertions, 0 deletions
diff --git a/community-testing/ipsec-tools/PKGBUILD b/community-testing/ipsec-tools/PKGBUILD
new file mode 100644
index 000000000..77a72f6df
--- /dev/null
+++ b/community-testing/ipsec-tools/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 45815 2011-04-29 12:08:18Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Allan Henriksen <allan.henriksen@gmail.com>
+
+pkgname=ipsec-tools
+pkgver=0.8.0
+pkgrel=2
+pkgdesc="KAME IPSec tools ported to Linux"
+arch=('i686' 'x86_64')
+url="http://ipsec-tools.sourceforge.net/"
+depends=('readline' 'openssl' 'krb5')
+license=('GPL')
+options=('!makeflags' '!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/ipsec-tools/$pkgname-$pkgver.tar.bz2
+ racoon.rc
+ ipsec.rc)
+md5sums=('b79aae3055a51f8de5c0f1b8ca6cf619'
+ '416b8e362d86987b8c55f7153cdafbeb'
+ '90d0810267cbd847383ae3101699b192')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ sed -i 's#-Werror##' configure
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --enable-security-context=no --enable-hybrid --enable-dpd --enable-natt \
+ --enable-adminport --enable-gssapi
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+ install -Dm0755 $srcdir/racoon.rc $pkgdir/etc/rc.d/racoon
+ install -Dm0755 $srcdir/ipsec.rc $pkgdir/etc/rc.d/ipsec
+}
diff --git a/community-testing/ipsec-tools/ipsec.rc b/community-testing/ipsec-tools/ipsec.rc
new file mode 100755
index 000000000..cff472c59
--- /dev/null
+++ b/community-testing/ipsec-tools/ipsec.rc
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Loading IPSec Security Policy Database..."
+ /usr/sbin/setkey -f /etc/ipsec.conf &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon ipsec
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Unloading IPSec Security Policy Database..."
+ /usr/sbin/setkey -F -P
+ /usr/sbin/setkey -F
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ipsec
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-testing/ipsec-tools/racoon.rc b/community-testing/ipsec-tools/racoon.rc
new file mode 100755
index 000000000..1a67dcac5
--- /dev/null
+++ b/community-testing/ipsec-tools/racoon.rc
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/racoon`
+case "$1" in
+ start)
+ stat_busy "Starting Racoon IPSec daemon"
+ [ -z "$PID" ] && /usr/sbin/racoon
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon racoon
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Racoon IPSec daemon"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon racoon
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0