Jelajahi Sumber

swupdate_git.bb: Move lines from .bb file to .inc file.

When we create bb files for releases, all we need to do is update the
SRC_REV in the .bb file. All knowledge about building swupdate is in
the .inc file.

Signed-off-by: Philip Balister <philip@balister.org>
Philip Balister 9 tahun lalu
induk
melakukan
5e4c03d937

+ 10 - 1
recipes-support/swupdate/swupdate.inc

@@ -5,10 +5,11 @@ DEPENDS = "mtd-utils libconfig libarchive openssl lua curl json-c u-boot-fw-util
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
 
-inherit cml1
+inherit cml1 update-rc.d
 
 SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=git \
      file://defconfig \
+     file://swupdate \
      "
 
 PACKAGES =+ "${PN}-www"
@@ -46,3 +47,11 @@ do_compile() {
   oe_runmake swupdate_unstripped
   cp swupdate_unstripped swupdate
 }
+
+do_install_append() {
+  install -d ${D}${sysconfdir}/init.d
+  install -m 755 ${WORKDIR}/swupdate ${D}${sysconfdir}/init.d
+}
+
+INITSCRIPT_NAME = "swupdate"
+INITSCRIPT_PARAMS = "defaults 70"

+ 0 - 12
recipes-support/swupdate/swupdate_git.bb

@@ -1,16 +1,4 @@
 require swupdate.inc
 
-inherit update-rc.d
-
 # this is 2016.10-rc1
 SRCREV = "8abacd3613410002c0cd05a12e82d695d3e4bf6f"
-
-SRC_URI += "file://swupdate"
-
-do_install_append() {
-  install -d ${D}${sysconfdir}/init.d
-  install -m 755 ${WORKDIR}/swupdate ${D}${sysconfdir}/init.d
-}
-
-INITSCRIPT_NAME = "swupdate"
-INITSCRIPT_PARAMS = "defaults 70"