TZDATA_ZONELIST = $(call qstrip,$(BR2_TARGET_TZ_ZONELIST))
endif
+TZDATA_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
+
# Don't strip any path components during extraction.
define TZDATA_EXTRACT_CMDS
gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
cd $(TARGET_DIR)/usr/share/zoneinfo; \
for zone in posix/*; do \
- ln -sfn "$${zone}" "$${zone##*/}"; \
+ ln -sfn "$${zone}" "$${zone##*/}"; \
done
+ if [ -n "$(TZDATA_LOCALTIME)" ]; then \
+ cd $(TARGET_DIR)/etc; \
+ ln -sf ../usr/share/zoneinfo/$(TZDATA_LOCALTIME) localtime; \
+ echo "$(TZDATA_LOCALTIME)" >timezone; \
+ fi
endef
$(eval $(generic-package))
The full list is the list of files in the time zone database source,
not including the build and .tab files.
+config BR2_TARGET_LOCALTIME
+ string "default local time"
+ help
+ The time zone to install as the default local time, expressed as a
+ tzdata location, such as:
+ GMT
+ Europe/Paris
+ America/New_York
+ Pacific/Wallis
+ ...
+
+ If empty, no local time will be set, and the dates will be
+ expressed in UTC.
+
endif # BR2_TARGET_TZ_INFO
config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW