#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-# $Id: $
include $(TOPDIR)/rules.mk
PKG_NAME:=openvpn
-PKG_VERSION:=2.0.9
+PKG_VERSION:=2.1_rc19
PKG_RELEASE:=1
-PKG_MD5SUM:=60745008b90b7dbe25fe8337c550fec6
-PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
+PKG_MD5SUM:=ba2ee667a8b7606b125b7d32f47ca578
include $(INCLUDE_DIR)/package.mk
-PKG_CONFIGURE_OPTIONS := --enable-shared \
- --disable-static \
- --disable-pthread \
- --disable-debug \
- --disable-plugins \
- --enable-management \
- --disable-socks \
- --enable-password-save \
-
define Package/openvpn
SECTION:=net
CATEGORY:=Network
DEPENDS:=+kmod-tun +libopenssl +liblzo
TITLE:=Open source VPN solution using SSL
- DESCRIPTION:=\
- Open source VPN solution using SSL
URL:=http://openvpn.net
- MENU:=1
+ SUBMENU:=VPN
+endef
+
+define Package/openvpn/conffiles
+/etc/config/openvpn
+endef
+
+define Package/openvpn/description
+ Open source VPN solution using SSL
endef
define Package/openvpn-easy-rsa
$(call Package/openvpn)
DEPENDS:=openvpn +openssl-util
TITLE:=Simple shell scripts to manage a Certificate Authority
- MENU:=0
+endef
+
+define Package/openvpn-easy-rsa/conffiles
+/etc/easy-rsa/keys/serial
+/etc/easy-rsa/keys/index.txt
+/etc/easy-rsa/vars
endef
define Build/Configure
-$(call Build/Configure/Default,$(PKG_CONFIGURE_OPTIONS))
+ $(call Build/Configure/Default, \
+ --disable-pthread \
+ --disable-debug \
+ --disable-plugins \
+ --enable-management \
+ --disable-socks \
+ --enable-password-save \
+ ,\
+ ac_cv_func_epoll_create=no \
+ )
endef
-define Build/Compile
-$(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" \
- install)
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
endef
-define Package/openvpn/install
- install -d -m0755 $(1)/usr/sbin
- $(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
+define Package/openvpn/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/etc/openvpn
endef
-define Package/openvpn-easy-rsa/install
- install -d -m0755 $(1)/usr/sbin $(1)/etc/easy-rsa
- $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req} $(1)/usr/sbin
- install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(1)/etc/easy-rsa/openssl.cnf
- install -m 0644 $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars
+define Package/openvpn-easy-rsa/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/easy-rsa
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl.cnf $(1)/etc/easy-rsa/openssl.cnf
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/vars $(1)/etc/easy-rsa/vars
+ $(INSTALL_DIR) $(1)/etc/easy-rsa/keys
+ $(INSTALL_DATA) files/easy-rsa.index $(1)/etc/easy-rsa/keys/index.txt
+ $(INSTALL_DATA) files/easy-rsa.serial $(1)/etc/easy-rsa/keys/serial
endef
$(eval $(call BuildPackage,openvpn))