From 49f24f41e33d8ee1c6d8e5a92d388c3aebc3b81a Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Sun, 3 Mar 2013 14:10:57 +0100 Subject: 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. --- gnu/packages/patches/vpnc-script.patch | 15 ++++++++ gnu/packages/vpn.scm | 66 ++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 gnu/packages/patches/vpnc-script.patch create mode 100644 gnu/packages/vpn.scm (limited to 'gnu/packages') 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 +;;; +;;; 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 . + +(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/"))) -- cgit v1.2.3