swupdategui-rs_git.bb 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. SUMMARY = "Recovery GUI application (Rust)"
  2. DESCRIPTION = "GUI for the recovery system, written in Rust. It works with LVGL \
  3. and the framebuffer and talks to SWUpdate via libswupdate. It is a drop-in \
  4. replacement for swupdate-gui."
  5. HOMEPAGE = "https://github.com/sbabic/SWUpdateGUI"
  6. LICENSE = "GPL-2.0-or-later"
  7. LIC_FILES_CHKSUM = "file://LICENSE;md5=de4b1111cc7f3c8bc81546de6f9b24e4"
  8. SRC_URI = "git://github.com/sbabic/SWUpdateGUI.git;protocol=https;branch=rust-port \
  9. file://0001-lv-build-with-LVGL-9.2.patch \
  10. file://swupdate-gui \
  11. file://swupdate-gui.service \
  12. file://90-recovery-gui.rules \
  13. "
  14. SRCREV = "de64c91ea54671f25c47029cfcd36fc8a7a05a41"
  15. S = "${WORKDIR}/git"
  16. PV = "1.0.0+git"
  17. include swupdategui-rs-crates.inc
  18. inherit cargo cargo-update-recipe-crates pkgconfig update-rc.d systemd
  19. # Requirements in scarthgap:
  20. # - Rust >= 1.77 (scarthgap ships 1.75), for example from meta-lts-mixins,
  21. # branch scarthgap/rust
  22. # - LVGL >= 9.2 (provided by this layer)
  23. # - clang-native from meta-clang
  24. #
  25. # Bindings for LVGL and libswupdate are generated by bindgen, which needs libclang.
  26. # LVGL is found with pkg-config, libswupdate in the target sysroot.
  27. DEPENDS += "clang-native lvgl swupdate"
  28. export BINDGEN_EXTRA_CLANG_ARGS = "--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}"
  29. export SWUPDATE_INCLUDE_DIR = "${STAGING_INCDIR}"
  30. export SWUPDATE_LIB_DIR = "${STAGING_LIBDIR}"
  31. INITSCRIPT_NAME = "swupdate-gui"
  32. INITSCRIPT_PARAMS = "defaults 90"
  33. SYSTEMD_SERVICE:${PN} = "swupdate-gui.service"
  34. do_install:append() {
  35. install -d ${D}${systemd_system_unitdir}
  36. install -m 0644 ${WORKDIR}/swupdate-gui.service ${D}${systemd_system_unitdir}
  37. # Same init script as the C implementation
  38. if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
  39. install -d ${D}${sysconfdir}/init.d
  40. install -m 0755 ${WORKDIR}/swupdate-gui ${D}${sysconfdir}/init.d/
  41. fi
  42. install -d ${D}${sysconfdir}/recovery_gui
  43. install -m 0644 ${S}/config/config.txt ${D}${sysconfdir}/recovery_gui/
  44. install -d ${D}${bindir}
  45. for script in ${S}/scripts/recovery-*.sh; do
  46. install -m 0755 ${script} ${D}${bindir}
  47. done
  48. # The GUI opens /dev/fb and /dev/input/{keyboard0,touchscreen0}
  49. install -d ${D}${sysconfdir}/udev/rules.d
  50. install -m 0644 ${WORKDIR}/90-recovery-gui.rules ${D}${sysconfdir}/udev/rules.d/
  51. }
  52. FILES:${PN} += "${sysconfdir}/udev/rules.d/90-recovery-gui.rules"
  53. # Same files as the C implementation
  54. RPROVIDES:${PN} = "swupdate-gui"
  55. RREPLACES:${PN} = "swupdate-gui"
  56. RCONFLICTS:${PN} = "swupdate-gui"
  57. RDEPENDS:${PN} = "swupdate"