From: Carsten Schlote <[email protected]> Added simple to use VPN packet.
Signed-off-by: Carsten Schlote <[email protected]> --- rules/openvpn.in | 23 ++++++++++ rules/openvpn.make | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+), 0 deletions(-) create mode 100644 rules/openvpn.in create mode 100644 rules/openvpn.make diff --git a/rules/openvpn.in b/rules/openvpn.in new file mode 100644 index 0000000..73785b2 --- /dev/null +++ b/rules/openvpn.in @@ -0,0 +1,23 @@ +## SECTION=networking +menuconfig OPENVPN + tristate + default n + prompt "OpenVPN " + select OPENSSL + select LIBLZO if OPENVPN_LZO + help + This adds OpenSwan to your root filesystem. Plain vanilla + packet. + +if OPENVPN + +config OPENVPN_LZO + bool + default n + prompt "Enable LZO compression" + help + This enables the LZO compression code. Selecting this option + will select the LZO library as well. + If unsure, say N. + +endif diff --git a/rules/openvpn.make b/rules/openvpn.make new file mode 100644 index 0000000..754657e --- /dev/null +++ b/rules/openvpn.make @@ -0,0 +1,123 @@ +# -*-makefile-*- +# $Id: template 6655 2007-01-02 12:55:21Z rsc $ +# +# Copyright (C) 2007 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_OPENVPN) += openvpn + +# +# Paths and names +# +OPENVPN_VERSION := 2.0.9 +OPENVPN := openvpn-$(OPENVPN_VERSION) +OPENVPN_SUFFIX := tar.gz +OPENVPN_URL := http://openvpn.net/release/$(OPENVPN).$(OPENVPN_SUFFIX) +OPENVPN_SOURCE := $(SRCDIR)/$(OPENVPN).$(OPENVPN_SUFFIX) +OPENVPN_DIR := $(BUILDDIR)/$(OPENVPN) + + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(OPENVPN_SOURCE): + @$(call targetinfo, $@) + @$(call get, OPENVPN) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +$(STATEDIR)/openvpn.extract: + @$(call targetinfo) + @$(call clean, $(OPENVPN_DIR)) + @$(call extract, OPENVPN) + @$(call patchin, OPENVPN) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +OPENVPN_PATH := PATH=$(CROSS_PATH) +OPENVPN_ENV := $(CROSS_ENV) + +# +# autoconf +# +OPENVPN_AUTOCONF := $(CROSS_AUTOCONF_USR) + +ifndef PTXCONF_OPENVPN_LZO +OPENVPN_LZO := --disable-lzo +endif + +$(STATEDIR)/openvpn.prepare: + @$(call targetinfo, $@) + @$(call clean, $(OPENVPN_DIR)/config.cache) + cd $(OPENVPN_DIR) && \ + $(OPENVPN_PATH) $(OPENVPN_ENV) \ + ./configure $(OPENVPN_AUTOCONF) $(OPENVPN_LZO) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/openvpn.compile: + @$(call targetinfo) + cd $(OPENVPN_DIR) && $(OPENVPN_PATH) $(MAKE) $(PARALLELMFLAGS) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/openvpn.install: + @$(call targetinfo) + @$(call install, OPENVPN) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/openvpn.targetinstall: + @$(call targetinfo) + + @$(call install_init, openvpn) + @$(call install_fixup, openvpn,PACKAGE,openvpn) + @$(call install_fixup, openvpn,PRIORITY,optional) + @$(call install_fixup, openvpn,VERSION,$(OPENVPN_VERSION)) + @$(call install_fixup, openvpn,SECTION,base) + @$(call install_fixup, openvpn,AUTHOR,"Carsten Schlote <[email protected]>") + @$(call install_fixup, openvpn,DEPENDS,) + @$(call install_fixup, openvpn,DESCRIPTION,missing) + + @$(call install_copy, openvpn, 0, 0, 0755, $(OPENVPN_DIR)/openvpn, /usr/sbin/openvpn) + + @$(call install_copy, openvpn, 0, 0, 0755, /etc/openvpn) + + @$(call install_finish, openvpn) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +openvpn_clean: + rm -rf $(STATEDIR)/openvpn.* + rm -rf $(PKGDIR)/openvpn_* + rm -rf $(OPENVPN_DIR) + +# vim: syntax=make + -- 1.6.5.6.gb3118 -- ptxdist mailing list [email protected]
