python-treq: bump to version 16.12.0
[buildroot-gz.git] / package / tz / tz.mk
blobf0daf4658fd495b984795f5a28525f593005b70f
1 ################################################################################
3 # tz
5 ################################################################################
7 TZ_DEPENDENCIES = host-tzdata host-tzdump
8 TZ_LICENSE = Public domain
10 TZ_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
12 define TZ_BUILD_CMDS
13 (cd $(HOST_DIR)/usr/share/zoneinfo/posix/; \
14 for i in $$(find . -type f); do \
15 mkdir -p $(@D)/output/$$(dirname $$i); \
16 $(TZDUMP) -p . -q $${i#./} | sed '1d' > $(@D)/output/$$i; \
17 done \
19 endef
21 define TZ_INSTALL_TARGET_CMDS
22 $(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/zoneinfo/zone.tab \
23 $(TARGET_DIR)/usr/share/zoneinfo/zone.tab
24 $(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/zoneinfo/iso3166.tab \
25 $(TARGET_DIR)/usr/share/zoneinfo/iso3166.tab
26 mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc
27 cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc
28 if [ -n "$(TZ_LOCALTIME)" ]; then \
29 if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/uclibc/$(TZDATA_LOCALTIME) ]; then \
30 printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \
31 "$(TZDATA_LOCALTIME)"; \
32 exit 1; \
33 fi; \
34 cd $(TARGET_DIR)/etc; \
35 ln -sf ../usr/share/zoneinfo/uclibc/$(TZDATA_LOCALTIME) TZ; \
37 endef
39 $(eval $(generic-package))