aboutsummaryrefslogtreecommitdiff
path: root/package/tzdata
diff options
context:
space:
mode:
authorGravatar Alexandre Belloni <alexandre.belloni@free-electrons.com>2014-04-07 21:58:05 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-04-08 23:58:25 +0200
commit56af48791726c256c2acbe9aa7c499dc05abbea8 (patch)
tree8622e69b263a33470574da304182c2937247737d /package/tzdata
parent3f595cde97cdc4b08f979407c9754f75970257d0 (diff)
downloadbuildroot-56af48791726c256c2acbe9aa7c499dc05abbea8.tar.gz
buildroot-56af48791726c256c2acbe9aa7c499dc05abbea8.tar.bz2
tzdata: allow host build
uClibc uses its own format for timezone info. OTOH, we can generate uClibc-compatible timezone info from existing tzdata. Add a host-version of tzdata, so we can harvest its installed timezone info. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> 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.mk20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index c9824dc5ce..05a82a23d4 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -50,4 +50,24 @@ define TZDATA_INSTALL_TARGET_CMDS
fi
endef
+define HOST_TZDATA_EXTRACT_CMDS
+ gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
+ | $(TAR) --strip-components=0 -C $(@D) -xf -
+endef
+
+define HOST_TZDATA_BUILD_CMDS
+ (cd $(@D); \
+ for zone in $(TZDATA_ZONELIST); do \
+ $(ZIC) -d _output/posix -y yearistype.sh $$zone; \
+ $(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone; \
+ done; \
+ )
+endef
+
+define HOST_TZDATA_INSTALL_CMDS
+ mkdir -p $(HOST_DIR)/usr/share/zoneinfo
+ cp -a $(@D)/_output/* $(HOST_DIR)/usr/share/zoneinfo
+endef
+
$(eval $(generic-package))
+$(eval $(host-generic-package))