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.

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