Jelajahi Sumber

swupdate: split tools building and packaging

Split tools building and packaging in a separate .inc file, so that all version
supporting them can just require the file.

Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Diego Rondini 8 tahun lalu
induk
melakukan
9053b615c5

+ 1 - 24
recipes-support/swupdate/swupdate_git.bb

@@ -1,27 +1,4 @@
 require swupdate.inc
+require swupdate_tools.inc
 
 DEFAULT_PREFERENCE = "-1"
-
-PACKAGES =+ "${PN}-tools"
-
-INSANE_SKIP_${PN}-tools = "ldflags"
-
-FILES_${PN}-tools = "${bindir}/swupdate-*"
-
-do_compile() {
-  unset LDFLAGS
-
-  oe_runmake
-  cp swupdate_unstripped swupdate
-  cp tools/progress_unstripped progress
-
-}
-
-do_install_append () {
-
-  install -m 0755 tools/client_unstripped ${D}${bindir}/swupdate-client
-  install -m 0755 tools/progress_unstripped ${D}${bindir}/swupdate-progress
-  install -m 0755 tools/hawkbitcfg_unstripped ${D}${bindir}/swupdate-hawkbitcfg
-  install -m 0755 tools/sendtohawkbit_unstripped ${D}${bindir}/swupdate-sendtohawkbit
-
-}

+ 21 - 0
recipes-support/swupdate/swupdate_tools.inc

@@ -0,0 +1,21 @@
+PACKAGES =+ "${PN}-tools"
+
+INSANE_SKIP_${PN}-tools = "ldflags"
+
+FILES_${PN}-tools = "${bindir}/swupdate-*"
+
+do_compile() {
+  unset LDFLAGS
+
+  oe_runmake
+  cp swupdate_unstripped swupdate
+}
+
+do_install_append () {
+
+  install -m 0755 tools/client_unstripped ${D}${bindir}/swupdate-client
+  install -m 0755 tools/progress_unstripped ${D}${bindir}/swupdate-progress
+  install -m 0755 tools/hawkbitcfg_unstripped ${D}${bindir}/swupdate-hawkbitcfg
+  install -m 0755 tools/sendtohawkbit_unstripped ${D}${bindir}/swupdate-sendtohawkbit
+
+}