[packages] openvpn: stop instances even if they are disabled (#9404)
[openwrt/svn-archive/archive.git] / net / openvpn / Makefile
index 51ada70f93456ae012113b8d0344add5e4c6e490..4cf8d0eb3d0790342dd2797f78ce320e2a1b52ce 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2009 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openvpn
-PKG_VERSION:=2.1.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.1.4
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
-PKG_MD5SUM:=b273ed2b5ec8616fb9834cde8634bce7
+PKG_SOURCE_URL:=http://swupdate.openvpn.net/community/releases @SF/openvpn
+PKG_MD5SUM:=96a11868082685802489254f03ff3bde
 
 PKG_INSTALL:=1
 
@@ -22,12 +22,19 @@ include $(INCLUDE_DIR)/package.mk
 define Package/openvpn
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+kmod-tun +libopenssl +liblzo
+  DEPENDS:=+kmod-tun +libopenssl +PACKAGE_openvpn_complzo:liblzo
   TITLE:=Open source VPN solution using SSL
   URL:=http://openvpn.net
   SUBMENU:=VPN
 endef
 
+define Package/openvpn/config
+config PACKAGE_openvpn_complzo
+       bool "Enable --comp-lzo compression option"
+       depends on PACKAGE_openvpn
+       default y
+endef
+
 define Package/openvpn/conffiles
 /etc/config/openvpn
 endef
@@ -49,20 +56,21 @@ define Package/openvpn-easy-rsa/conffiles
 endef
 
 CONFIGURE_ARGS+= \
+       --with-ifconfig-path=/sbin/ifconfig \
+       --with-iproute-path=/usr/sbin/ip \
+       --with-route-path=/sbin/route \
        --disable-pthread \
        --disable-debug \
        --disable-plugins \
        --enable-management \
        --disable-socks \
-       --enable-password-save
-
-define Build/Configure
-       $(call Build/Configure/Default, \
-               $(CONFIGURE_ARGS) \
-               ,\
-               ac_cv_func_epoll_create=no \
-       )
-endef
+       --enable-password-save \
+       --enable-small
+
+ifndef CONFIG_PACKAGE_openvpn_complzo
+CONFIGURE_ARGS += \
+       --disable-lzo
+endif
 
 define Package/openvpn/install
        $(INSTALL_DIR) $(1)/usr/sbin
@@ -72,6 +80,8 @@ define Package/openvpn/install
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
        $(INSTALL_DIR) $(1)/etc/openvpn
+       $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
+       $(INSTALL_DATA) files/openvpn.upgrade $(1)/lib/upgrade/keep.d/openvpn
 endef
 
 define Package/openvpn-easy-rsa/install