shutdown-desktop.bb 660 B

1234567891011121314151617181920212223
  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. S = "${UNPACKDIR}"
  6. do_install() {
  7. install -d ${D}${datadir}/applications
  8. install -m 0644 shutdown.desktop ${D}${datadir}/applications/
  9. sed -i ${D}${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)#Exec=${base_sbindir}/\1#'
  10. }
  11. pkg_postinst:${PN} () {
  12. grep -q qemuarm $D${sysconfdir}/hostname && \
  13. sed -i $D${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)/halt#Exec=\1/reboot#' \
  14. || true
  15. }
  16. inherit allarch