2015-06-17 15:11:48 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2012-2015 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=acpid
|
2023-05-17 05:51:14 +00:00
|
|
|
PKG_VERSION:=2.0.34
|
|
|
|
PKG_RELEASE:=1
|
2015-06-17 15:11:48 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
2018-06-08 01:08:39 +00:00
|
|
|
PKG_SOURCE_URL:=@SF/acpid2
|
2023-05-17 05:51:14 +00:00
|
|
|
PKG_HASH:=2d095c8cfcbc847caec746d62cdc8d0bff1ec1bc72ef7c674c721e04da6ab333
|
2019-10-30 17:14:52 +00:00
|
|
|
|
2016-07-09 18:50:58 +00:00
|
|
|
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
|
2019-10-30 17:14:52 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0-or-later
|
2015-06-17 15:11:48 +00:00
|
|
|
PKG_LICENSE_FILES:=COPYING
|
2019-09-12 12:13:21 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:tedfelix:acpid
|
2015-06-17 15:11:48 +00:00
|
|
|
|
2019-10-30 17:14:52 +00:00
|
|
|
PKG_INSTALL:=1
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
2023-03-23 08:27:01 +00:00
|
|
|
PKG_BUILD_FLAGS:=gc-sections lto
|
2019-10-30 17:14:52 +00:00
|
|
|
|
2015-06-17 15:11:48 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/acpid
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=The ACPI Daemon (acpid) With Netlink Support
|
2018-07-26 20:15:51 +00:00
|
|
|
URL:=https://sourceforge.net/projects/acpid2/
|
|
|
|
DEPENDS:=+kmod-input-evdev
|
2015-06-17 15:11:48 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/acpid/description
|
|
|
|
The ACPI Daemon (acpid) With Netlink Support
|
|
|
|
endef
|
|
|
|
|
2023-03-23 08:09:13 +00:00
|
|
|
TARGET_LDFLAGS += -Wl,--as-needed
|
2015-06-17 15:11:48 +00:00
|
|
|
|
|
|
|
define Package/acpid/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2019-10-30 17:14:52 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/acpid $(1)/usr/sbin/
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kacpimon $(1)/usr/sbin/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/acpi_listen $(1)/usr/sbin/
|
2015-06-17 15:11:48 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/acpi/events
|
|
|
|
$(INSTALL_CONF) ./files/default $(1)/etc/acpi/events/default
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_CONF) ./files/acpid.init $(1)/etc/init.d/acpid
|
|
|
|
chmod 0750 $(1)/etc/init.d/acpid
|
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/input/
|
|
|
|
$(INSTALL_CONF) ./files/acpid.hotplug $(1)/etc/hotplug.d/input/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/acpid/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
[ -n "$${IPKG_INSTROOT}" ] || {
|
|
|
|
echo "waiting for input devices to come up"
|
|
|
|
/etc/init.d/acpid enable
|
|
|
|
sleep 5
|
|
|
|
/etc/init.d/acpid start
|
|
|
|
echo "please try the power button"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,acpid))
|