Switch Qt demo to KUKSA.val databroker
[AGL/meta-agl-demo.git] / recipes-connectivity / kuksa-val / kuksa-certificates-agl.bb
1 SUMMARY = "AGL certificates for KUKSA.val, the KUKSA Vehicle Abstraction Layer"
2 HOMEPAGE = "https://github.com/eclipse/kuksa.val"
3 BUGTRACKER = "https://github.com/eclipse/kuksa.val/issues"
4
5 LICENSE = "MIT"
6 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
7
8 SRC_URI = "file://CA.pem \
9            file://Client.key \
10            file://Client.pem \
11            file://Server.key \
12            file://Server.pem \
13 "
14
15 inherit allarch useradd
16
17 USERADD_PACKAGES = "${PN}-server"
18 USERADDEXTENSION = "useradd-staticids"
19 GROUPADD_PARAM:${PN}-server = "-g 900 kuksa ;"
20
21 do_install() {
22     # Install replacement CA certificate, server key + certificate,
23     # and client key + certificate.
24     # These are AGL specific versions generated using a tweaked
25     # genCerts.sh script to have different expiry dates than the
26     # upstream defaults, and use AGL as the organization.
27     install -d ${D}${sysconfdir}/kuksa-val/
28     install -m 0644 ${WORKDIR}/CA.pem ${D}${sysconfdir}/kuksa-val/
29     install -m 0640 -g 900 ${WORKDIR}/Server.key ${D}${sysconfdir}/kuksa-val/
30     install -m 0640 -g 900 ${WORKDIR}/Server.pem ${D}${sysconfdir}/kuksa-val/
31     install -m 0644 ${WORKDIR}/Client.key ${D}${sysconfdir}/kuksa-val/
32     install -m 0644 ${WORKDIR}/Client.pem ${D}${sysconfdir}/kuksa-val/
33 }
34
35 PACKAGE_BEFORE_PN += "${PN}-ca ${PN}-server ${PN}-client"
36
37 FILES:${PN}-ca = " \
38     ${sysconfdir}/kuksa-val/CA.pem \
39 "
40 RPROVIDES:${PN}-ca += "kuksa-val-certificates-ca"
41
42 FILES:${PN}-server = " \
43     ${sysconfdir}/kuksa-val/Server.key \
44     ${sysconfdir}/kuksa-val/Server.pem \
45 "
46 RPROVIDES:${PN}-server += "kuksa-val-certificates-server"
47 RDEPENDS:${PN}-server += "${PN}-ca"
48
49 FILES:${PN}-client = " \
50     ${sysconfdir}/kuksa-val/Client.key \
51     ${sysconfdir}/kuksa-val/Client.pem \
52 "
53 RPROVIDES:${PN}-client += "kuksa-val-certificates-client"
54 RDEPENDS:${PN}-client += "${PN}-ca"
55
56 ALLOW_EMPTY:${PN} = "1"
57
58 RDEPENDS:${PN} += "${PN}-ca ${PN}-server ${PN}-client"