2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-07 12:53:41 +01:00
|
|
|
#
|
|
|
|
# tzdata
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-07 12:53:41 +01:00
|
|
|
|
2017-04-20 14:02:46 +02:00
|
|
|
TZDATA_VERSION = 2017b
|
2013-03-07 12:53:41 +01:00
|
|
|
TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz
|
2015-10-12 13:38:10 +02:00
|
|
|
TZDATA_SITE = http://www.iana.org/time-zones/repository/releases
|
2015-07-11 16:15:08 +02:00
|
|
|
TZDATA_STRIP_COMPONENTS = 0
|
2014-05-23 00:21:47 +02:00
|
|
|
TZDATA_DEPENDENCIES = host-tzdata
|
|
|
|
HOST_TZDATA_DEPENDENCIES = host-zic
|
2013-03-07 12:53:41 +01:00
|
|
|
TZDATA_LICENSE = Public domain
|
|
|
|
|
2016-04-08 10:23:27 +02:00
|
|
|
# Take care when re-ordering this list since this might break zone
|
|
|
|
# dependencies
|
2014-12-30 08:36:23 +01:00
|
|
|
TZDATA_DEFAULT_ZONELIST = \
|
2016-04-08 10:23:27 +02:00
|
|
|
africa antarctica asia australasia europe northamerica \
|
|
|
|
southamerica pacificnew etcetera backward systemv factory
|
2013-03-07 12:53:41 +01:00
|
|
|
|
2014-04-07 21:58:03 +02:00
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_TZ_ZONELIST)),default)
|
2013-03-07 12:53:41 +01:00
|
|
|
TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST)
|
|
|
|
else
|
2014-04-07 21:58:03 +02:00
|
|
|
TZDATA_ZONELIST = $(call qstrip,$(BR2_TARGET_TZ_ZONELIST))
|
2013-03-07 12:53:41 +01:00
|
|
|
endif
|
|
|
|
|
2014-04-07 21:58:04 +02:00
|
|
|
TZDATA_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
|
|
|
|
|
2014-05-23 00:21:47 +02:00
|
|
|
# No need to extract for target, we're using the host-installed files
|
|
|
|
TZDATA_EXTRACT_CMDS =
|
2013-03-07 12:53:41 +01:00
|
|
|
|
|
|
|
define TZDATA_INSTALL_TARGET_CMDS
|
2014-11-18 19:38:27 +01:00
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/zoneinfo
|
|
|
|
cp -a $(HOST_DIR)/usr/share/zoneinfo/* $(TARGET_DIR)/usr/share/zoneinfo
|
2017-04-21 17:24:48 +02:00
|
|
|
cd $(TARGET_DIR)/usr/share/zoneinfo; \
|
|
|
|
for zone in posix/*; do \
|
|
|
|
ln -sfn "$${zone}" "$${zone##*/}"; \
|
2013-03-07 12:53:41 +01:00
|
|
|
done
|
2017-04-21 17:24:48 +02:00
|
|
|
if [ -n "$(TZDATA_LOCALTIME)" ]; then \
|
2014-05-22 22:40:59 +02:00
|
|
|
if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/$(TZDATA_LOCALTIME) ]; then \
|
|
|
|
printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \
|
2017-04-21 17:24:48 +02:00
|
|
|
"$(TZDATA_LOCALTIME)"; \
|
|
|
|
exit 1; \
|
|
|
|
fi; \
|
|
|
|
cd $(TARGET_DIR)/etc; \
|
2014-04-07 21:58:04 +02:00
|
|
|
ln -sf ../usr/share/zoneinfo/$(TZDATA_LOCALTIME) localtime; \
|
2017-04-21 17:24:48 +02:00
|
|
|
echo "$(TZDATA_LOCALTIME)" >timezone; \
|
2014-04-07 21:58:04 +02:00
|
|
|
fi
|
2013-03-07 12:53:41 +01:00
|
|
|
endef
|
|
|
|
|
2014-04-07 21:58:05 +02:00
|
|
|
define HOST_TZDATA_BUILD_CMDS
|
|
|
|
(cd $(@D); \
|
|
|
|
for zone in $(TZDATA_ZONELIST); do \
|
2016-04-08 10:23:27 +02:00
|
|
|
$(ZIC) -d _output/posix -y yearistype.sh $$zone || exit 1; \
|
|
|
|
$(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone || exit 1; \
|
2014-04-07 21:58:05 +02:00
|
|
|
done; \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_TZDATA_INSTALL_CMDS
|
2014-11-18 19:38:27 +01:00
|
|
|
$(INSTALL) -d -m 0755 $(HOST_DIR)/usr/share/zoneinfo
|
2014-05-04 18:01:27 +02:00
|
|
|
cp -a $(@D)/_output/* $(@D)/*.tab $(HOST_DIR)/usr/share/zoneinfo
|
2014-04-07 21:58:05 +02:00
|
|
|
endef
|
|
|
|
|
2013-03-07 12:53:41 +01:00
|
|
|
$(eval $(generic-package))
|
2014-04-07 21:58:05 +02:00
|
|
|
$(eval $(host-generic-package))
|