The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / acpid / acpid.mk
diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/acpid/acpid.mk b/cirros-testvm/src-cirros/buildroot-2015.05/package/acpid/acpid.mk
new file mode 100644 (file)
index 0000000..7a6a478
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+#
+# acpid
+#
+################################################################################
+
+ACPID_VERSION = 2.0.22
+ACPID_SOURCE = acpid-$(ACPID_VERSION).tar.xz
+ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
+ACPID_LICENSE = GPLv2+
+ACPID_LICENSE_FILES = COPYING
+
+define ACPID_INSTALL_INIT_SYSV
+       $(INSTALL) -D -m 0755 package/acpid/S02acpid \
+               $(TARGET_DIR)/etc/init.d/S02acpid
+endef
+
+define ACPID_SET_EVENTS
+       mkdir -p $(TARGET_DIR)/etc/acpi/events
+       printf "event=button[ /]power\naction=/sbin/poweroff\n" \
+               >$(TARGET_DIR)/etc/acpi/events/powerbtn
+endef
+
+ACPID_POST_INSTALL_TARGET_HOOKS += ACPID_SET_EVENTS
+
+$(eval $(autotools-package))