blob: 12ec19bbb0768f67ce104f85ee4beab76640736f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "A daemon for delivering ACPI events"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002HOMEPAGE = "http://sourceforge.net/projects/acpid2"
3BUGTRACKER = "http://sourceforge.net/p/acpid2/tickets/?source=navbar"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004SECTION = "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}