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 <javier.viguera@digi.com>
This commit is contained in:
parent
e6f072384d
commit
84f63905ac
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -45,5 +45,7 @@ do_install() {
|
|||
oe_runmake DESTDIR=${D} install
|
||||
}
|
||||
|
||||
RRECOMMENDS_${PN} += "awsiotsdk-c-cert"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue