Update demo KUKSA.val configuration
[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 = "EPL-2.0"
6 LIC_FILES_CHKSUM = "file://LICENSE;md5=d9fc0efef5228704e7f5b37f27192723"
7
8 DEPENDS = "python3-setuptools-git-versioning-native"
9
10 require kuksa-val.inc
11
12 SRC_URI += "file://0001-dbc2val-add-installation-mechanism.patch \
13             file://0002-dbc2val-usability-improvements.patch \
14             file://0003-dbc2val-add-duplicate-filtering-option.patch \
15             file://config.ini \
16             file://dbc_feeder.json.token \
17             file://mapping.yml \
18             file://agl-vcar.dbc \
19             file://kuksa-dbc-feeder.service \
20 "
21
22 inherit setuptools3 systemd
23
24 SETUPTOOLS_SETUP_PATH = "${S}/kuksa_feeders"
25
26 # This is a bit of a workaround as the sed in distutils.bbclass
27 # will remove the -S already present in the script otherwise,
28 # breaking it.
29 PEP517_INSTALL_PYTHON = "-S python3 -u"
30
31 SYSTEMD_SERVICE:${PN} = "${BPN}.service"
32
33 do_install:append() {
34     install -d ${D}${sysconfdir}/kuksa-dbc-feeder
35     install -m 0644 ${WORKDIR}/config.ini ${D}${sysconfdir}/kuksa-dbc-feeder/
36     # Token should ideally not be readable by other users.
37     # The potential for running the feeder as non-root will take some
38     # investigation.
39     install -m 0600 ${WORKDIR}/dbc_feeder.json.token ${D}${sysconfdir}/kuksa-dbc-feeder/
40     install -m 0644 ${WORKDIR}/mapping.yml ${D}${sysconfdir}/kuksa-dbc-feeder/
41     install -m 0644 ${WORKDIR}/agl-vcar.dbc ${D}${sysconfdir}/kuksa-dbc-feeder/
42     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
43         install -d ${D}${systemd_system_unitdir}
44         install -m 0644 ${WORKDIR}/kuksa-dbc-feeder.service ${D}${systemd_system_unitdir}
45     fi
46 }
47
48 FILES:${PN} += "${systemd_system_unitdir}"
49
50 RDEPENDS:${PN} += " \
51     bash \
52     python3-pyserial \
53     python3-cantools \
54     python3-can \
55     python3-can-j1939 \
56     python3-pyyaml \
57     python3-py-expression-eval \
58     kuksa-viss-client \
59     can-dev-helper \
60 "