summaryrefslogtreecommitdiffstats
path: root/recipes-sota/rvi-sota-client/sota-installer_git.bb
blob: 09f6e5dc11802cc6524a04b56e8d8025b7f778ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require rvi-sota-client.inc


SYSTEMD_SERVICE_${PN} = "sota-installer.service"

DEPENDS += " rvi-sota-client "

FILES_${PN} = " \
${bindir}/sota-installer \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-installer.service', '', d)} \
"

do_compile_prepend() {
  cd sota-installer
}

do_install() {
  install -d ${D}${bindir}
  install -m 0755 target/${TARGET_SYS}/release/sota-installer ${D}${bindir}

  if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
    install -d ${D}/${systemd_unitdir}/system
    install -m 0644 ${WORKDIR}/sota-installer.service ${D}/${systemd_unitdir}/system/sota-installer.service
  fi
}