1SUMMARY = "A daemon for delivering ACPI events"
2DESCRIPTION = "ACPID is a completely flexible, totally extensible daemon for \
3delivering ACPI events. It listens on netlink interface (or on the \
4deprecated file /proc/acpi/event), and when an event occurs, executes programs \
5to handle the event. The programs it executes are configured through a set of \
6configuration files, which can be dropped into place by packages or by the \
7admin."
8HOMEPAGE = "http://sourceforge.net/projects/acpid2"
9BUGTRACKER = "http://sourceforge.net/p/acpid2/tickets/?source=navbar"
10SECTION = "base"
11LICENSE = "GPLv2+"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
14           file://init \
15           file://acpid.service \
16          "
17
18CVE_PRODUCT = "acpid2"
19
20inherit autotools update-rc.d systemd
21
22INITSCRIPT_NAME = "acpid"
23INITSCRIPT_PARAMS = "defaults"
24
25SYSTEMD_SERVICE:${PN} = "acpid.service"
26
27do_install:append () {
28	install -d ${D}${sysconfdir}/init.d
29	sed -e 's,/usr/sbin,${sbindir},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/acpid
30	chmod 755 ${D}${sysconfdir}/init.d/acpid
31
32	install -d ${D}${sysconfdir}/acpi
33	install -d ${D}${sysconfdir}/acpi/events
34
35	install -d ${D}${systemd_system_unitdir}
36	install -m 0644 ${WORKDIR}/acpid.service ${D}${systemd_system_unitdir}
37	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/acpid.service
38}
39