summaryrefslogtreecommitdiff
path: root/core/vpnc
diff options
context:
space:
mode:
Diffstat (limited to 'core/vpnc')
-rw-r--r--core/vpnc/PKGBUILD35
-rw-r--r--core/vpnc/vpnc.conf17
-rw-r--r--core/vpnc/vpnc.rc35
3 files changed, 87 insertions, 0 deletions
diff --git a/core/vpnc/PKGBUILD b/core/vpnc/PKGBUILD
new file mode 100644
index 000000000..d14842636
--- /dev/null
+++ b/core/vpnc/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 100076 2010-11-20 04:16:25Z pierre $
+# Maintainer: Thomas Baechler <thomas@archlinux.org>
+
+pkgname=vpnc
+pkgver=0.5.3
+pkgrel=3
+pkgdesc="VPN client for cisco3000 VPN Concentrators"
+url="http://www.unix-ag.uni-kl.de/~massar/vpnc/"
+license=('GPL')
+depends=('libgcrypt' 'openssl' 'iproute2')
+arch=('i686' 'x86_64')
+source=("http://www.unix-ag.uni-kl.de/~massar/vpnc/$pkgname-$pkgver.tar.gz"
+ 'vpnc.conf' 'vpnc.rc')
+backup=('etc/vpnc/default.conf')
+md5sums=('4378f9551d5b077e1770bbe09995afb3'
+ 'a3f4e0cc682f437e310a1c86ae198e45'
+ 'c5885162ac198eaa36da9a01e7c0c55b')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ # Build hybrid support
+ sed -i 's|^#OPENSSL|OPENSSL|g' Makefile
+
+ make PREFIX=/usr
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir PREFIX=/usr install
+
+ install -D -m644 $srcdir/vpnc.conf $pkgdir/etc/vpnc/default.conf
+ install -D -m755 $srcdir/vpnc.rc $pkgdir/etc/rc.d/vpnc
+ rm -f $pkgdir/etc/vpnc/vpnc.conf
+}
diff --git a/core/vpnc/vpnc.conf b/core/vpnc/vpnc.conf
new file mode 100644
index 000000000..914f827fd
--- /dev/null
+++ b/core/vpnc/vpnc.conf
@@ -0,0 +1,17 @@
+# example vpnc configuration file
+# see vpnc --long-help for details
+
+#Interface name tun0
+#IKE DH Group dh2
+#Perfect Forward Secrecy nopfs
+
+# You may replace this script with something better
+#Script /etc/vpnc/vpnc-script
+# Enable this option for NAT traversal
+#UDP Encapsulate
+
+#IPSec gateway my.gateway.com
+#IPSec ID someid
+#IPSec secret somesecret
+#Xauth username myusername
+#Xauth password mypassword
diff --git a/core/vpnc/vpnc.rc b/core/vpnc/vpnc.rc
new file mode 100644
index 000000000..972ed3211
--- /dev/null
+++ b/core/vpnc/vpnc.rc
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Connecting to VPN"
+ /usr/sbin/vpnc
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon vpnc
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Disconnecting from VPN"
+ /usr/sbin/vpnc-disconnect
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon vpnc
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0