]> xenbits.xensource.com Git - xenclient/build.git/commitdiff
[package/libcurl] Installing Root CA certificate bundle on rootfs in /etc/ssl/
authorJean-Sebastien Legare <jean-sebastien.legare@citrix.com>
Mon, 26 Oct 2009 17:54:14 +0000 (10:54 -0700)
committerJean-Sebastien Legare <jean-sebastien.legare@citrix.com>
Tue, 27 Oct 2009 16:17:32 +0000 (09:17 -0700)
package/libcurl/curl.mk

index 4e92eca982a9f3a9dd1a7901b5a2de29bbc6a978..7827512975ac4e60a5f5660da20fee33241dc8e3 100644 (file)
@@ -9,12 +9,20 @@ LIBCURL_SITE = http://curl.haxx.se/download/
 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