1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 11:23:57 +02:00

strongswan: correctly install plugin include configs

Signed-off-by: Steven Barth <steven@midlink.org>
This commit is contained in:
Steven Barth 2014-12-04 11:37:16 +01:00 committed by Jo-Philipp Wich
parent 29f23f24d5
commit 00c2f3d436

View File

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