Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Provides an icon to shut down the system cleanly" |
| 2 | LICENSE = "MIT" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | |
| 5 | SRC_URI = "file://shutdown.desktop" |
| 6 | |
| 7 | PR = "r1" |
| 8 | |
| 9 | S = "${WORKDIR}" |
| 10 | |
| 11 | do_install() { |
| 12 | install -d ${D}${datadir}/applications |
| 13 | install -m 0644 shutdown.desktop ${D}${datadir}/applications/ |
| 14 | |
| 15 | sed -i ${D}${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)#Exec=${base_sbindir}/\1#' |
| 16 | } |
| 17 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 18 | pkg_postinst:${PN} () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | grep -q qemuarm $D${sysconfdir}/hostname && \ |
| 20 | sed -i $D${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)/halt#Exec=\1/reboot#' \ |
| 21 | || true |
| 22 | } |
| 23 | |
| 24 | inherit allarch |