summaryrefslogtreecommitdiffstats
path: root/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
diff options
context:
space:
mode:
authorRobert Danitz <robert@advancedtelematic.com>2017-07-31 15:45:10 +0200
committerRobert Danitz <robert@advancedtelematic.com>2017-07-31 15:45:10 +0200
commit25fa85e0535a4c0ea5d5dea6a7109842da8e1550 (patch)
tree543ce74b2881ac40f58b6852ee8191b6be27a1d9 /recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
parentff5efc4b3d11b6fabca831695337ceef50cc9255 (diff)
downloadmeta-updater-25fa85e0535a4c0ea5d5dea6a7109842da8e1550.tar.gz
rename back sota-client to rvi-sota-client
Diffstat (limited to 'recipes-sota/rvi-sota-client/rvi-sota-client_git.bb')
-rw-r--r--recipes-sota/rvi-sota-client/rvi-sota-client_git.bb58
1 files changed, 58 insertions, 0 deletions
diff --git a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
new file mode 100644
index 0000000..21378ce
--- /dev/null
+++ b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
@@ -0,0 +1,58 @@
1require rvi-sota-client.inc
2
3
4SYSTEMD_SERVICE_${PN} = "sota-client.service sota-client-autoprovision.service"
5
6FILES_${PN} = " \
7/lib64 \
8${bindir}/sota_client \
9${bindir}/sota_sysinfo.sh \
10${bindir}/sota_provision.sh \
11${sysconfdir}/sota_client.version \
12${sysconfdir}/sota_certificates \
13${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-client.service', '', d)} \
14${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-client-autoprovision.service', '', d)} \
15"
16
17DEPENDS += " openssl openssl-native dbus "
18RDEPENDS_${PN} = " \
19bash \
20curl \
21libcrypto \
22libssl \
23lshw \
24jq \
25"
26
27export SOTA_PACKED_CREDENTIALS
28export SOTA_AUTOPROVISION_CREDENTIALS
29export SOTA_AUTOPROVISION_URL
30
31do_compile_prepend() {
32 export SOTA_VERSION=$(make sota-version)
33 cd sota-client
34}
35
36do_install() {
37 ln -fs /lib ${D}/lib64
38
39 install -d ${D}${bindir}
40 install -d ${D}${sysconfdir}
41
42 echo `git log -1 --pretty=format:%H` > ${D}${sysconfdir}/sota_client.version
43 install -c ${S}/sota-client/docker/sota_certificates ${D}${sysconfdir}
44
45 install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir}
46 install -m 0755 ${S}/sota-client/docker/sota_provision.sh ${D}${bindir}
47 install -m 0755 ${S}/sota-client/docker/sota_sysinfo.sh ${D}${bindir}
48
49 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
50 install -d ${D}/${systemd_unitdir}/system
51 if [ -n "$SOTA_AUTOPROVISION_CREDENTIALS" -o -n "$SOTA_PACKED_CREDENTIALS" ]; then
52 install -m 0644 ${WORKDIR}/sota-client-uptane.service ${D}/${systemd_unitdir}/system/sota-client.service
53 else
54 install -m 0644 ${WORKDIR}/sota-client-ostree.service ${D}/${systemd_unitdir}/system/sota-client.service
55 fi
56 install -m 0644 ${WORKDIR}/sota-client-autoprovision.service ${D}/${systemd_unitdir}/system/sota-client-autoprovision.service
57 fi
58}