kuksa-databroker: update for building with Rust 1.70
[AGL/meta-agl-demo.git] / recipes-connectivity / kuksa-val / kuksa-databroker_git.bb
1 SUMMARY = "KUKSA.val databroker, the KUKSA Vehicle Abstraction Layer"
2 #DESCRIPTION = "KUKSA.val provides a COVESA VSS data model describing data in a vehicle."
3 HOMEPAGE = "https://github.com/eclipse/kuksa.val"
4 BUGTRACKER = "https://github.com/eclipse/kuksa.val/issues"
5
6 LICENSE = "Apache-2.0"
7 LIC_FILES_CHKSUM = "file://LICENSE;md5=2b42edef8fa55315f34f2370b4715ca9 \
8 "
9  
10 DEPENDS = "protobuf-native grpc-native"
11
12 require kuksa-val.inc
13
14 require ${BPN}-crates.inc
15
16 SRC_URI += "file://0001-Remove-protobuf-src-usage.patch \
17             file://kuksa-databroker.service \
18 "
19
20 S = "${WORKDIR}/git"
21
22 inherit cargo cargo-update-recipe-crates systemd useradd
23
24 # Enable optional VISS support for potential use by e.g. the web apps
25 CARGO_BUILD_FLAGS += "--features viss"
26
27 SYSTEMD_SERVICE:${PN} = "${BPN}.service"
28
29 USERADD_PACKAGES = "${PN}"
30 USERADDEXTENSION = "useradd-staticids"
31 GROUPADD_PARAM:${PN} = "-g 900 kuksa ;"
32 USERADD_PARAM:${PN} = "--system -g 900 -u 900 -o -d / --shell /bin/nologin kuksa ;"
33
34 do_install:append() {
35     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
36         install -d ${D}${systemd_system_unitdir}
37         install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}
38     fi
39
40     # Install gRPC API protobuf files
41     install -d ${D}${includedir}
42     cp -dr ${S}/proto/kuksa ${D}${includedir}
43     cp -dr ${S}/kuksa_databroker/proto/sdv ${D}${includedir}
44 }
45
46 PACKAGE_BEFORE_PN += "${PN}-cli"
47
48 FILES:${PN} += "${systemd_system_unitdir} ${datadir}"
49
50 FILES:${PN}-cli = "${bindir}/databroker-cli"
51
52 # The upstream Cargo.toml builds optimized and stripped binaries, for
53 # now disable the QA check as opposed to tweaking the configuration.
54 INSANE_SKIP:${PN} = "already-stripped"
55 INSANE_SKIP:${PN}-cli = "already-stripped"