summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2017-10-25 17:28:39 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2017-10-27 15:11:51 +0200
commit6e12274ad0008e13ca43e022409860aa89e061d1 (patch)
tree68817e23d862aa3c7fd275fe227261173b32df3c
parent86032c413ec220a77a66402aeffd627e8f68243f (diff)
downloadmeta-updater-6e12274ad0008e13ca43e022409860aa89e061d1.tar.gz
Remerge aktualizr recipes.
I found the trick to allow specifiying target vs native variables and tasks. It's a bit wordy but better than having three separate files for the aktualizr recipe. Oddly and annoyingly, while only "aktualizr" must be specified in sota_bleeding.inc, both "BRANCH_pn-aktualizr" and "BRANCH_pn-aktualizr-native" must be specified in local.conf to correctly use a given branch.
-rw-r--r--classes/sota_bleeding.inc1
-rw-r--r--recipes-sota/aktualizr/aktualizr-native_git.bb18
-rw-r--r--recipes-sota/aktualizr/aktualizr_common.inc19
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb50
4 files changed, 40 insertions, 48 deletions
diff --git a/classes/sota_bleeding.inc b/classes/sota_bleeding.inc
index 77d004b..fc5947d 100644
--- a/classes/sota_bleeding.inc
+++ b/classes/sota_bleeding.inc
@@ -1,2 +1 @@
1SRCREV_pn-aktualizr ?= "${AUTOREV}" SRCREV_pn-aktualizr ?= "${AUTOREV}"
2SRCREV_pn-aktualizr-native ?= "${AUTOREV}"
diff --git a/recipes-sota/aktualizr/aktualizr-native_git.bb b/recipes-sota/aktualizr/aktualizr-native_git.bb
deleted file mode 100644
index 70ebdf0..0000000
--- a/recipes-sota/aktualizr/aktualizr-native_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1require aktualizr_common.inc
2
3DEPENDS = "boost-native glib-2.0-native curl-native openssl-native libarchive-native libsodium-native"
4
5inherit native
6
7EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF -DAKTUALIZR_VERSION=${PV}"
8
9do_install_append () {
10 rm -f ${D}${bindir}/aktualizr
11 rm -f ${D}${bindir}/aktualizr_cert_provider
12 rm -f ${D}${bindir}/garage-deploy
13}
14
15FILES_${PN} = " \
16 ${bindir}/aktualizr_implicit_writer \
17 ${bindir}/garage-push \
18 "
diff --git a/recipes-sota/aktualizr/aktualizr_common.inc b/recipes-sota/aktualizr/aktualizr_common.inc
deleted file mode 100644
index 79c5e37..0000000
--- a/recipes-sota/aktualizr/aktualizr_common.inc
+++ /dev/null
@@ -1,19 +0,0 @@
1SUMMARY = "Aktualizr SOTA Client"
2DESCRIPTION = "SOTA Client application written in C++"
3HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base"
5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3"
7
8PV = "1.0+git${SRCPV}"
9PR = "7"
10
11SRC_URI = " \
12 git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \
13 "
14SRCREV = "67c4f44c4136d16871726449502e3926098e8524"
15BRANCH ?= "master"
16
17S = "${WORKDIR}/git"
18
19inherit cmake
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 7c65eb7..470c9bf 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -1,22 +1,52 @@
1require aktualizr_common.inc 1SUMMARY = "Aktualizr SOTA Client"
2DESCRIPTION = "SOTA Client application written in C++"
3HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base"
5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3"
2 7
3DEPENDS = "boost curl jansson openssl libarchive libsodium ostree" 8DEPENDS = "boost curl openssl libarchive libsodium "
4RDEPENDS_${PN} = "lshw" 9DEPENDS_append_class-target = "jansson ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} "
10DEPENDS_append_class-native = "glib-2.0-native "
5 11
6DEPENDS_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)}" 12RDEPENDS_${PN}_class-target = "lshw "
7RDEPENDS_${PN}_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' engine-pkcs11', '', d)}" 13RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' engine-pkcs11', '', d)} "
8RDEPENDS_${PN}_append = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm-test', ' softhsm softhsm-testtoken', '', d)}" 14RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm-test', ' softhsm softhsm-testtoken', '', d)} "
9 15
10inherit systemd 16PV = "1.0+git${SRCPV}"
17PR = "7"
11 18
12EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_OSTREE=ON ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} -DAKTUALIZR_VERSION=${PV}" 19SRC_URI = " \
20 git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \
21 "
22SRCREV = "67c4f44c4136d16871726449502e3926098e8524"
23BRANCH ?= "master"
24
25S = "${WORKDIR}/git"
26
27inherit cmake
28
29BBCLASSEXTEND =+ "native"
30
31EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} "
32EXTRA_OECMAKE_append_class-target = "-DBUILD_OSTREE=ON ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} "
33EXTRA_OECMAKE_append_class-native = "-DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF "
13 34
14do_install_append () { 35do_install_append () {
15 rm -f ${D}${bindir}/aktualizr_cert_provider 36 rm -f ${D}${bindir}/aktualizr_cert_provider
16 rm -f ${D}${bindir}/aktualizr_implicit_writer
17 rm -f ${D}${bindir}/garage-deploy 37 rm -f ${D}${bindir}/garage-deploy
18} 38}
39do_install_append_class-target () {
40 rm -f ${D}${bindir}/aktualizr_implicit_writer
41}
42do_install_append_class-native () {
43 rm -f ${D}${bindir}/aktualizr
44}
19 45
20FILES_${PN} = " \ 46FILES_${PN}_class-target = " \
21 ${bindir}/aktualizr \ 47 ${bindir}/aktualizr \
22 " 48 "
49FILES_${PN}_class-native = " \
50 ${bindir}/aktualizr_implicit_writer \
51 ${bindir}/garage-push \
52 "