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.
This commit is contained in:
Andreas Enge 2013-03-03 14:10:57 +01:00
parent d688a2f0fd
commit 49f24f41e3
3 changed files with 84 additions and 1 deletions

View File

@ -158,6 +158,7 @@ MODULES = \
gnu/packages/tmux.scm \
gnu/packages/tor.scm \
gnu/packages/vim.scm \
gnu/packages/vpn.scm \
gnu/packages/wdiff.scm \
gnu/packages/wget.scm \
gnu/packages/which.scm \
@ -215,7 +216,8 @@ dist_patch_DATA = \
gnu/packages/patches/shishi-gets-undeclared.patch \
gnu/packages/patches/tar-gets-undeclared.patch \
gnu/packages/patches/tcsh-fix-autotest.patch \
gnu/packages/patches/teckit-cstdio.patch
gnu/packages/patches/teckit-cstdio.patch \
gnu/packages/patches/vpnc-script.patch
bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap
bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux

View File

@ -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() {

66
gnu/packages/vpn.scm Normal file
View File

@ -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/")))