From: Carsten Schlote <[email protected]>

This is a client for cisco VPN concentrators. See
http://www.unix-ag.uni-kl.de/~massar/vpnc/ for details.

There are no ptx/generics provided as there is a
new install_alternatve macro in work, which also
searches the PKGDIR for installed defaults.

The patch simply omits the man page creation from
the build procedure. The provided perl script to
build the man page tries to execute the compiled
cross vpnc executable for version output and fails.

Signed-off-by: Carsten Schlote <[email protected]>
---
 patches/vpnc-0.5.3/generic/series                 |    2 +
 patches/vpnc-0.5.3/generic/vpnc-cross-fixes.patch |   26 ++++++
 rules/vpnc.in                                     |   39 +++++++++
 rules/vpnc.make                                   |   92 +++++++++++++++++++++
 4 files changed, 159 insertions(+), 0 deletions(-)
 create mode 100644 patches/vpnc-0.5.3/generic/series
 create mode 100644 patches/vpnc-0.5.3/generic/vpnc-cross-fixes.patch
 create mode 100644 rules/vpnc.in
 create mode 100644 rules/vpnc.make

diff --git a/patches/vpnc-0.5.3/generic/series 
b/patches/vpnc-0.5.3/generic/series
new file mode 100644
index 0000000..2928fc6
--- /dev/null
+++ b/patches/vpnc-0.5.3/generic/series
@@ -0,0 +1,2 @@
+
+vpnc-cross-fixes.patch
diff --git a/patches/vpnc-0.5.3/generic/vpnc-cross-fixes.patch 
b/patches/vpnc-0.5.3/generic/vpnc-cross-fixes.patch
new file mode 100644
index 0000000..f209238
--- /dev/null
+++ b/patches/vpnc-0.5.3/generic/vpnc-cross-fixes.patch
@@ -0,0 +1,26 @@
+From: Carsten Schlote < [email protected]>
+Subject: Fix minor cross-compilation issues
+
+Disabled the man page generation, which seems to break for cross-
+compilation. Commented out and faked empty file.
+
+Signed-off-by: Carsten Schlote < [email protected]>
+---
+---
+ Makefile |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: vpnc-0.5.3/Makefile
+===================================================================
+--- vpnc-0.5.3.orig/Makefile   2008-11-19 21:36:12.000000000 +0100
++++ vpnc-0.5.3/Makefile        2010-02-03 12:04:55.000000000 +0100
+@@ -72,7 +72,8 @@
+       $(CC) -o $@ $^ $(LDFLAGS)
+ 
+ vpnc.8 : vpnc.8.template makeman.pl vpnc
+-      ./makeman.pl
++      echo "./makeman.pl not executed when crosscompiling"
++      touch $@
+ 
+ vpnc-script : vpnc-script.in
+       sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@
diff --git a/rules/vpnc.in b/rules/vpnc.in
new file mode 100644
index 0000000..bafb47b
--- /dev/null
+++ b/rules/vpnc.in
@@ -0,0 +1,39 @@
+## SECTION=networking
+
+menuconfig VPNC
+       tristate
+       select LIBGCRYPT
+       select LIBGPG_ERROR
+       select OPENSSL if VPNC_USE_CERTS
+       
+       prompt "vpnc                     "
+       ---help---
+       vpnc - client for cisco vpn concentrator
+
+       vpnc is supposed to work with:
+           * Cisco VPN concentrator 3000 Series
+           * Cisco IOS routers
+           * Cisco PIX / ASA Zecurity Appliances
+           * Juniper/Netscreen 
+
+       Supported Authentications: Hybrid, Pre-Shared-Key + XAUTH, 
Pre-Shared-Key
+       Supported IKE DH-Groups: dh1 dh2 dh5
+       Supported Hash Algo (IKE/IPSEC): md5 sha1
+       Supported Encryptions (IKE/IPSEC): (null) (1des) 3des aes128 aes192 
aes256
+       Perfect Forward Secrecy: nopfs dh1 dh2 dh5
+
+       Required Kernel Options: Universal TUN/TAP device driver support
+       Required Libraries: libgcrypt (version 1.1.90 for pre7 or later) 
(1.1.12 for pre1 to pre6)
+       Required dependency: libgpg-error
+       Optional Libraries: openssl (for hybrid auth support)
+
+if VPNC
+
+config VPNC_USE_CERTS
+       bool
+       prompt "enable hybrid auth support"
+       help
+         Uses SSL certificates and requires OpenSSL library 
+         installed on target.
+
+endif
diff --git a/rules/vpnc.make b/rules/vpnc.make
new file mode 100644
index 0000000..a2de445
--- /dev/null
+++ b/rules/vpnc.make
@@ -0,0 +1,92 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2008 by Carsten Schlote <[email protected]>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_VPNC) += vpnc
+
+#
+# Paths and names
+#
+VPNC_VERSION   := 0.5.3
+VPNC           := vpnc-$(VPNC_VERSION)
+VPNC_SUFFIX    := tar.gz
+VPNC_URL       := 
http://www.unix-ag.uni-kl.de/~massar/vpnc/$(VPNC).$(VPNC_SUFFIX)
+VPNC_SOURCE    := $(SRCDIR)/$(VPNC).$(VPNC_SUFFIX)
+VPNC_DIR       := $(BUILDDIR)/$(VPNC)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(VPNC_SOURCE):
+       @$(call targetinfo)
+       @$(call get, VPNC)
+
+# ----------------------------------------------------------------------------
+# Prepare, Compile and Install
+# ----------------------------------------------------------------------------
+
+VPNC_PATH      := PATH=$(CROSS_PATH)
+
+VPNC_CONF_TOOL := NO
+
+VPNC_MAKE_ENV  := $(CROSS_ENV)
+
+ifdef PTXCONF_VPNC_USE_CERTS
+VPNC_MAKE_ENV += \
+       OPENSSL_GPL_VIOLATION=-DOPENSSL_GPL_VIOLATION \
+       OPENSSLLIBS=-lcrypto
+endif
+
+VPNC_MAKE_OPT := \
+       DESTDIR=$(VPNC_PKGDIR) \
+       PREFIX=/usr \
+       CC=$(CROSS_CC) \
+       all
+
+VPNC_INSTALL_OPT := \
+       DESTDIR=$(VPNC_PKGDIR) \
+       PREFIX=/usr \
+       install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/vpnc.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, vpnc)
+       @$(call install_fixup, vpnc,PACKAGE,vpnc)
+       @$(call install_fixup, vpnc,PRIORITY,optional)
+       @$(call install_fixup, vpnc,VERSION,$(VPNC_VERSION))
+       @$(call install_fixup, vpnc,SECTION,base)
+       @$(call install_fixup, vpnc,AUTHOR,"Carsten Schlote 
<[email protected]>")
+       @$(call install_fixup, vpnc,DEPENDS,)
+       @$(call install_fixup, vpnc,DESCRIPTION,"vpnc - client for cisco vpn 
concentrator")
+
+
+       @$(call install_copy, vpnc, 0, 0, 0755, -, /usr/bin/cisco-decrypt)
+       @$(call install_copy, vpnc, 0, 0, 0755, -, /usr/bin/pcf2vpnc)
+
+       @$(call install_copy, vpnc, 0, 0, 0755, -, /usr/sbin/vpnc)
+       @$(call install_copy, vpnc, 0, 0, 0755, -, /usr/sbin/vpnc-disconnect)
+
+       @$(call install_copy, vpnc, 0, 0, 0755, /etc/vpnc)
+       @$(call install_alternative, vpnc, 0, 0, 0644, /etc/vpnc/default.conf)
+       @$(call install_alternative, vpnc, 0, 0, 0644, /etc/vpnc/vpnc-script)
+
+       @$(call install_finish, vpnc)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
1.6.5.6.gb3118


--
ptxdist mailing list
[email protected]

Reply via email to