flutter-cluster-dashboard: fix KVM demo configurations
[AGL/meta-agl-demo.git] / recipes-connectivity / kuksa-val / kuksa-dbc-feeder_git.bb
1 SUMMARY = "DBC feeder 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 = "Apache-2.0"
6 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=175792518e4ac015ab6696d16c4f607e"
7
8 DEPENDS = "python3-setuptools-git-versioning-native"
9
10 PV = "0.4.0+git${SRCPV}"
11
12 SRC_URI = "git://github.com/eclipse/kuksa.val.feeders.git;protocol=https;branch=main \
13            file://0001-dbc2val-add-installation-mechanism.patch \
14            file://0002-dbc2val-usability-improvements.patch \
15            file://0003-dbc2val-fix-token-file-configuration-option.patch \
16            file://0004-Enable-val2dbc-for-sensor-values.patch \
17            file://config.ini \
18            file://dbc_feeder.token \
19            file://agl-vcar.dbc \
20            file://dbc_default_values.json \
21            file://kuksa-dbc-feeder.service \
22            file://kuksa-dbc-feeder.default \
23            "
24 SRCREV = "5bb52eca8d79f7c05a024f69b1faab81dabacdcd"
25
26 S = "${WORKDIR}/git"
27
28 inherit setuptools3 systemd update-alternatives
29
30 SETUPTOOLS_SETUP_PATH = "${S}/dbc2val"
31
32 SYSTEMD_SERVICE:${PN} = "${BPN}.service"
33
34 do_install:append() {
35     install -d ${D}${sysconfdir}/kuksa-dbc-feeder
36     install -m 0644 ${WORKDIR}/config.ini ${D}${sysconfdir}/kuksa-dbc-feeder/
37     # Token should ideally not be readable by other users.
38     # The potential for running the feeder as non-root will take some
39     # investigation.
40     install -m 0600 ${WORKDIR}/dbc_feeder.token ${D}${sysconfdir}/kuksa-dbc-feeder/
41     install -m 0644 ${WORKDIR}/agl-vcar.dbc ${D}${sysconfdir}/kuksa-dbc-feeder/
42     install -m 0644 ${WORKDIR}/dbc_default_values.json ${D}${sysconfdir}/kuksa-dbc-feeder/
43     install -d ${D}${sysconfdir}/default
44     install -m 0644 ${WORKDIR}/kuksa-dbc-feeder.default ${D}${sysconfdir}/default/
45     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
46         install -d ${D}${systemd_system_unitdir}
47         install -m 0644 ${WORKDIR}/kuksa-dbc-feeder.service ${D}${systemd_system_unitdir}
48     fi
49 }
50
51 ALTERNATIVE_LINK_NAME[kuksa-dbc-feeder.env] = "${sysconfdir}/default/kuksa-dbc-feeder"
52
53 ALTERNATIVE_TARGET_${PN} = "${sysconfdir}/default/kuksa-dbc-feeder.default"
54 FILES:${PN} += "${systemd_system_unitdir}"
55
56 RDEPENDS:${PN} += " \
57     bash \
58     python3-pyserial \
59     python3-cantools \
60     python3-can \
61     python3-can-j1939 \
62     python3-pyyaml \
63     python3-py-expression-eval \
64     kuksa-client \
65     can-dev-helper \
66 "