blob: 4bb896fc7bb9a58654dfad108eea64caba37990e [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
7PR = "r1"
8
9S = "${WORKDIR}"
10
11do_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 Williams213cb262021-08-07 19:21:33 -050018pkg_postinst:${PN} () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019 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
24inherit allarch