to generate signum.h we need a working cross-cc
[buildroot.git] / package / acpid / acpid.mk
blob1295c155a1d96328c372a28d805d013820f6d988
1 #############################################################
3 # acpid
5 #############################################################
6 ACPID_VERSION:=1.0.6
7 ACPID_DIR=$(BUILD_DIR)/acpid-$(ACPID_VERSION)
8 ACPID_SOURCE=acpid_$(ACPID_VERSION).orig.tar.gz
9 ACPID_PATCH=acpid_$(ACPID_VERSION)-4.diff.gz
10 ACPID_SITE=$(BR2_DEBIAN_MIRROR)/debian/pool/main/a/acpid
11 ACPID_CAT=$(ZCAT)
13 $(DL_DIR)/$(ACPID_SOURCE):
14 $(WGET) -P $(DL_DIR) $(ACPID_SITE)/$(ACPID_SOURCE)
16 ifneq ($(ACPID_PATCH),)
17 ACPID_PATCH_FILE=$(DL_DIR)/$(ACPID_PATCH)
18 $(ACPID_PATCH_FILE):
19 $(WGET) -P $(DL_DIR) $(ACPID_SITE)/$(ACPID_PATCH)
20 endif
22 $(ACPID_DIR)/.unpacked: $(DL_DIR)/$(ACPID_SOURCE) $(ACPID_PATCH_FILE)
23 $(ACPID_CAT) $(DL_DIR)/$(ACPID_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
24 ifneq ($(ACPID_PATCH),)
25 (cd $(ACPID_DIR) && $(ACPID_CAT) $(ACPID_PATCH_FILE) | patch -p1)
26 endif
27 toolchain/patch-kernel.sh $(ACPID_DIR) package/acpid/ acpid\*.patch
28 touch $@
30 $(ACPID_DIR)/acpid: $(ACPID_DIR)/.unpacked
31 $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(ACPID_DIR)
32 touch -c $(ACPID_DIR)/acpid $(ACPID_DIR)/acpi_listen
34 $(TARGET_DIR)/usr/sbin/acpid: $(ACPID_DIR)/acpid
35 $(INSTALL) -D -m 0755 $(ACPID_DIR)/acpid $(TARGET_DIR)/usr/sbin/acpid
36 $(INSTALL) -d $(TARGET_DIR)/etc/acpi/events
37 /bin/echo -e "event=button[ /]power\naction=/sbin/poweroff" > $(TARGET_DIR)/etc/acpi/events/powerbtn
38 $(INSTALL) -D -m 0755 package/acpid/S20acpid $(TARGET_DIR)/etc/init.d/S20acpid
39 $(STRIPCMD) $(STRIP_STRIP_ALL) $@
41 acpid: $(TARGET_DIR)/usr/sbin/acpid
43 acpid-source: $(DL_DIR)/$(ACPID_SOURCE) $(ACPID_PATCH_FILE)
45 acpid-clean:
46 -make -C $(ACPID_DIR) clean
47 rm -rf $(TARGET_DIR)/usr/sbin/acpid \
48 $(TARGET_DIR)/etc/acpi
50 acpid-dirclean:
51 rm -rf $(ACPID_DIR)
53 #############################################################
55 # Toplevel Makefile options
57 #############################################################
58 ifeq ($(BR2_PACKAGE_ACPID),y)
59 TARGETS+=acpid
60 endif