summaryrefslogtreecommitdiff
path: root/testing/vpnc
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-08-14 23:14:32 +0000
committerroot <root@rshg054.dnsready.net>2011-08-14 23:14:32 +0000
commit4784cc8068c68b6fc23c2bd0ee8158b2a924f5f4 (patch)
tree30dd0cb9a1406f132ae8c5b5dbbb4ee4b25732f8 /testing/vpnc
parent76c08dc0eadb92247b4978f3185ee4176603b7af (diff)
Sun Aug 14 23:14:32 UTC 2011
Diffstat (limited to 'testing/vpnc')
-rw-r--r--testing/vpnc/PKGBUILD43
-rw-r--r--testing/vpnc/fix-iproute-syntax.patch26
-rw-r--r--testing/vpnc/vpnc.conf17
-rw-r--r--testing/vpnc/vpnc.rc35
4 files changed, 121 insertions, 0 deletions
diff --git a/testing/vpnc/PKGBUILD b/testing/vpnc/PKGBUILD
new file mode 100644
index 000000000..04ee61cfc
--- /dev/null
+++ b/testing/vpnc/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 135374 2011-08-13 09:06:19Z thomas $
+# Maintainer: Thomas Baechler <thomas@archlinux.org>
+
+pkgname=vpnc
+pkgver=0.5.3
+pkgrel=4
+pkgdesc="VPN client for cisco3000 VPN Concentrators"
+url="http://www.unix-ag.uni-kl.de/~massar/vpnc/"
+license=('GPL')
+depends=('libgcrypt' 'openssl' 'iproute2' 'net-tools')
+optdepends=('openresolv: Let vpnc manage resolv.conf')
+arch=('i686' 'x86_64')
+source=("http://www.unix-ag.uni-kl.de/~massar/vpnc/$pkgname-$pkgver.tar.gz"
+ 'vpnc.conf'
+ 'vpnc.rc'
+ fix-iproute-syntax.patch)
+backup=('etc/vpnc/default.conf')
+md5sums=('4378f9551d5b077e1770bbe09995afb3'
+ 'a3f4e0cc682f437e310a1c86ae198e45'
+ 'c5885162ac198eaa36da9a01e7c0c55b'
+ '193a35773594667a2782701aff372551')
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ # Build hybrid support
+ sed -i 's|^#OPENSSL|OPENSSL|g' Makefile
+
+ # Fix vpnc-script
+ sed 's|/sbin/resolvconf|/usr/sbin/resolvconf|g' -i vpnc-script.in
+ patch -p1 -i "${srcdir}"/fix-iproute-syntax.patch
+
+ 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/testing/vpnc/fix-iproute-syntax.patch b/testing/vpnc/fix-iproute-syntax.patch
new file mode 100644
index 000000000..9cba4bec3
--- /dev/null
+++ b/testing/vpnc/fix-iproute-syntax.patch
@@ -0,0 +1,26 @@
+From a1cac186f66d0f2e8b1dce67e648aae4219c3013 Mon Sep 17 00:00:00 2001
+From: Alessandro Suardi <alessandro.suardi@gmail.com>
+Date: Sat, 28 May 2011 23:20:15 +0100
+Subject: [PATCH 1/1] Cope with new kernel/iproute including ipid in route list
+
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+---
+ vpnc-script | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/vpnc-script b/vpnc-script
+index cc62997..e0140c5 100755
+--- a/vpnc-script.in
++++ b/vpnc-script.in
+@@ -139,7 +139,7 @@ destroy_tun_device() {
+
+ if [ -n "$IPROUTE" ]; then
+ fix_ip_get_output () {
+- sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g'
++ sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g;s/ipid 0x....//g'
+ }
+
+ set_vpngateway_route() {
+--
+1.7.3.4
+
diff --git a/testing/vpnc/vpnc.conf b/testing/vpnc/vpnc.conf
new file mode 100644
index 000000000..914f827fd
--- /dev/null
+++ b/testing/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/testing/vpnc/vpnc.rc b/testing/vpnc/vpnc.rc
new file mode 100644
index 000000000..972ed3211
--- /dev/null
+++ b/testing/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