kumquat-buildroot/package/tz/tz.mk
Arnout Vandecappelle 3b91bd4791 Globally replace $(HOST_DIR)/usr/share with $(HOST_DIR)/share
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/share' | xargs sed -i 's%$(HOST_DIR)/usr/share%$(HOST_DIR)/share%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:21:31 +02:00

37 lines
1.2 KiB
Makefile

################################################################################
#
# tz
#
################################################################################
TZ_DEPENDENCIES = host-tzdata host-tzdump
TZ_LICENSE = Public domain
TZ_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
define TZ_BUILD_CMDS
(cd $(HOST_DIR)/share/zoneinfo/posix/; \
for i in $$(find . -type f); do \
mkdir -p $(@D)/output/$$(dirname $$i); \
$(TZDUMP) -p . -q $${i#./} | sed '1d' > $(@D)/output/$$i; \
done \
)
endef
define TZ_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0644 $(HOST_DIR)/share/zoneinfo/zone.tab \
$(TARGET_DIR)/usr/share/zoneinfo/zone.tab
$(INSTALL) -D -m 0644 $(HOST_DIR)/share/zoneinfo/iso3166.tab \
$(TARGET_DIR)/usr/share/zoneinfo/iso3166.tab
mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc
cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc
if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/uclibc/$(TZ_LOCALTIME) ]; then \
printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \
"$(TZ_LOCALTIME)"; \
exit 1; \
fi
ln -sf ../usr/share/zoneinfo/uclibc/$(TZ_LOCALTIME) $(TARGET_DIR)/etc/TZ
endef
$(eval $(generic-package))