diff options
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr_git.bb')
| -rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 162065e..48ed652 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
| @@ -11,41 +11,69 @@ DEPENDS_append_class-native = "glib-2.0-native " | |||
| 11 | 11 | ||
| 12 | RDEPENDS_${PN}_class-target = "lshw " | 12 | RDEPENDS_${PN}_class-target = "lshw " |
| 13 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' engine-pkcs11', '', d)} " | 13 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' engine-pkcs11', '', d)} " |
| 14 | RDEPENDS_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " | ||
| 14 | 15 | ||
| 15 | PV = "1.0+git${SRCPV}" | 16 | PV = "1.0+git${SRCPV}" |
| 16 | PR = "7" | 17 | PR = "7" |
| 17 | 18 | ||
| 18 | SRC_URI = " \ | 19 | SRC_URI = " \ |
| 19 | git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ | 20 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ |
| 21 | file://aktualizr.service \ | ||
| 22 | file://aktualizr-serialcan.service \ | ||
| 20 | " | 23 | " |
| 21 | SRCREV = "f043191ae622a96cf2f4d48f9073d5cfa9f16e3f" | 24 | SRCREV = "e53f2a5747bba3e4f40609aa27f3d89e80c2d784" |
| 22 | BRANCH ?= "master" | 25 | BRANCH ?= "master" |
| 23 | 26 | ||
| 24 | S = "${WORKDIR}/git" | 27 | S = "${WORKDIR}/git" |
| 25 | 28 | ||
| 26 | inherit cmake | 29 | inherit cmake |
| 27 | 30 | ||
| 31 | inherit systemd | ||
| 32 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" | ||
| 33 | |||
| 28 | BBCLASSEXTEND =+ "native" | 34 | BBCLASSEXTEND =+ "native" |
| 29 | 35 | ||
| 30 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} " | 36 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} " |
| 31 | EXTRA_OECMAKE_append_class-target = "-DBUILD_OSTREE=ON ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} " | 37 | EXTRA_OECMAKE_append_class-target = " -DBUILD_OSTREE=ON -DBUILD_ISOTP=ON ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} " |
| 32 | EXTRA_OECMAKE_append_class-native = "-DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF " | 38 | EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF " |
| 33 | 39 | ||
| 34 | do_install_append () { | 40 | do_install_append () { |
| 35 | rm -f ${D}${bindir}/aktualizr_cert_provider | 41 | rm -f ${D}${bindir}/aktualizr_cert_provider |
| 36 | } | 42 | } |
| 37 | do_install_append_class-target () { | 43 | do_install_append_class-target () { |
| 38 | rm -f ${D}${bindir}/aktualizr_implicit_writer | 44 | rm -f ${D}${bindir}/aktualizr_implicit_writer |
| 45 | ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-example', '', 'rm -f ${D}${bindir}/example-interface', d)} | ||
| 46 | ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-isotp-example', '', 'rm -f ${D}${bindir}/isotp-test-interface', d)} | ||
| 47 | |||
| 48 | install -d ${D}${systemd_unitdir}/system | ||
| 49 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} | ||
| 50 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service | ||
| 39 | } | 51 | } |
| 40 | do_install_append_class-native () { | 52 | do_install_append_class-native () { |
| 41 | rm -f ${D}${bindir}/aktualizr | 53 | rm -f ${D}${bindir}/aktualizr |
| 54 | rm -f ${D}${bindir}/aktualizr-info | ||
| 55 | rm -f ${D}${bindir}/example-interface | ||
| 56 | install -d ${D}${libdir}/sota | ||
| 57 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml | ||
| 58 | install -m 0644 ${S}/config/sota_hsm_test.toml ${D}/${libdir}/sota/sota_hsm_test.toml | ||
| 59 | install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml | ||
| 60 | |||
| 61 | install -m 0755 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/bin/* ${D}${bindir} | ||
| 62 | install -m 0644 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/lib/* ${D}${libdir} | ||
| 42 | } | 63 | } |
| 43 | 64 | ||
| 44 | FILES_${PN}_class-target = " \ | 65 | FILES_${PN}_class-target = " \ |
| 45 | ${bindir}/aktualizr \ | 66 | ${bindir}/aktualizr \ |
| 67 | ${bindir}/aktualizr-info \ | ||
| 68 | ${systemd_unitdir}/system/aktualizr.service \ | ||
| 46 | " | 69 | " |
| 70 | FILES_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-example', ' ${bindir}/example-interface', '', d)} " | ||
| 71 | FILES_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-isotp-example', ' ${bindir}/isotp-test-interface', '', d)} " | ||
| 47 | FILES_${PN}_class-native = " \ | 72 | FILES_${PN}_class-native = " \ |
| 48 | ${bindir}/aktualizr_implicit_writer \ | 73 | ${bindir}/aktualizr_implicit_writer \ |
| 49 | ${bindir}/garage-deploy \ | 74 | ${bindir}/garage-deploy \ |
| 50 | ${bindir}/garage-push \ | 75 | ${bindir}/garage-push \ |
| 76 | ${libdir}/sota/* \ | ||
| 51 | " | 77 | " |
| 78 | |||
| 79 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
