aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2013-03-03 14:10:57 +0100
committerAndreas Enge <andreas@enge.fr>2013-03-03 14:12:57 +0100
commit49f24f41e33d8ee1c6d8e5a92d388c3aebc3b81a (patch)
tree89e846a0349bbcdc63d6fd2c3381abee5869dfa6 /gnu
parentd688a2f0fd2ab32f476917798e59e9ce9beef868 (diff)
downloadpatches-49f24f41e33d8ee1c6d8e5a92d388c3aebc3b81a.tar
patches-49f24f41e33d8ee1c6d8e5a92d388c3aebc3b81a.tar.gz
gnu: Add vpnc.
* gnu/packages/vpn.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages/patches/vpnc-script.patch: New file. * Makefile.am (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/patches/vpnc-script.patch15
-rw-r--r--gnu/packages/vpn.scm66
2 files changed, 81 insertions, 0 deletions
diff --git a/gnu/packages/patches/vpnc-script.patch b/gnu/packages/patches/vpnc-script.patch
new file mode 100644
index 0000000000..a0d9481952
--- /dev/null
+++ b/gnu/packages/patches/vpnc-script.patch
@@ -0,0 +1,15 @@
+This patch adapts the vpnc script to newer kernel versions, see
+ https://lkml.org/lkml/2011/3/24/645
+
+diff -u a/vpnc-script.in b/vpnc-script.in
+--- a/vpnc-script.in 2013-03-03 13:55:16.000000000 +0100
++++ b/vpnc-script.in 2013-03-03 13:56:11.000000000 +0100
+@@ -116,7 +116,7 @@
+
+ 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() {
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
new file mode 100644
index 0000000000..9393e1e7b4
--- /dev/null
+++ b/gnu/packages/vpn.scm
@@ -0,0 +1,66 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages vpn)
+ #:use-module ((guix licenses)
+ #:renamer (symbol-prefix-proc 'license:))
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu packages perl))
+
+(define-public vpnc
+ (package
+ (name "vpnc")
+ (version "0.5.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-"
+ version ".tar.gz"))
+ (sha256 (base32
+ "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6"))))
+ (build-system gnu-build-system)
+ (inputs `(("libgcrypt" ,libgcrypt)
+ ("perl" ,perl)
+ ("patch/script"
+ ,(search-patch "vpnc-script.patch"))))
+ (arguments
+ `(#:tests? #f ; there is no check target
+ #:patches (list (assoc-ref %build-inputs
+ "patch/script"))
+ #:phases
+ (alist-replace
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "Makefile"
+ (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
+ (substitute* "Makefile"
+ (("ETCDIR=/etc/vpnc") (string-append "ETCDIR=" out "/etc/vpnc")))))
+ %standard-phases)))
+ (synopsis "vpnc, a client for cisco vpn concentrators")
+ (description
+ "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.
+It supports IPSec (ESP) with Mode Configuration and Xauth. It supports only
+shared-secret IPSec authentication with Xauth, AES (256, 192, 128), 3DES,
+1DES, MD5, SHA1, DH1/2/5 and IP tunneling. It runs entirely in userspace.
+Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
+ (license license:gpl2+) ; some file are bsd-2, see COPYING
+ (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/")))