You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.9 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=acpid
  9. PKG_VERSION:=2.0.32
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@SF/acpid2
  13. PKG_HASH:=f2d2d30b3edc3234bd82f6f7186699a6aa3c85c8d20bc4e30e9b3c68a1ed157e
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:tedfelix:acpid
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/acpid
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=The ACPI Daemon (acpid) With Netlink Support
  25. URL:=https://sourceforge.net/projects/acpid2/
  26. DEPENDS:=+kmod-input-evdev
  27. endef
  28. define Package/acpid/description
  29. The ACPI Daemon (acpid) With Netlink Support
  30. endef
  31. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  32. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  33. define Package/acpid/install
  34. $(INSTALL_DIR) $(1)/usr/sbin
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/acpid $(1)/usr/sbin/
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kacpimon $(1)/usr/sbin/
  37. $(INSTALL_DIR) $(1)/usr/bin
  38. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/acpi_listen $(1)/usr/sbin/
  39. $(INSTALL_DIR) $(1)/etc/acpi/events
  40. $(INSTALL_CONF) ./files/default $(1)/etc/acpi/events/default
  41. $(INSTALL_DIR) $(1)/etc/init.d
  42. $(INSTALL_CONF) ./files/acpid.init $(1)/etc/init.d/acpid
  43. chmod 0750 $(1)/etc/init.d/acpid
  44. $(INSTALL_DIR) $(1)/etc/hotplug.d/input/
  45. $(INSTALL_CONF) ./files/acpid.hotplug $(1)/etc/hotplug.d/input/
  46. endef
  47. define Package/acpid/postinst
  48. #!/bin/sh
  49. [ -n "$${IPKG_INSTROOT}" ] || {
  50. echo "waiting for input devices to come up"
  51. /etc/init.d/acpid enable
  52. sleep 5
  53. /etc/init.d/acpid start
  54. echo "please try the power button"
  55. exit 0
  56. }
  57. endef
  58. $(eval $(call BuildPackage,acpid))