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