From 84f63905ac9481faf8fc8793a8d8342fa164c923 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 15 Jun 2017 12:51:38 +0200 Subject: [PATCH] aws-iot-sdk: minor fixes * Create the certificates directory before copying files into it. * Give the downloaded tarball a meaningful name (otherwise tarballs downloaded from GitHub don't have a proper name (only the version) and may collide with other packages with the same version. * Allow to create certs package if certs are available at build time. Signed-off-by: Javier Viguera --- meta-digi-dey/recipes-aws/awsiotsdk-c/awsiotsdk-c_2.1.1.bb | 7 ++++++- .../recipes-digi/dey-examples/awsiotsdk-demo_git.bb | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-aws/awsiotsdk-c/awsiotsdk-c_2.1.1.bb b/meta-digi-dey/recipes-aws/awsiotsdk-c/awsiotsdk-c_2.1.1.bb index ed73c4ac6..b651683e3 100644 --- a/meta-digi-dey/recipes-aws/awsiotsdk-c/awsiotsdk-c_2.1.1.bb +++ b/meta-digi-dey/recipes-aws/awsiotsdk-c/awsiotsdk-c_2.1.1.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=acc7a1bf87c055789657b148939e4b40" DEPENDS = "mbedtls" SRC_URI = " \ - https://github.com/aws/aws-iot-device-sdk-embedded-C/archive/v${PV}.tar.gz \ + https://github.com/aws/aws-iot-device-sdk-embedded-C/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ file://aws_iot_config.h.template \ file://awsiotsdk.pc \ file://Makefile \ @@ -58,11 +58,16 @@ do_install() { if [ -f "${AWS_IOT_CERTS_DIR}/${AWS_IOT_ROOT_CA_FILENAME}" ] && \ [ -f "${AWS_IOT_CERTS_DIR}/${AWS_IOT_CERTIFICATE_FILENAME}" ] && \ [ -f "${AWS_IOT_CERTS_DIR}/${AWS_IOT_PRIVATE_KEY_FILENAME}" ]; then + install -d ${D}${sysconfdir}/ssl/certs install -m 0644 "${AWS_IOT_CERTS_DIR}/${AWS_IOT_ROOT_CA_FILENAME}" ${D}${sysconfdir}/ssl/certs/ install -m 0644 "${AWS_IOT_CERTS_DIR}/${AWS_IOT_CERTIFICATE_FILENAME}" ${D}${sysconfdir}/ssl/certs/ install -m 0644 "${AWS_IOT_CERTS_DIR}/${AWS_IOT_PRIVATE_KEY_FILENAME}" ${D}${sysconfdir}/ssl/certs/ fi } +PACKAGES =+ "${PN}-cert" + +FILES_${PN}-cert = "${sysconfdir}/ssl/certs/" + ALLOW_EMPTY_${PN} = "1" diff --git a/meta-digi-dey/recipes-digi/dey-examples/awsiotsdk-demo_git.bb b/meta-digi-dey/recipes-digi/dey-examples/awsiotsdk-demo_git.bb index e1707a96d..5d339e33e 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/awsiotsdk-demo_git.bb +++ b/meta-digi-dey/recipes-digi/dey-examples/awsiotsdk-demo_git.bb @@ -45,5 +45,7 @@ do_install() { oe_runmake DESTDIR=${D} install } +RRECOMMENDS_${PN} += "awsiotsdk-c-cert" + PACKAGE_ARCH = "${MACHINE_ARCH}"