strongswan: correctly install plugin include configs
authorSteven Barth <steven@midlink.org>
Thu, 4 Dec 2014 10:37:16 +0000 (11:37 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 13 Feb 2015 11:16:51 +0000 (12:16 +0100)
Signed-off-by: Steven Barth <steven@midlink.org>
net/strongswan/Makefile

index 58bc004ebede62a44940aba2892b8023e8df210f..d0e67e458418dbf101afc0e3da28e98ddb24d985 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=strongswan
 PKG_VERSION:=5.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.strongswan.org/ http://download2.strongswan.org/
@@ -298,22 +298,16 @@ define BuildPlugin
     DEPENDS:= +strongswan $(3)
   endef
 
-  strongswan_mod_conf=$(wildcard $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf)
   define Package/strongswan-mod-$(1)/install
        $(INSTALL_DIR) $$(1)/etc/strongswan.d/charon
-       $(if $(call strongswan_mod_conf,$(1)), \
-               $(INSTALL_DATA) \
-                       $(call strongswan_mod_conf,$(1)) \
-                       $$(1)/etc/strongswan.d/charon/ \
-       )
+       if [ -f $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf ]; then \
+               $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf $$(1)/etc/strongswan.d/charon/; fi
        $(INSTALL_DIR) $$(1)/usr/lib/ipsec/plugins
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-$(1).so \
                $$(1)/usr/lib/ipsec/plugins/
        $(call Plugin/$(1)/install,$$(1))
   endef
 
-  Package/strongswan-mod-$(1)/conffiles=$(patsubst $(PKG_INSTALL_DIR)%,%,$(call strongswan_mod_conf,$(1)))
-
   $$(eval $$(call BuildPackage,strongswan-mod-$(1)))
 endef