2006-10-07 15:56:04 +00:00
|
|
|
#
|
2012-02-25 14:32:21 +00:00
|
|
|
# Copyright (C) 2006-2012 OpenWrt.org
|
2006-10-07 15:56:04 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=openvpn
|
2012-04-16 23:26:18 +00:00
|
|
|
PKG_VERSION:=2.2.2
|
|
|
|
PKG_RELEASE:=1
|
2006-10-07 15:56:04 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2011-03-30 16:11:21 +00:00
|
|
|
PKG_SOURCE_URL:=http://swupdate.openvpn.net/community/releases @SF/openvpn
|
2012-04-16 23:26:18 +00:00
|
|
|
PKG_MD5SUM:=c5181e27b7945fa6276d21873329c5c7
|
2006-10-07 15:56:04 +00:00
|
|
|
|
2010-02-18 13:10:21 +00:00
|
|
|
PKG_INSTALL:=1
|
2011-08-28 12:08:25 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2010-02-18 13:10:21 +00:00
|
|
|
|
2006-10-07 15:56:04 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/openvpn
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2011-08-28 12:08:25 +00:00
|
|
|
SUBMENU:=VPN
|
2011-08-29 15:31:32 +00:00
|
|
|
DEPENDS:=+kmod-tun +libopenssl +!OPENVPN_DISABLE_LZO:liblzo
|
2006-10-07 15:56:04 +00:00
|
|
|
TITLE:=Open source VPN solution using SSL
|
|
|
|
URL:=http://openvpn.net
|
2011-08-28 12:08:25 +00:00
|
|
|
MENU:=1
|
2006-10-07 15:56:04 +00:00
|
|
|
endef
|
|
|
|
|
2011-08-28 12:08:25 +00:00
|
|
|
define Package/openvpn/description
|
|
|
|
Open source VPN solution using SSL
|
2010-09-11 18:38:49 +00:00
|
|
|
endef
|
|
|
|
|
2011-08-28 12:08:25 +00:00
|
|
|
define Package/openvpn/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
2008-09-28 23:15:56 +00:00
|
|
|
endef
|
|
|
|
|
2007-10-14 04:32:56 +00:00
|
|
|
|
2006-10-07 15:56:04 +00:00
|
|
|
define Package/openvpn-easy-rsa
|
|
|
|
$(call Package/openvpn)
|
2011-07-07 04:20:03 +00:00
|
|
|
DEPENDS:=+openssl-util
|
2006-10-07 15:56:04 +00:00
|
|
|
TITLE:=Simple shell scripts to manage a Certificate Authority
|
|
|
|
endef
|
|
|
|
|
2008-09-28 23:15:56 +00:00
|
|
|
define Package/openvpn-easy-rsa/conffiles
|
|
|
|
/etc/easy-rsa/keys/serial
|
|
|
|
/etc/easy-rsa/keys/index.txt
|
|
|
|
/etc/easy-rsa/vars
|
|
|
|
endef
|
|
|
|
|
2010-09-11 18:38:45 +00:00
|
|
|
CONFIGURE_ARGS+= \
|
2011-04-05 13:07:42 +00:00
|
|
|
--with-ifconfig-path=/sbin/ifconfig \
|
|
|
|
--with-iproute-path=/usr/sbin/ip \
|
|
|
|
--with-route-path=/sbin/route \
|
2010-09-11 18:38:45 +00:00
|
|
|
--disable-debug \
|
|
|
|
--disable-plugins \
|
2011-08-28 12:08:25 +00:00
|
|
|
--disable-pthread \
|
|
|
|
--disable-selinux \
|
2010-09-11 18:38:45 +00:00
|
|
|
--disable-socks \
|
2010-09-11 18:38:47 +00:00
|
|
|
--enable-small
|
2010-09-11 18:38:45 +00:00
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_LZO),y)
|
2010-09-11 18:38:49 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-lzo
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_CRYPTO),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-crypto
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_SSL),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-ssl
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_OPENVPN_X509_ALT_USERNAME),y)
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-x509-alt-username
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_MULTI),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-multi
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_SERVER),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-server
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_EUREPHIA),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-eurephia
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_MANAGEMENT),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-management
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_PKCS11),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-pkcs11
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_HTTP),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-http
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_FRAGMENT),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-fragment
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_MULTIHOME),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-multihome
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_PORT_SHARE),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-port-share
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_OPENVPN_ENABLE_PASSWORD_SAVE),y)
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-password-save
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_DEF_AUTH),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-def-auth
|
|
|
|
endif
|
|
|
|
|
2011-08-29 15:31:32 +00:00
|
|
|
ifeq ($(CONFIG_OPENVPN_DISABLE_PF),y)
|
2011-08-28 12:08:25 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-pf
|
|
|
|
endif
|
|
|
|
|
|
|
|
define Package/openvpn/conffiles
|
|
|
|
/etc/config/openvpn
|
|
|
|
endef
|
|
|
|
|
2009-09-26 09:18:06 +00:00
|
|
|
define Package/openvpn/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-12-09 18:59:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(1)/usr/sbin/
|
2007-06-20 12:23:02 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d/
|
|
|
|
$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
2008-09-28 23:15:56 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
|
2009-07-15 09:26:52 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/openvpn
|
2011-03-20 01:29:40 +00:00
|
|
|
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
|
|
|
$(INSTALL_DATA) files/openvpn.upgrade $(1)/lib/upgrade/keep.d/openvpn
|
2006-10-07 15:56:04 +00:00
|
|
|
endef
|
|
|
|
|
2009-09-26 09:18:06 +00:00
|
|
|
define Package/openvpn-easy-rsa/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-06-17 23:25:05 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} $(1)/usr/sbin/
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/easy-rsa
|
2011-08-28 12:08:25 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/easy-rsa/2.0/openssl-1.0.0.cnf $(1)/etc/easy-rsa/openssl-1.0.0.cnf
|
2008-09-28 23:15:56 +00:00
|
|
|
$(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
|
2006-10-07 15:56:04 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,openvpn))
|
|
|
|
$(eval $(call BuildPackage,openvpn-easy-rsa))
|