--- /dev/null
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
+# #
+# This program 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. #
+# #
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include $(PKGROOT)/Include
+
+PKG_NAME = openvpn
+PKG_VER = 2.1_rc20
+PKG_REL = 0
+
+PKG_MAINTAINER =
+PKG_GROUP = Networking/VPN
+PKG_URL = http://openvpn.net/
+PKG_LICENSE = GPLv2
+PKG_SUMMARY = A full-featured SSL VPN solution.
+
+PKG_DEPS += iproute2 lzo openssl pam
+
+define PKG_DESCRIPTION
+ OpenVPN is a robust and highly flexible tunneling application that uses all \
+ of the encryption, authentication, and certification features of the \
+ OpenSSL library to securely tunnel IP networks over a single UDP or TCP \
+ port. It can use the Marcus Franz Xaver Johannes Oberhumer's LZO library \
+ for compression.
+endef
+
+PKG_TARBALL = $(THISAPP).tar.gz
+
+PLUGINS = auth-pam down-root
+
+define STAGE_BUILD
+ cd $(DIR_APP) && \
+ ./configure \
+ --prefix=/usr \
+ --enable-pthread \
+ --enable-password-save \
+ --enable-iproute2
+
+ cd $(DIR_APP) && make $(PARALLELISMFLAGS)
+ cd $(DIR_APP) && for plugin in $(PLUGINS); do \
+ make -C plugin/$$plugin; \
+ done
+endef
+
+define STAGE_INSTALL_CMDS
+ mkdir -pv $(BUILDROOT)/usr/lib/$(PKG_NAME)/plugin/lib
+ cd $(DIR_APP) && for plugin in $(PLUGINS); do \
+ install -m 0755 plugin/$$plugin/openvpn-$$plugin.so \
+ $(BUILDROOT)/usr/lib/$(PKG_NAME)/plugin/lib/openvpn-$$plugin.so; \
+ done
+ -mkdir -pv $(BUILDROOT)/var/run/$(PKG_NAME)
+endef