rvi-sota-client_git: add RVI SOTA client
[AGL/meta-agl.git] / meta-agl / recipes-sota / rvi-sota-client / rvi-sota-client_git.bb
1 DESCRIPTION = "SOTA Reference Implementation project - Client"
2 HOMEPAGE = "https://github.com/advancedtelematic/rvi_sota_client"
3 LICENSE = "MPL-2.0"
4
5 inherit cargo systemd
6
7 SRC_URI = "git://github.com/advancedtelematic/rvi_sota_client.git;protocol=https \
8            file://rvi-sota-client.service \
9           "
10 SRCREV="825be11b03f89c52e5441b3d26e1cbf63fd313dd"
11 LIC_FILES_CHKSUM="file://LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea"
12
13 S = "${WORKDIR}/git"
14
15 BBCLASSEXTEND = "native"
16
17 DEPENDS += "dbus"
18 RDEPENDS_${PN} += "dbus-lib libcrypto libssl bash"
19
20 SYSTEMD_SERVICE_${PN} = "rvi-sota-client.service"
21
22 do_install_append() {
23  install -m 0755 -p -D ${S}/client.toml ${D}/var/sota/client.toml
24  install -m 0755 -p -D ${S}/docker/run.sh ${D}${bindir}/run.sh
25  if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
26   install -p -D ${WORKDIR}/rvi-sota-client.service ${D}${systemd_unitdir}/system/rvi-sota-client.service
27  fi
28 }
29
30 ## dbus-rs
31 SRC_URI += "\
32         git://github.com/diwic/dbus-rs.git;protocol=https;name=dbus-rs;destsuffix=dbus-rs \
33         file://dbus-rs/0001-Cast-correctly-c_char-raw-pointers-for-ARM.patch;patchdir=../dbus-rs \
34 "
35
36 # 0.1.2
37 SRCREV_dbus-rs = "c2c4c98adcf9949992ac5b0050bf17afe10868c9"
38
39 SRCREV_FORMAT .= "_dbus-rs"
40 EXTRA_OECARGO_PATHS += "${WORKDIR}/dbus-rs"