shutdown-desktop.bb 668 B

123456789101112131415161718192021222324
  1. SUMMARY = "Provides an icon to shut down the system cleanly"
  2. LICENSE = "MIT"
  3. LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
  4. SRC_URI = "file://shutdown.desktop"
  5. PR = "r1"
  6. S = "${WORKDIR}"
  7. do_install() {
  8. install -d ${D}${datadir}/applications
  9. install -m 0644 shutdown.desktop ${D}${datadir}/applications/
  10. sed -i ${D}${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)#Exec=${base_sbindir}/\1#'
  11. }
  12. pkg_postinst_${PN} () {
  13. grep -q qemuarm $D${sysconfdir}/hostname && \
  14. sed -i $D${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)/halt#Exec=\1/reboot#' \
  15. || true
  16. }
  17. inherit allarch