Rework nss-agl-driver-db to be a systemd unit at runtime
[AGL/meta-agl-demo.git] / recipes-core / nss / nss-agl-driver-db_git.bb
1 SUMMARY = "Custom nss db hosting the kuksa certificates"
2 DESCRIPTION = "Custom nss db hosting the kuksa certificates for chromium"
3 AUTHOR = "Jan-Simon Moeller <jsmoeller@linuxfoundation.org>"
4 HOMEPAGE = "https://git.automotivelinux.org"
5 LICENSE = "MIT"
6 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
7
8 PV = "0.1"
9
10 SRC_URI = "file://${BPN}.service \
11            file://${BPN}.sh \
12           "
13
14 inherit systemd
15
16 SYSTEMD_SERVICE:${PN} = "${BPN}.service"
17
18 do_configure[noexec] = "1"
19 do_compile[noexec] = "1"
20
21 do_install() {
22     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
23         install -d ${D}${systemd_system_unitdir}
24         install -d ${D}${sbindir}
25         install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}
26         install -m 0755 ${WORKDIR}/${BPN}.sh ${D}${sbindir}
27     fi
28 }
29
30 FILES:${PN} += "${systemd_system_unitdir} ${sbindir}"
31
32 RDEPENDS:${PN} += "nss agl-session kuksa-val-client-certificates bash"