blob: e0156192a034130cda6bec1db5a7c60638482077 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "A daemon for delivering ACPI events"
2HOMEPAGE = "http://sourceforge.net/projects/acpid/"
3BUGTRACKER = "http://sourceforge.net/tracker/?group_id=33140&atid=407341"
4SECTION = "base"
5LICENSE = "GPLv2+"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
8 file://init \
9 file://acpid.service \
10 "
11
12inherit autotools update-rc.d systemd
13
14INITSCRIPT_NAME = "acpid"
15INITSCRIPT_PARAMS = "defaults"
16
17SYSTEMD_SERVICE_${PN} = "acpid.service"
18
19do_install_append () {
20 install -d ${D}${sysconfdir}/init.d
21 sed -e 's,/usr/sbin,${sbindir},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/acpid
22 chmod 755 ${D}${sysconfdir}/init.d/acpid
23
24 install -d ${D}${sysconfdir}/acpi
25 install -d ${D}${sysconfdir}/acpi/events
26
27 install -d ${D}${systemd_unitdir}/system
28 install -m 0644 ${WORKDIR}/acpid.service ${D}${systemd_unitdir}/system
29 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/acpid.service
30}