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 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | |
| 8 | S = "${WORKDIR}" |
| 9 | |
| 10 | do_install() { |
| 11 | install -d ${D}${datadir}/applications |
| 12 | install -m 0644 shutdown.desktop ${D}${datadir}/applications/ |
| 13 | |
| 14 | sed -i ${D}${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)#Exec=${base_sbindir}/\1#' |
| 15 | } |
| 16 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | pkg_postinst:${PN} () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | grep -q qemuarm $D${sysconfdir}/hostname && \ |
| 19 | sed -i $D${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)/halt#Exec=\1/reboot#' \ |
| 20 | || true |
| 21 | } |
| 22 | |
| 23 | inherit allarch |