From patchwork Mon Jan 7 09:20:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Braun X-Patchwork-Id: 209882 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 5A8D92C0086 for ; Mon, 7 Jan 2013 20:20:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 19CA6101CD0; Mon, 7 Jan 2013 09:20:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id waQS-uwNbKBG; Mon, 7 Jan 2013 09:20:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3B3A5100235; Mon, 7 Jan 2013 09:20:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 93B098F753 for ; Mon, 7 Jan 2013 09:20:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 62DFE8681E for ; Mon, 7 Jan 2013 09:20:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D47gP9SwYpma for ; Mon, 7 Jan 2013 09:20:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.sceen.net (shattrath.sceen.net [94.23.252.191]) by whitealder.osuosl.org (Postfix) with ESMTP id F107D84C64 for ; Mon, 7 Jan 2013 09:20:15 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.sceen.net (Postfix) with ESMTP id C8C551402E5 for ; Mon, 7 Jan 2013 10:20:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at sceen.net Received: from mail.sceen.net ([127.0.0.1]) by localhost (mail.sceen.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tFNPFhCaUmG6 for ; Mon, 7 Jan 2013 10:20:12 +0100 (CET) Received: by mail.sceen.net (Postfix, from userid 1000) id DCD9014041D; Mon, 7 Jan 2013 10:20:12 +0100 (CET) From: Richard Braun To: buildroot@busybox.net Date: Mon, 7 Jan 2013 10:20:12 +0100 Message-Id: <1357550412-25660-1-git-send-email-rbraun@sceen.net> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <87mwwolkdx.fsf@dell.be.48ers.dk> References: <87mwwolkdx.fsf@dell.be.48ers.dk> Subject: [Buildroot] [PATCH v2 2/2] package/tzdata: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This is the time zone database, used by glibc for translations between UTC and local time. Signed-off-by: Richard Braun --- package/Config.in | 1 + package/tzdata/Config.in | 20 ++++++++++++++++++++ package/tzdata/tzdata.mk | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 0 deletions(-) create mode 100644 package/tzdata/Config.in create mode 100644 package/tzdata/tzdata.mk diff --git a/package/Config.in b/package/Config.in index 11e6f3a..75a64af 100644 --- a/package/Config.in +++ b/package/Config.in @@ -545,6 +545,7 @@ source "package/protobuf/Config.in" source "package/schifra/Config.in" source "package/startup-notification/Config.in" source "package/liblog4c-localtime/Config.in" +source "package/tzdata/Config.in" endmenu menu "Text and terminal handling" diff --git a/package/tzdata/Config.in b/package/tzdata/Config.in new file mode 100644 index 0000000..4e68a97 --- /dev/null +++ b/package/tzdata/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_TZDATA + bool "tzdata" + depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_eglibc || BR2_TOOLCHAIN_CTNG_glibc + help + Time zone database + + http://www.iana.org/time-zones/repository/tz-link.html + +config BR2_PACKAGE_TZDATA_ZONELIST + string "Time zone list" + depends on BR2_PACKAGE_TZDATA + default "default" + help + Space-separated list of time zones to compile. + + The value "default" includes all commonly used time zones. Note + that this set consumes around 5.5M. + + The full list is the list of files in the time zone database source, + not including the build and .tab files. diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk new file mode 100644 index 0000000..5bcee85 --- /dev/null +++ b/package/tzdata/tzdata.mk @@ -0,0 +1,44 @@ +############################################################# +# +# tzdata +# +############################################################# + +TZDATA_VERSION = 2012j +TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz +TZDATA_SITE = http://www.iana.org/time-zones/repository/releases +TZDATA_DEPENDENCIES = host-zic +TZDATA_LICENSE = Public domain + +TZDATA_ZIC = $(HOST_DIR)/usr/sbin/zic +TZDATA_DEFAULT_ZONELIST = africa antarctica asia australasia backward etcetera \ + europe factory northamerica pacificnew southamerica + +ifeq ($(call qstrip,$(BR2_PACKAGE_TZDATA_ZONELIST)),default) +TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST) +else +TZDATA_ZONELIST = $(call qstrip,$(BR2_PACKAGE_TZDATA_ZONELIST)) +endif + +# Don't strip any path components during extraction. +define TZDATA_EXTRACT_CMDS + gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \ + | $(TAR) --strip-components=0 -C $(@D) -xf - +endef + +define TZDATA_BUILD_CMDS + (cd $(@D); \ + for zone in $(TZDATA_ZONELIST); do \ + $(TZDATA_ZIC) -d _output -y yearistype.sh $$zone; \ + $(TZDATA_ZIC) -d _output/posix -y yearistype.sh $$zone; \ + $(TZDATA_ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone; \ + done; \ + ) +endef + +define TZDATA_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/zoneinfo + cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo +endef + +$(eval $(generic-package))