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" |
| 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ |
| 4 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
| 5 | |
| 6 | SRC_URI = "file://shutdown.desktop" |
| 7 | |
| 8 | PR = "r1" |
| 9 | |
| 10 | S = "${WORKDIR}" |
| 11 | |
| 12 | do_install() { |
| 13 | install -d ${D}${datadir}/applications |
| 14 | install -m 0644 shutdown.desktop ${D}${datadir}/applications/ |
| 15 | |
| 16 | sed -i ${D}${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)#Exec=${base_sbindir}/\1#' |
| 17 | } |
| 18 | |
| 19 | pkg_postinst_${PN} () { |
| 20 | grep -q qemuarm $D${sysconfdir}/hostname && \ |
| 21 | sed -i $D${datadir}/applications/shutdown.desktop -e 's#^Exec=\(.*\)/halt#Exec=\1/reboot#' \ |
| 22 | || true |
| 23 | } |
| 24 | |
| 25 | inherit allarch |