source: packages/utils/acpid/Makefile @ 30991

Last change on this file since 30991 was 30991, checked in by jow, 4 years ago

new package acpid and related kernel modules

Hi,

Here is a new package called acpid and a related kernel module
kmod-button. Its main pupose is to listen for
acpi events and run a user defined script. For now only powerdown is
possible. I only tested this under the
X86 architecture.

Maybe somebody find that useful too.

regards.
thomas

File size: 1.6 KB
Line 
1#
2# Copyright (C) 2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=acpid
11PKG_VERSION:=2.0.10
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://tedfelix.com/linux/
16PKG_MD5SUM:=d5dd88bcfaa4a0bf51905e95115da6df
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/acpid
21  SECTION:=utils
22  CATEGORY:=Utilities
23  TITLE:=The ACPI Daemon (acpid) With Netlink Support
24  URL:=http://tedfelix.com/linux/acpid-netlink.html
25  DEPENDS:=+kmod-input-evdev +kmod-button
26endef
27
28define Package/acpid/description
29  The ACPI Daemon (acpid) With Netlink Support
30endef
31
32define Build/Compile
33        $(MAKE) -C $(PKG_BUILD_DIR) \
34                CC="$(TARGET_CC)" \
35                LD="$(TARGET_CC)" \
36                LDFLAGS="$(TARGET_LDFLAGS)" \
37                all
38endef
39
40define Package/acpid/install
41        $(INSTALL_DIR) $(1)/usr/sbin
42        $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpid $(1)/usr/sbin/
43        $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpi_listen $(1)/usr/sbin/
44        $(INSTALL_DIR) $(1)/etc/acpi/events
45        $(INSTALL_CONF) ./files/default $(1)/etc/acpi/events/default
46        $(INSTALL_DIR) $(1)/etc/init.d
47        $(INSTALL_CONF) ./files/acpid.init $(1)/etc/init.d/acpid
48        chmod 0750 $(1)/etc/init.d/acpid
49        $(INSTALL_DIR) $(1)/etc/hotplug.d/input/
50        $(INSTALL_CONF) ./files/acpid.hotplug $(1)/etc/hotplug.d/input/
51endef
52
53define Package/acpid/postinst
54#!/bin/sh
55[ -n "$${IPKG_INSTROOT}" ] || {
56        echo "waiting for input devices to come up"
57        /etc/init.d/acpid enable
58        sleep 5
59        /usr/sbin/acpid
60        echo "please try the power button"
61        exit 0
62}
63endef
64
65$(eval $(call BuildPackage,acpid))
Note: See TracBrowser for help on using the repository browser.