From fbf5c6c5b4145b67bbd6316518385f1df0e4976a Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Tue, 11 Aug 2015 13:26:03 +0800 Subject: [PATCH] strongswan: split out libtls.so as a separate package. When only strongswan-minimal is selected, libtls.so will not be built yet package strongswan will still try to copy the file causing build failure. Signed-off-by: Yousong Zhou --- net/strongswan/Makefile | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile index a1df8afb6..f0ea175b1 100644 --- a/net/strongswan/Makefile +++ b/net/strongswan/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=strongswan PKG_VERSION:=5.3.2 -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/ @@ -291,6 +291,18 @@ $(call Package/strongswan/description/Default) This package contains the pki & scepclient utilities. endef +define Package/strongswan-libtls +$(call Package/strongswan/Default) + TITLE+= libtls + DEPENDS:= +strongswan +endef + +define Package/strongswan-libtls/description +$(call Package/strongswan/description/Default) + This package contains libtls for strongSwan plugins eap-tls, eap-ttls, + eap-peap, tnc-tnccs +endef + define BuildPlugin define Package/strongswan-mod-$(1) $$(call Package/strongswan/Default) @@ -338,7 +350,7 @@ define Package/strongswan/install $(INSTALL_DIR) $(1)/etc $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.conf $(1)/etc/ $(INSTALL_DIR) $(1)/usr/lib/ipsec - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{libtls.so.*,libstrongswan.so.*,libhydra.so.*} $(1)/usr/lib/ipsec/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{libstrongswan.so.*,libhydra.so.*} $(1)/usr/lib/ipsec/ $(INSTALL_CONF) ./files/ipsec.secrets $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec @@ -371,6 +383,11 @@ define Package/strongswan-utils/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/scepclient $(1)/usr/lib/ipsec/ endef +define Package/strongswan-libtls/install + $(INSTALL_DIR) $(1)/usr/lib/ipsec + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libtls.so.* $(1)/usr/lib/ipsec/ +endef + define Plugin/duplicheck/install $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/duplicheck $(1)/usr/lib/ipsec/ @@ -430,6 +447,7 @@ $(eval $(call BuildPackage,strongswan-full)) $(eval $(call BuildPackage,strongswan-minimal)) $(eval $(call BuildPackage,strongswan-charon)) $(eval $(call BuildPackage,strongswan-utils)) +$(eval $(call BuildPackage,strongswan-libtls)) $(eval $(call BuildPlugin,addrblock,RFC 3779 address block constraint support,)) $(eval $(call BuildPlugin,aes,AES crypto,)) $(eval $(call BuildPlugin,af-alg,AF_ALG crypto interface to Linux Crypto API,+kmod-crypto-user)) @@ -451,7 +469,7 @@ $(eval $(call BuildPlugin,eap-identity,EAP identity helper,)) $(eval $(call BuildPlugin,eap-md5,EAP MD5 (CHAP) EAP auth,)) $(eval $(call BuildPlugin,eap-mschapv2,EAP MS-CHAPv2 EAP auth,+strongswan-mod-md4 +strongswan-mod-des)) $(eval $(call BuildPlugin,eap-radius,EAP RADIUS auth,)) -$(eval $(call BuildPlugin,eap-tls,EAP TLS auth,)) +$(eval $(call BuildPlugin,eap-tls,EAP TLS auth,+strongswan-libtls)) $(eval $(call BuildPlugin,farp,fake arp respsonses,)) $(eval $(call BuildPlugin,fips-prf,FIPS PRF crypto,+strongswan-mod-sha1)) $(eval $(call BuildPlugin,gcm,GCM AEAD wrapper crypto,))