LIBCURL_INSTALL_STAGING = YES
LIBCURL_LIBTOOL_PATCH = NO
LIBCURL_DEPENDENCIES = openssl
+LIBCURL_CA_BUNDLE_DEST := /etc/ssl/certs/ca-certificates.crt
LIBCURL_CONF_OPT = --disable-verbose --disable-manual --enable-hidden-symbols \
--with-random=/dev/urandom --with-ssl \
$(DISABLE_NLS) $(DISABLE_LARGEFILE) $(DISABLE_IPV6)
+ --with-ca-bundle=$(LIBCURL_CA_BUNDLE_DEST)
$(eval $(call AUTOTARGETS,package,libcurl))
-$(LIBCURL_HOOK_POST_INSTALL):
+$(LIBCURL_DIR)/lib/ca-bundle.crt:
+ $(call MESSAGE,"Generating Root CA certificate bundle")
+ $(LIBCURL_MAKE_ENV) $(MAKE) $(LIBCURL_MAKE_OPT) -C $(LIBCURL_DIR) ca-bundle
+
+$(LIBCURL_HOOK_POST_INSTALL): $(LIBCURL_DIR)/lib/ca-bundle.crt
rm -rf $(TARGET_DIR)/usr/bin/curl-config \
$(if $(BR2_PACKAGE_CURL),,$(TARGET_DIR)/usr/bin/curl)
+ install -m 755 -d $(TARGET_DIR)/$(shell dirname $(LIBCURL_CA_BUNDLE_DEST))
+ install -m 644 $(LIBCURL_DIR)/lib/ca-bundle.crt $(TARGET_DIR)/$(LIBCURL_CA_BUNDLE_DEST)
\ No newline at end of file