1
0

Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.27
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@SF/acpid2
  13. PKG_MD5SUM:=e41bdf628e122edb4342fca432ea7db9
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/acpid
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. TITLE:=The ACPI Daemon (acpid) With Netlink Support
  22. URL:=http://tedfelix.com/linux/acpid-netlink.html
  23. DEPENDS:=@(TARGET_x86||TARGET_x86_64) +kmod-input-evdev
  24. endef
  25. define Package/acpid/description
  26. The ACPI Daemon (acpid) With Netlink Support
  27. endef
  28. define Build/Compile
  29. $(MAKE) -C $(PKG_BUILD_DIR) \
  30. CC="$(TARGET_CC)" \
  31. LD="$(TARGET_CC)" \
  32. LDFLAGS="$(TARGET_LDFLAGS)" \
  33. all
  34. endef
  35. define Package/acpid/install
  36. $(INSTALL_DIR) $(1)/usr/sbin
  37. $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpid $(1)/usr/sbin/
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/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))