swupdate.inc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. SUMMARY="Image updater for Yocto projects"
  2. DESCRIPTION = "Application for automatic software update from USB Pen"
  3. SECTION="swupdate"
  4. DEPENDS = "mtd-utils libconfig libarchive openssl lua curl json-c u-boot-fw-utils gnutls"
  5. LICENSE = "GPLv2+"
  6. LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
  7. inherit cml1 update-rc.d
  8. SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=git \
  9. file://defconfig \
  10. file://swupdate \
  11. "
  12. PACKAGES =+ "${PN}-www"
  13. FILES_${PN}-www = "/www/*"
  14. FILES_${PN}-dev = "${includedir}"
  15. FILES_${PN}-staticdev = "${libdir}"
  16. FILES_${PN} = "${bindir}/* /etc/init.d"
  17. CONFFILES_${PN} += "${sysconfdir}/init.d/recovery"
  18. S = "${WORKDIR}/git/"
  19. EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
  20. do_configure () {
  21. cp ${WORKDIR}/defconfig ${S}/.config
  22. cml1_do_configure
  23. }
  24. do_install () {
  25. install -d ${D}${bindir}/
  26. install -m 0755 swupdate ${D}${bindir}/
  27. install -m 0755 -d ${D}/www
  28. install -m 0755 ${S}www/* ${D}/www
  29. install -d ${D}${libdir}/
  30. install -d ${D}${includedir}/
  31. install -m 0644 ${S}include/network_ipc.h ${D}${includedir}
  32. install -m 0755 ${S}ipc/lib.a ${D}${libdir}/libswupdate.a
  33. }
  34. do_compile() {
  35. unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
  36. oe_runmake swupdate_unstripped
  37. cp swupdate_unstripped swupdate
  38. }
  39. do_install_append() {
  40. install -d ${D}${sysconfdir}/init.d
  41. install -m 755 ${WORKDIR}/swupdate ${D}${sysconfdir}/init.d
  42. }
  43. INITSCRIPT_NAME = "swupdate"
  44. INITSCRIPT_PARAMS = "defaults 70"