blob: 766f574b259faeea8b017927794920d86a3b22bd [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Provides an icon to shut down the system cleanly"
2LICENSE = "MIT"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05003LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004
5SRC_URI = "file://shutdown.desktop"
6
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007
8S = "${WORKDIR}"
9
10do_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 Williams213cb262021-08-07 19:21:33 -050017pkg_postinst:${PN} () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018 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
23inherit allarch