Added support for : save-password( --enable-password-save), smaller executable (...
[openwrt.git] / package / openvpn / Makefile
index 037cb0d..5ae1a31 100644 (file)
@@ -18,7 +18,14 @@ include $(TOPDIR)/package/rules.mk
 
 $(eval $(call PKG_template,OPENVPN,openvpn,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 
-PKG_DEPEND:="libopenssl, kmod-tun"
+PKG_DEPEND:="kmod-tun"
+
+ifneq ($(BR2_COMPILE_OPENVPN_WITH_OPENSSL),y)
+DISABLE_OPENSSL:=--disable-ssl --disable-crypto
+else
+PKG_DEPEND+=", libopenssl"
+endif
+
 ifneq ($(BR2_COMPILE_OPENVPN_WITH_LZO),y)
 DISABLE_LZO:=--disable-lzo
 else
@@ -31,6 +38,12 @@ endif
 ifneq ($(BR2_COMPILE_OPENVPN_WITH_HTTP),y)
 DISABLE_HTTP:=--disable-http
 endif
+ifeq ($(BR2_COMPILE_OPENVPN_WITH_PASSWORD_SAVE),y)
+ENABLE_PASSWORD_SAVE:=--enable-password-save
+endif
+ifeq ($(BR2_COMPILE_OPENVPN_WITH_SMALL),y)
+ENABLE_SMALL:=--enable-small
+endif
 
 $(PKG_BUILD_DIR)/.configured:
        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
@@ -66,8 +79,11 @@ $(PKG_BUILD_DIR)/.configured:
                  --disable-management \
                  --disable-socks \
                  $(DISABLE_LZO) \
+                 $(DISABLE_OPENSSL) \
                  $(DISABLE_SERVER) \
                  $(DISABLE_HTTP) \
+                 $(ENABLE_PASSWORD_SAVE) \
+                 $(ENABLE_SMALL) \
        );
        touch $(PKG_BUILD_DIR)/.configured
 
@@ -81,7 +97,7 @@ $(PKG_BUILD_DIR)/.built:
 
 $(IPKG_OPENVPN):
        install -d -m0755 $(IDIR_OPENVPN)/usr/sbin
-       cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
        $(RSTRIP) $(IDIR_OPENVPN)
        echo "Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN)/CONTROL/control
        $(IPKG_BUILD) $(IDIR_OPENVPN) $(PACKAGE_DIR)
This page took 0.025552 seconds and 4 git commands to generate.