From f5723cdb9b3d899278a56368c9bec89a2e51d800 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 23 Jun 2005 04:48:02 +0000 Subject: [PATCH] Add support for acpid --- package/Config.in | 1 + package/acpid/Config.in | 8 +++++++ package/acpid/acpid.mk | 47 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 package/acpid/Config.in create mode 100644 package/acpid/acpid.mk diff --git a/package/Config.in b/package/Config.in index 0a4c21aa5b..0686345c72 100644 --- a/package/Config.in +++ b/package/Config.in @@ -24,6 +24,7 @@ source "package/tar/Config.in" comment "Other stuff" +source "package/acpid/Config.in" source "package/autoconf/Config.in" source "package/automake/Config.in" source "package/berkeleydb/Config.in" diff --git a/package/acpid/Config.in b/package/acpid/Config.in new file mode 100644 index 0000000000..a2641838fa --- /dev/null +++ b/package/acpid/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ACPID + bool "acpid" + default n + help + Advanced Configuration and Power Interface event daemon. + + Acpid is designed to notify user-space programs of ACPI events, + and allows you to configure specific actions for specific events. diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk new file mode 100644 index 0000000000..66caa553d3 --- /dev/null +++ b/package/acpid/acpid.mk @@ -0,0 +1,47 @@ +############################################################# +# +# acpid +# +############################################################# +ACPID_DIR=$(BUILD_DIR)/acpid-1.0.4 +ACPID_SOURCE=acpid_1.0.4-1.tar.gz +ACPID_SITE=http://ftp.debian.org/debian/pool/main/a/acpid + +$(DL_DIR)/$(ACPID_SOURCE): + $(WGET) -P $(DL_DIR) $(ACPID_SITE)/$(ACPID_SOURCE) + +$(ACPID_DIR)/Makefile: $(DL_DIR)/$(ACPID_SOURCE) + zcat $(DL_DIR)/$(ACPID_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(SED) "s:ACPI_SOCKETFILE.*:ACPI_SOCKETFILE \"/tmp/acpid.socket\":" $(ACPID_DIR)/acpid.h + touch -c $(ACPID_DIR)/Makefile + +$(ACPID_DIR)/acpid: $(ACPID_DIR)/Makefile + $(MAKE) CC=$(TARGET_CC) -C $(ACPID_DIR) + $(STRIP) -s $(ACPID_DIR)/acpid + $(STRIP) -s $(ACPID_DIR)/acpi_listen + touch -c $(ACPID_DIR)/acpid $(ACPID_DIR)/acpi_listen + +$(TARGET_DIR)/usr/sbin/acpid: $(ACPID_DIR)/acpid + cp -a $(ACPID_DIR)/acpid $(TARGET_DIR)/usr/sbin/acpid + mkdir -p $(TARGET_DIR)/etc/acpi/events + echo -e "event=button[ /]power\naction=/sbin/poweroff" > $(TARGET_DIR)/etc/acpi/events/powerbtn + touch -c $(TARGET_DIR)/usr/sbin/acpid + +acpid: $(TARGET_DIR)/usr/sbin/acpid + +acpid-source: $(DL_DIR)/$(ACPID_SOURCE) + +acpid-clean: + -make -C $(ACPID_DIR) clean + +acpid-dirclean: + rm -rf $(ACPID_DIR) + +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(strip $(BR2_PACKAGE_ACPID)),y) +TARGETS+=acpid +endif -- 2.30.2