aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/acpid/acpid.inc
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-09-03 15:09:08 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-03 11:09:05 +0100
commitf9c6b40fb116c12701c12bb28b4b2b909578c823 (patch)
tree12088587bf27984ff5f9fdecb769d7ebddee7926 /meta/recipes-bsp/acpid/acpid.inc
parent9b5bc946e52c76b0f15c3576d9c6168a3bfcb767 (diff)
downloadopenembedded-core-contrib-f9c6b40fb116c12701c12bb28b4b2b909578c823.tar.gz
openembedded-core-contrib-f9c6b40fb116c12701c12bb28b4b2b909578c823.tar.bz2
openembedded-core-contrib-f9c6b40fb116c12701c12bb28b4b2b909578c823.zip
acpid: upgrade to 2.0.22 and add systemd support
For acpid needs to upgrade to work correctly with the new kernel. The new version now uses autotools. Also add systemd unit file. (From OE-Core rev: 93805abedb5563a91886f330153b179033a29d11) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/acpid/acpid.inc')
-rw-r--r--meta/recipes-bsp/acpid/acpid.inc24
1 files changed, 11 insertions, 13 deletions
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc
index fad7afdf26..9b4c3a5a5d 100644
--- a/meta/recipes-bsp/acpid/acpid.inc
+++ b/meta/recipes-bsp/acpid/acpid.inc
@@ -4,30 +4,28 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=33140&atid=407341"
SECTION = "base"
LICENSE = "GPLv2+"
-SRC_URI = "${SOURCEFORGE_MIRROR}/acpid/acpid-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/acpid2/acpid-${PV}.tar.xz \
file://init \
- file://set_socket_noblock.patch "
+ file://acpid.service \
+ "
-inherit update-rc.d
+inherit autotools update-rc.d systemd
INITSCRIPT_NAME = "acpid"
INITSCRIPT_PARAMS = "defaults"
-# Makefile ignores our CFLAGS, so override it.
-#
-EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'"
+SYSTEMD_PACKAGES = "acpid"
+SYSTEMD_SERVICE_acpid = "acpid.service"
-do_compile () {
- oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}'
-}
-
-do_install () {
- install -d ${D}${bindir}
- oe_runmake 'INSTPREFIX=${D}' install
+do_install_append () {
install -d ${D}${sysconfdir}/init.d
sed -e 's,/usr/sbin,${sbindir},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/acpid
chmod 755 ${D}${sysconfdir}/init.d/acpid
install -d ${D}${sysconfdir}/acpi
install -d ${D}${sysconfdir}/acpi/events
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/acpid.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/acpid.service
}