[OpenWrt-Devel] [PATCH 2/4] Build OpenSSL for the host
Cristian Morales Vega
cristian at samknows.com
Wed Sep 24 10:15:52 EDT 2014
It gives us the tools to work with certificates.
Signed-off-by: Cristian Morales Vega <cristian at samknows.com>
---
package/libs/openssl/Makefile | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 4b386ab..df962fc 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -26,6 +26,7 @@ PKG_BUILD_DEPENDS:=ocf-crypto-headers
PKG_CONFIG_DEPENDS:=CONFIG_OPENSSL_ENGINE_CRYPTO CONFIG_OPENSSL_ENGINE_DIGEST \
CONFIG_OPENSSL_WITH_EC CONFIG_OPENSSL_WITH_EC2M
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/openssl/Default
@@ -138,6 +139,17 @@ define Build/Configure
depend
endef
+define Host/Configure
+ (cd $(HOST_BUILD_DIR); \
+ RELEASE=""; \
+ ./config \
+ --prefix=/usr \
+ --openssldir=/etc/ssl \
+ $(OPENSSL_NO_CIPHERS) \
+ $(OPENSSL_OPTIONS) \
+ )
+endef
+
TARGET_CFLAGS += $(FPIC)
define Build/Compile
@@ -181,6 +193,12 @@ define Build/InstallDev
[ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc || true
endef
+define Host/Install
+ $(_SINGLE)$(MAKE) -C $(HOST_BUILD_DIR) INSTALL_PREFIX=$(STAGING_DIR_HOST) install
+ $(CP) $(HOST_BUILD_DIR)/tools/c_rehash $(STAGING_DIR_HOST)/bin/
+ chmod +x $(STAGING_DIR_HOST)/bin/c_rehash
+endef
+
define Package/libopenssl/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcrypto.so.* $(1)/usr/lib/
@@ -197,5 +215,6 @@ define Package/openssl-util/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openssl $(1)/usr/bin/
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,libopenssl))
$(eval $(call BuildPackage,openssl-util))
--
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list