strongswan: add missing config files for plugins
authorFelix Fietkau <nbd@openwrt.org>
Thu, 17 Apr 2014 17:19:38 +0000 (17:19 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 17 Apr 2014 17:19:38 +0000 (17:19 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40524

net/strongswan/Makefile

index a0a8a6c5a93d3743f06a901eaa9fed2eeb4ad233..a85a01b62b798df79d088d91cde257c8db678473 100644 (file)
@@ -316,13 +316,22 @@ 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/ \
+       )
        $(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