aboutsummaryrefslogtreecommitdiff
path: root/package/tzdata
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2014-04-07 21:58:04 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-04-08 23:56:19 +0200
commit3f595cde97cdc4b08f979407c9754f75970257d0 (patch)
tree8548960fbc8937efdf21583e31349d658e3fc7c6 /package/tzdata
parentd6a37917dde1293f6e25d87801283e098c22d580 (diff)
downloadbuildroot-3f595cde97cdc4b08f979407c9754f75970257d0.tar.gz
buildroot-3f595cde97cdc4b08f979407c9754f75970257d0.tar.bz2
system: add selection of a default localtime
[Peter: strip quotes/use local TZDATA_LOCALTIME variable] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [alexandre.belloni: move from "tzdata" to "system configuration"] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> [yann.morin.1998@free.fr: move into the BR2_TARGET_TZ_INFO conditionnal block] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/tzdata')
-rw-r--r--package/tzdata/tzdata.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index 59004736e8..c9824dc5ce 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -19,6 +19,8 @@ else
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) \
@@ -39,8 +41,13 @@ define TZDATA_INSTALL_TARGET_CMDS
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))