banip: update 1.0.0-3
[feed/packages.git] / utils / acpid / Makefile
1 #
2 # Copyright (C) 2012-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=acpid
11 PKG_VERSION:=2.0.34
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@SF/acpid2
16 PKG_HASH:=2d095c8cfcbc847caec746d62cdc8d0bff1ec1bc72ef7c674c721e04da6ab333
17
18 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
19 PKG_LICENSE:=GPL-2.0-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:tedfelix:acpid
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25 PKG_BUILD_FLAGS:=gc-sections lto
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/acpid
30 SECTION:=utils
31 CATEGORY:=Utilities
32 TITLE:=The ACPI Daemon (acpid) With Netlink Support
33 URL:=https://sourceforge.net/projects/acpid2/
34 DEPENDS:=+kmod-input-evdev
35 endef
36
37 define Package/acpid/description
38 The ACPI Daemon (acpid) With Netlink Support
39 endef
40
41 TARGET_LDFLAGS += -Wl,--as-needed
42
43 define Package/acpid/install
44 $(INSTALL_DIR) $(1)/usr/sbin
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/acpid $(1)/usr/sbin/
46 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kacpimon $(1)/usr/sbin/
47 $(INSTALL_DIR) $(1)/usr/bin
48 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/acpi_listen $(1)/usr/sbin/
49 $(INSTALL_DIR) $(1)/etc/acpi/events
50 $(INSTALL_CONF) ./files/default $(1)/etc/acpi/events/default
51 $(INSTALL_DIR) $(1)/etc/init.d
52 $(INSTALL_CONF) ./files/acpid.init $(1)/etc/init.d/acpid
53 chmod 0750 $(1)/etc/init.d/acpid
54 $(INSTALL_DIR) $(1)/etc/hotplug.d/input/
55 $(INSTALL_CONF) ./files/acpid.hotplug $(1)/etc/hotplug.d/input/
56 endef
57
58 define Package/acpid/postinst
59 #!/bin/sh
60 [ -n "$${IPKG_INSTROOT}" ] || {
61 echo "waiting for input devices to come up"
62 /etc/init.d/acpid enable
63 sleep 5
64 /etc/init.d/acpid start
65 echo "please try the power button"
66 exit 0
67 }
68 endef
69
70 $(eval $(call BuildPackage,acpid))