2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2005-06-23 06:48:02 +02:00
|
|
|
#
|
|
|
|
# acpid
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
2019-09-18 19:18:18 +02:00
|
|
|
ACPID_VERSION = 2.0.32
|
2014-04-22 23:25:33 +02:00
|
|
|
ACPID_SOURCE = acpid-$(ACPID_VERSION).tar.xz
|
|
|
|
ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
|
2017-03-30 15:43:32 +02:00
|
|
|
ACPID_LICENSE = GPL-2.0+
|
2012-11-30 01:14:36 +01:00
|
|
|
ACPID_LICENSE_FILES = COPYING
|
2010-09-26 09:13:52 +02:00
|
|
|
|
2018-11-13 21:17:28 +01:00
|
|
|
define ACPID_INSTALL_INIT_SYSTEMD
|
2018-12-12 03:20:04 +01:00
|
|
|
$(INSTALL) -D -m 0644 package/acpid/acpid.service \
|
2018-11-13 21:17:28 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/acpid.service
|
|
|
|
endef
|
|
|
|
|
2014-04-22 23:25:33 +02:00
|
|
|
define ACPID_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 0755 package/acpid/S02acpid \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S02acpid
|
2010-09-26 09:13:52 +02:00
|
|
|
endef
|
|
|
|
|
2018-08-30 15:21:20 +02:00
|
|
|
ifeq ($(BR2_INIT_SYSV)$(BR2_INIT_SYSTEMD),y)
|
|
|
|
ACPID_POWEROFF_CMD = /sbin/shutdown -hP now
|
|
|
|
else
|
|
|
|
ACPID_POWEROFF_CMD = /sbin/poweroff
|
|
|
|
endif
|
|
|
|
|
2014-04-22 23:25:33 +02:00
|
|
|
define ACPID_SET_EVENTS
|
2005-06-23 06:48:02 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/acpi/events
|
2018-08-30 15:21:20 +02:00
|
|
|
printf 'event=button[ /]power\naction=%s\n' '$(ACPID_POWEROFF_CMD)' \
|
2014-04-22 23:25:33 +02:00
|
|
|
>$(TARGET_DIR)/etc/acpi/events/powerbtn
|
2010-09-26 09:13:52 +02:00
|
|
|
endef
|
2005-06-23 06:48:02 +02:00
|
|
|
|
2014-04-22 23:25:33 +02:00
|
|
|
ACPID_POST_INSTALL_TARGET_HOOKS += ACPID_SET_EVENTS
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|