"Fossies" - the Fresh Open Source Software Archive

Member "buildroot-2021.05/package/acpid/acpid.mk" (6 Jun 2021, 1093 Bytes) of package /linux/privat/buildroot-2021.05.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Make source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes reports for "acpid.mk": 2021.05-rc3_vs_2021.05 or 2021.02.2_vs_2021.05.

    1 ################################################################################
    2 #
    3 # acpid
    4 #
    5 ################################################################################
    6 
    7 ACPID_VERSION = 2.0.32
    8 ACPID_SOURCE = acpid-$(ACPID_VERSION).tar.xz
    9 ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
   10 ACPID_LICENSE = GPL-2.0+
   11 ACPID_LICENSE_FILES = COPYING
   12 ACPID_CPE_ID_VENDOR = tedfelix
   13 ACPID_CPE_ID_PRODUCT = acpid2
   14 
   15 define ACPID_INSTALL_INIT_SYSTEMD
   16     $(INSTALL) -D -m 0644 package/acpid/acpid.service \
   17         $(TARGET_DIR)/usr/lib/systemd/system/acpid.service
   18 endef
   19 
   20 define ACPID_INSTALL_INIT_SYSV
   21     $(INSTALL) -D -m 0755 package/acpid/S02acpid \
   22         $(TARGET_DIR)/etc/init.d/S02acpid
   23 endef
   24 
   25 ifeq ($(BR2_INIT_SYSV)$(BR2_INIT_SYSTEMD),y)
   26 ACPID_POWEROFF_CMD = /sbin/shutdown -hP now
   27 else
   28 ACPID_POWEROFF_CMD = /sbin/poweroff
   29 endif
   30 
   31 define ACPID_SET_EVENTS
   32     mkdir -p $(TARGET_DIR)/etc/acpi/events
   33     printf 'event=button[ /]power\naction=%s\n' '$(ACPID_POWEROFF_CMD)' \
   34         >$(TARGET_DIR)/etc/acpi/events/powerbtn
   35 endef
   36 
   37 ACPID_POST_INSTALL_TARGET_HOOKS += ACPID_SET_EVENTS
   38 
   39 $(eval $(autotools-package))