* [Buildroot] [PATCH] packages: add tzdata
@ 2013-01-04 11:48 Richard Braun
2013-01-04 11:54 ` Thomas Petazzoni
0 siblings, 1 reply; 17+ messages in thread
From: Richard Braun @ 2013-01-04 11:48 UTC (permalink / raw)
To: buildroot
The time zone database can be used by glibc (and potentially other
applications) to offset UTC time and translate it according to
additional rules, such as zone boundaries and daylight-saving time.
Signed-off-by: Richard Braun <rbraun@sceen.net>
---
package/Config.in | 1 +
package/tzdata/Config.in | 8 +++++++
package/tzdata/tzdata.mk | 37 ++++++++++++++++++++++++++++++++
package/zic/zic-fix-dependencies.patch | 25 +++++++++++++++++++++
package/zic/zic.mk | 26 ++++++++++++++++++++++
5 files changed, 97 insertions(+), 0 deletions(-)
create mode 100644 package/tzdata/Config.in
create mode 100644 package/tzdata/tzdata.mk
create mode 100644 package/zic/zic-fix-dependencies.patch
create mode 100644 package/zic/zic.mk
diff --git a/package/Config.in b/package/Config.in
index 2cbadf4..99bb724 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -540,6 +540,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..cd4f818
--- /dev/null
+++ b/package/tzdata/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_TZDATA
+ bool "tzdata"
+ help
+ Time zone database
+
+ http://www.iana.org/time-zones/repository/tz-link.html
+
+ Note that uClibc doesn't support this database.
diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
new file mode 100644
index 0000000..5995c24
--- /dev/null
+++ b/package/tzdata/tzdata.mk
@@ -0,0 +1,37 @@
+#############################################################
+#
+# 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_ZONELIST = africa antarctica asia australasia backward etcetera \
+ europe factory northamerica pacificnew southamerica
+
+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))
diff --git a/package/zic/zic-fix-dependencies.patch b/package/zic/zic-fix-dependencies.patch
new file mode 100644
index 0000000..e67c5eb
--- /dev/null
+++ b/package/zic/zic-fix-dependencies.patch
@@ -0,0 +1,25 @@
+From 087046dc38cfa4fa429317cc5db4c9bfaaaedc64 Mon Sep 17 00:00:00 2001
+From: Richard Braun <rbraun@sceen.net>
+Date: Fri, 4 Jan 2013 10:57:24 +0100
+Subject: [PATCH] fix zic dependencies
+
+---
+ Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index d76a81e..30df7dc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -349,7 +349,7 @@ version.h:
+ zdump: $(TZDOBJS)
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
+
+-zic: $(TZCOBJS) yearistype
++zic: $(TZCOBJS)
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
+
+ yearistype: yearistype.sh
+--
+1.7.2.5
+
diff --git a/package/zic/zic.mk b/package/zic/zic.mk
new file mode 100644
index 0000000..d2d5c7d
--- /dev/null
+++ b/package/zic/zic.mk
@@ -0,0 +1,26 @@
+#############################################################
+#
+# zic
+#
+#############################################################
+
+ZIC_VERSION = 2012j
+ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz
+ZIC_SITE = http://www.iana.org/time-zones/repository/releases
+ZIC_LICENSE = Public domain
+
+define HOST_ZIC_EXTRACT_CMDS
+ gzip -d -c $(DL_DIR)/$(ZIC_SOURCE) \
+ | $(TAR) --strip-components=0 -C $(@D) -xf -
+endef
+
+define HOST_ZIC_BUILD_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic
+endef
+
+define HOST_ZIC_INSTALL_CMDS
+ mkdir -p $(HOST_DIR)/usr/sbin
+ install -D -m 755 $(@D)/zic $(HOST_DIR)/usr/sbin/zic
+endef
+
+$(eval $(host-generic-package))
--
1.7.2.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH] packages: add tzdata
2013-01-04 11:48 [Buildroot] [PATCH] packages: add tzdata Richard Braun
@ 2013-01-04 11:54 ` Thomas Petazzoni
2013-01-04 12:07 ` Richard Braun
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2013-01-04 11:54 UTC (permalink / raw)
To: buildroot
Dear Richard Braun,
On Fri, 4 Jan 2013 12:48:44 +0100, Richard Braun wrote:
> The time zone database can be used by glibc (and potentially other
> applications) to offset UTC time and translate it according to
> additional rules, such as zone boundaries and daylight-saving time.
>
> Signed-off-by: Richard Braun <rbraun@sceen.net>
> ---
> package/Config.in | 1 +
> package/tzdata/Config.in | 8 +++++++
> package/tzdata/tzdata.mk | 37 ++++++++++++++++++++++++++++++++
> package/zic/zic-fix-dependencies.patch | 25 +++++++++++++++++++++
> package/zic/zic.mk | 26 ++++++++++++++++++++++
Please split in two patches. One for zic, one for tzdata.
> 5 files changed, 97 insertions(+), 0 deletions(-)
> create mode 100644 package/tzdata/Config.in
> create mode 100644 package/tzdata/tzdata.mk
> create mode 100644 package/zic/zic-fix-dependencies.patch
> create mode 100644 package/zic/zic.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 2cbadf4..99bb724 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -540,6 +540,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..cd4f818
> --- /dev/null
> +++ b/package/tzdata/Config.in
> @@ -0,0 +1,8 @@
> +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
> +
> + Note that uClibc doesn't support this database.
> diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
> new file mode 100644
> index 0000000..5995c24
> --- /dev/null
> +++ b/package/tzdata/tzdata.mk
> @@ -0,0 +1,37 @@
> +#############################################################
> +#
> +# 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_ZONELIST = africa antarctica asia australasia backward etcetera \
> + europe factory northamerica pacificnew southamerica
How about making it possible to configure which time zone data gets
installed? From what I remember, the entire size of the tzdata database
was quite large. Could be something like:
choice
prompt "Time zone selection"
config BR2_PACKAGE_TZDATA_ALL
bool "all"
config BR2_PACKAGE_TZDATA_LIST
bool "List"
config BR2_PACKAGE_TZDATA_FILELIST
bool "List in file"
endchoice
> +define TZDATA_EXTRACT_CMDS
> + gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
> + | $(TAR) --strip-components=0 -C $(@D) -xf -
> +endef
A short comment above to explain that the need to override the extract
step is the strip-components=0 would be useful.
> +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))
> diff --git a/package/zic/zic-fix-dependencies.patch b/package/zic/zic-fix-dependencies.patch
> new file mode 100644
> index 0000000..e67c5eb
> --- /dev/null
> +++ b/package/zic/zic-fix-dependencies.patch
> @@ -0,0 +1,25 @@
> +From 087046dc38cfa4fa429317cc5db4c9bfaaaedc64 Mon Sep 17 00:00:00 2001
> +From: Richard Braun <rbraun@sceen.net>
> +Date: Fri, 4 Jan 2013 10:57:24 +0100
> +Subject: [PATCH] fix zic dependencies
> +
> +---
A better patch description is needed.
> + Makefile | 2 +-
> + 1 files changed, 1 insertions(+), 1 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index d76a81e..30df7dc 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -349,7 +349,7 @@ version.h:
> + zdump: $(TZDOBJS)
> + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
> +
> +-zic: $(TZCOBJS) yearistype
> ++zic: $(TZCOBJS)
> + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
> +
> + yearistype: yearistype.sh
> +--
> +1.7.2.5
> +
> diff --git a/package/zic/zic.mk b/package/zic/zic.mk
> new file mode 100644
> index 0000000..d2d5c7d
> --- /dev/null
> +++ b/package/zic/zic.mk
> @@ -0,0 +1,26 @@
> +#############################################################
> +#
> +# zic
> +#
> +#############################################################
> +
> +ZIC_VERSION = 2012j
> +ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz
> +ZIC_SITE = http://www.iana.org/time-zones/repository/releases
> +ZIC_LICENSE = Public domain
> +
> +define HOST_ZIC_EXTRACT_CMDS
> + gzip -d -c $(DL_DIR)/$(ZIC_SOURCE) \
> + | $(TAR) --strip-components=0 -C $(@D) -xf -
> +endef
> +
> +define HOST_ZIC_BUILD_CMDS
> + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic
> +endef
> +
> +define HOST_ZIC_INSTALL_CMDS
> + mkdir -p $(HOST_DIR)/usr/sbin
> + install -D -m 755 $(@D)/zic $(HOST_DIR)/usr/sbin/zic
> +endef
> +
> +$(eval $(host-generic-package))
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH] packages: add tzdata
2013-01-04 11:54 ` Thomas Petazzoni
@ 2013-01-04 12:07 ` Richard Braun
2013-01-04 12:41 ` Thomas Petazzoni
0 siblings, 1 reply; 17+ messages in thread
From: Richard Braun @ 2013-01-04 12:07 UTC (permalink / raw)
To: buildroot
On Fri, Jan 04, 2013 at 12:54:47PM +0100, Thomas Petazzoni wrote:
> Please split in two patches. One for zic, one for tzdata.
OK.
> depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_eglibc || BR2_TOOLCHAIN_CTNG_glibc
This would prevent other applications with support for the format from
using it (in other words, although I'm not aware of other such
applications, glibc might not be the only user). The time zone database
itself has no real dependency. Do you still think I should add these,
and change them when needed only ?
> How about making it possible to configure which time zone data gets
> installed? From what I remember, the entire size of the tzdata database
> was quite large. Could be something like:
Indeed.
> > +define TZDATA_EXTRACT_CMDS
> > + gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
> > + | $(TAR) --strip-components=0 -C $(@D) -xf -
> > +endef
>
> A short comment above to explain that the need to override the extract
> step is the strip-components=0 would be useful.
OK.
> > +Subject: [PATCH] fix zic dependencies
> > +
> > +---
>
> A better patch description is needed.
OK.
I'll resubmit soon. Thanks.
--
Richard Braun
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH] packages: add tzdata
2013-01-04 12:07 ` Richard Braun
@ 2013-01-04 12:41 ` Thomas Petazzoni
2013-01-04 13:06 ` [Buildroot] [PATCH 1/2] package/zic: new host package Richard Braun
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-01-04 12:41 UTC (permalink / raw)
To: buildroot
Dear Richard Braun,
On Fri, 4 Jan 2013 13:07:59 +0100, Richard Braun wrote:
> > depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_eglibc || BR2_TOOLCHAIN_CTNG_glibc
>
> This would prevent other applications with support for the format from
> using it (in other words, although I'm not aware of other such
> applications, glibc might not be the only user). The time zone database
> itself has no real dependency. Do you still think I should add these,
> and change them when needed only ?
Hum, good question. Maybe you can keep it as you proposed, but increase
the help text about uClibc, explaining that this is generally mostly
useful with glibc, but kept available for uClibc in case a specific
application makes use of tzdata.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 1/2] package/zic: new host package
2013-01-04 12:41 ` Thomas Petazzoni
@ 2013-01-04 13:06 ` Richard Braun
2013-01-04 13:06 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Richard Braun
2013-01-04 21:15 ` [Buildroot] [PATCH] packages: add tzdata Peter Korsgaard
2 siblings, 0 replies; 17+ messages in thread
From: Richard Braun @ 2013-01-04 13:06 UTC (permalink / raw)
To: buildroot
This is the zone information compiler, used to compile the time zone
database.
Signed-off-by: Richard Braun <rbraun@sceen.net>
---
package/zic/zic-fix-dependencies.patch | 27 +++++++++++++++++++++++++++
package/zic/zic.mk | 27 +++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 0 deletions(-)
create mode 100644 package/zic/zic-fix-dependencies.patch
create mode 100644 package/zic/zic.mk
diff --git a/package/zic/zic-fix-dependencies.patch b/package/zic/zic-fix-dependencies.patch
new file mode 100644
index 0000000..e1cbc12
--- /dev/null
+++ b/package/zic/zic-fix-dependencies.patch
@@ -0,0 +1,27 @@
+From 4a2a55a640dd9316dac5f31832064f28f59ab0ae Mon Sep 17 00:00:00 2001
+From: Richard Braun <rbraun@sceen.net>
+Date: Fri, 4 Jan 2013 10:57:24 +0100
+Subject: [PATCH] zic: fix dependencies
+
+The yearistype script is provided by the tzdata package, and is required
+at runtime only.
+---
+ Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index d76a81e..30df7dc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -349,7 +349,7 @@ version.h:
+ zdump: $(TZDOBJS)
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
+
+-zic: $(TZCOBJS) yearistype
++zic: $(TZCOBJS)
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
+
+ yearistype: yearistype.sh
+--
+1.7.2.5
+
diff --git a/package/zic/zic.mk b/package/zic/zic.mk
new file mode 100644
index 0000000..3f68fcd
--- /dev/null
+++ b/package/zic/zic.mk
@@ -0,0 +1,27 @@
+#############################################################
+#
+# zic
+#
+#############################################################
+
+ZIC_VERSION = 2012j
+ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz
+ZIC_SITE = http://www.iana.org/time-zones/repository/releases
+ZIC_LICENSE = Public domain
+
+# Don't strip any path components during extraction.
+define HOST_ZIC_EXTRACT_CMDS
+ gzip -d -c $(DL_DIR)/$(ZIC_SOURCE) \
+ | $(TAR) --strip-components=0 -C $(@D) -xf -
+endef
+
+define HOST_ZIC_BUILD_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic
+endef
+
+define HOST_ZIC_INSTALL_CMDS
+ mkdir -p $(HOST_DIR)/usr/sbin
+ install -D -m 755 $(@D)/zic $(HOST_DIR)/usr/sbin/zic
+endef
+
+$(eval $(host-generic-package))
--
1.7.2.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-01-04 12:41 ` Thomas Petazzoni
2013-01-04 13:06 ` [Buildroot] [PATCH 1/2] package/zic: new host package Richard Braun
@ 2013-01-04 13:06 ` Richard Braun
2013-01-04 13:41 ` Thomas Petazzoni
2013-01-04 21:15 ` [Buildroot] [PATCH] packages: add tzdata Peter Korsgaard
2 siblings, 1 reply; 17+ messages in thread
From: Richard Braun @ 2013-01-04 13:06 UTC (permalink / raw)
To: buildroot
This is the time zone database, used by glibc for translations between
UTC and local time.
Signed-off-by: Richard Braun <rbraun@sceen.net>
---
package/Config.in | 1 +
package/tzdata/Config.in | 24 ++++++++++++++++++++++++
package/tzdata/tzdata.mk | 44 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 69 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 2cbadf4..99bb724 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -540,6 +540,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..d219ae2
--- /dev/null
+++ b/package/tzdata/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_TZDATA
+ bool "tzdata"
+ help
+ Time zone database
+
+ http://www.iana.org/time-zones/repository/tz-link.html
+
+ Note that this package is most useful for glibc-based systems, as
+ uClibc doesn't support the format. Despite this, the time zone
+ database can also be built on uClibc-based systems in case an
+ application has specific support for it.
+
+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))
--
1.7.2.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-01-04 13:06 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Richard Braun
@ 2013-01-04 13:41 ` Thomas Petazzoni
2013-01-04 13:45 ` Richard Braun
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2013-01-04 13:41 UTC (permalink / raw)
To: buildroot
Dear Richard Braun,
On Fri, 4 Jan 2013 14:06:10 +0100, Richard Braun wrote:
> + for zone in $(TZDATA_ZONELIST); do \
> + $(TZDATA_ZIC) -d _output -y yearistype.sh $$zone; \
> + $(TZDATA_ZIC) -d _output/posix -y yearistype.sh $$zone; \
I am wondering why we are generating the time zone data twice here with
the same argument? I know POSIX says that time zone data shouldn't take
leap seconds into account, so I understand the difference between
_output/posix and _output/right, but not between _output and
_output/posix.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-01-04 13:41 ` Thomas Petazzoni
@ 2013-01-04 13:45 ` Richard Braun
2013-01-04 13:48 ` Thomas Petazzoni
0 siblings, 1 reply; 17+ messages in thread
From: Richard Braun @ 2013-01-04 13:45 UTC (permalink / raw)
To: buildroot
On Fri, Jan 04, 2013 at 02:41:19PM +0100, Thomas Petazzoni wrote:
> I am wondering why we are generating the time zone data twice here with
> the same argument? I know POSIX says that time zone data shouldn't take
> leap seconds into account, so I understand the difference between
> _output/posix and _output/right, but not between _output and
> _output/posix.
The posix version is the default one.
--
Richard Braun
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-01-04 13:45 ` Richard Braun
@ 2013-01-04 13:48 ` Thomas Petazzoni
2013-01-04 13:57 ` Richard Braun
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2013-01-04 13:48 UTC (permalink / raw)
To: buildroot
Dear Richard Braun,
On Fri, 4 Jan 2013 14:45:20 +0100, Richard Braun wrote:
> On Fri, Jan 04, 2013 at 02:41:19PM +0100, Thomas Petazzoni wrote:
> > I am wondering why we are generating the time zone data twice here with
> > the same argument? I know POSIX says that time zone data shouldn't take
> > leap seconds into account, so I understand the difference between
> > _output/posix and _output/right, but not between _output and
> > _output/posix.
>
> The posix version is the default one.
Yes, but then why isn't _output/posix a symlink to _output/ ?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH] packages: add tzdata
2013-01-04 12:41 ` Thomas Petazzoni
2013-01-04 13:06 ` [Buildroot] [PATCH 1/2] package/zic: new host package Richard Braun
2013-01-04 13:06 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Richard Braun
@ 2013-01-04 21:15 ` Peter Korsgaard
2013-01-07 9:20 ` [Buildroot] [PATCH v2 2/2] package/tzdata: new package Richard Braun
2 siblings, 1 reply; 17+ messages in thread
From: Peter Korsgaard @ 2013-01-04 21:15 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> Hum, good question. Maybe you can keep it as you proposed, but increase
Thomas> the help text about uClibc, explaining that this is generally mostly
Thomas> useful with glibc, but kept available for uClibc in case a specific
Thomas> application makes use of tzdata.
I would just keep it glibc-only for now to limit confusion. I've never
heard about any other program using it.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/tzdata: new package
2013-01-04 21:15 ` [Buildroot] [PATCH] packages: add tzdata Peter Korsgaard
@ 2013-01-07 9:20 ` Richard Braun
0 siblings, 0 replies; 17+ messages in thread
From: Richard Braun @ 2013-01-07 9:20 UTC (permalink / raw)
To: buildroot
This is the time zone database, used by glibc for translations between
UTC and local time.
Signed-off-by: Richard Braun <rbraun@sceen.net>
---
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))
--
1.7.2.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [pull request] Pull request for branch yem-misc
@ 2013-02-04 22:49 Yann E. MORIN
2013-02-04 22:49 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Yann E. MORIN
0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2013-02-04 22:49 UTC (permalink / raw)
To: buildroot
Hello All!
This series is a based on Richard's tzdata initial series, with some fixes
discussed today during the Developper's Day.
Changes since Richard's post:
- install POSIX time zones only once
- path to 'zic' is exported by the 'zic' package
The following changes since commit d3e7fbd75e49e3368b8c361c45344266ceca5cfd:
heirloom-mailx: needs fork() (2013-02-03 21:37:32 +0100)
are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-misc
Richard Braun (2):
package/zic: new host package
package/tzdata: new package
package/Config.in | 1 +
package/tzdata/Config.in | 20 ++++++++++++++
package/tzdata/tzdata.mk | 46 ++++++++++++++++++++++++++++++++
package/zic/zic-fix-dependencies.patch | 27 ++++++++++++++++++
package/zic/zic.mk | 29 ++++++++++++++++++++
5 files changed, 123 insertions(+), 0 deletions(-)
create mode 100644 package/tzdata/Config.in
create mode 100644 package/tzdata/tzdata.mk
create mode 100644 package/zic/zic-fix-dependencies.patch
create mode 100644 package/zic/zic.mk
Regards,
Yann E. MORIN
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-02-04 22:49 [Buildroot] [pull request] Pull request for branch yem-misc Yann E. MORIN
@ 2013-02-04 22:49 ` Yann E. MORIN
2013-02-26 2:02 ` Danomi Manchego
0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2013-02-04 22:49 UTC (permalink / raw)
To: buildroot
From: Richard Braun <rbraun@sceen.net>
This is the time zone database, used by glibc for translations between
UTC and local time.
Signed-off-by: Richard Braun <rbraun@sceen.net>
[yann.morin.1998 at free.fr: use global ZIC, install posix TZ only once]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/Config.in | 1 +
package/tzdata/Config.in | 20 ++++++++++++++++++++
package/tzdata/tzdata.mk | 46 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 67 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 2f219b6..090216e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -566,6 +566,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..f74898f
--- /dev/null
+++ b/package/tzdata/tzdata.mk
@@ -0,0 +1,46 @@
+#############################################################
+#
+# 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_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 \
+ $(ZIC) -d _output/posix -y yearistype.sh $$zone; \
+ $(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
+ cd $(TARGET_DIR)/usr/share/zoneinfo; \
+ for zone in posix/*; do \
+ ln -s "$${zone}" "$${zone##*/}"; \
+ done
+endef
+
+$(eval $(generic-package))
--
1.7.2.5
^ permalink raw reply related [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-02-04 22:49 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Yann E. MORIN
@ 2013-02-26 2:02 ` Danomi Manchego
2013-02-26 7:43 ` Richard Braun
2013-02-26 20:52 ` Yann E. MORIN
0 siblings, 2 replies; 17+ messages in thread
From: Danomi Manchego @ 2013-02-26 2:02 UTC (permalink / raw)
To: buildroot
+define TZDATA_INSTALL_TARGET_CMDS
+ mkdir -p $(TARGET_DIR)/usr/share/zoneinfo
+ cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
+ cd $(TARGET_DIR)/usr/share/zoneinfo; \
+ for zone in posix/*; do \
+ ln -s "$${zone}" "$${zone##*/}"; \
+ done
+endef
Yann,
Today, a co-worker applied these patches, and ran into a small problem
during the install phase. He had made a mistake while applying the
companion zic patch, which caused the tzdata package to stop. Then,
after he fixed his mistake, the tzdata failed to install, because the
'ln -s' failed to overwrite symlinks that already exist. So I think
that it might be good to add an 'rm -f "$${zone##*/}";' before the 'ln
-s'. (Or at least make it an 'ln -sf', though I personally am
distrustful of 'ln -sf' due to sometimes unexpected behavior when the
target of the symlink is a directory.)
Danomi -
^ permalink raw reply [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-02-26 2:02 ` Danomi Manchego
@ 2013-02-26 7:43 ` Richard Braun
2013-02-26 20:52 ` Yann E. MORIN
1 sibling, 0 replies; 17+ messages in thread
From: Richard Braun @ 2013-02-26 7:43 UTC (permalink / raw)
To: buildroot
On Mon, Feb 25, 2013 at 09:02:50PM -0500, Danomi Manchego wrote:
> +define TZDATA_INSTALL_TARGET_CMDS
> + mkdir -p $(TARGET_DIR)/usr/share/zoneinfo
> + cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
> + cd $(TARGET_DIR)/usr/share/zoneinfo; \
> + for zone in posix/*; do \
> + ln -s "$${zone}" "$${zone##*/}"; \
> + done
> +endef
>
> Yann,
>
> Today, a co-worker applied these patches, and ran into a small problem
> during the install phase. He had made a mistake while applying the
> companion zic patch, which caused the tzdata package to stop. Then,
> after he fixed his mistake, the tzdata failed to install, because the
> 'ln -s' failed to overwrite symlinks that already exist. So I think
> that it might be good to add an 'rm -f "$${zone##*/}";' before the 'ln
> -s'. (Or at least make it an 'ln -sf', though I personally am
> distrustful of 'ln -sf' due to sometimes unexpected behavior when the
> target of the symlink is a directory.)
This is best fixed with ln -sfn. Sorry for not doing it in the first
place.
--
Richard Braun
^ permalink raw reply [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-02-26 2:02 ` Danomi Manchego
2013-02-26 7:43 ` Richard Braun
@ 2013-02-26 20:52 ` Yann E. MORIN
1 sibling, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2013-02-26 20:52 UTC (permalink / raw)
To: buildroot
Danomi, Richard, All,
On Tuesday 26 February 2013 Danomi Manchego wrote:
> +define TZDATA_INSTALL_TARGET_CMDS
> + mkdir -p $(TARGET_DIR)/usr/share/zoneinfo
> + cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo
> + cd $(TARGET_DIR)/usr/share/zoneinfo; \
> + for zone in posix/*; do \
> + ln -s "$${zone}" "$${zone##*/}"; \
> + done
> +endef
>
> Yann,
>
> Today, a co-worker applied these patches, and ran into a small problem
> during the install phase. He had made a mistake while applying the
> companion zic patch, which caused the tzdata package to stop. Then,
> after he fixed his mistake, the tzdata failed to install, because the
> 'ln -s' failed to overwrite symlinks that already exist. So I think
> that it might be good to add an 'rm -f "$${zone##*/}";' before the 'ln
> -s'. (Or at least make it an 'ln -sf', though I personally am
> distrustful of 'ln -sf' due to sometimes unexpected behavior when the
> target of the symlink is a directory.)
OK, I'll apply Richard's "ln -sfn" fix, and re-submit.
Thank you both for the feedback!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [pull request v2] Pull request for branch yem-misc
@ 2013-03-07 21:53 Yann E. MORIN
2013-03-07 21:53 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Yann E. MORIN
0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2013-03-07 21:53 UTC (permalink / raw)
To: buildroot
Hello All!
This series is a based on Richard's tzdata initial series, with some fixes
discussed during the Developper's Day.
Changes v1 -> v2:
- rebased on master
Changes since Richard's post -> v1:
- install POSIX time zones only once
- path to 'zic' is exported by the 'zic' package
The following changes since commit 203c30796e232faaf3a7de19090657bf3e7db16a:
rpi-userland: provides OpenGL ES, EGL and OpenVG (2013-03-06 22:18:39 +0100)
are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-misc
Richard Braun (2):
package/zic: new host package
package/tzdata: new package
package/Config.in | 1 +
package/tzdata/Config.in | 20 ++++++++++++++
package/tzdata/tzdata.mk | 46 ++++++++++++++++++++++++++++++++
package/zic/zic-fix-dependencies.patch | 27 ++++++++++++++++++
package/zic/zic.mk | 29 ++++++++++++++++++++
5 files changed, 123 insertions(+), 0 deletions(-)
create mode 100644 package/tzdata/Config.in
create mode 100644 package/tzdata/tzdata.mk
create mode 100644 package/zic/zic-fix-dependencies.patch
create mode 100644 package/zic/zic.mk
Regards,
Yann E. MORIN
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 17+ messages in thread* [Buildroot] [PATCH 2/2] package/tzdata: new package
2013-03-07 21:53 [Buildroot] [pull request v2] Pull request for branch yem-misc Yann E. MORIN
@ 2013-03-07 21:53 ` Yann E. MORIN
0 siblings, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2013-03-07 21:53 UTC (permalink / raw)
To: buildroot
From: Richard Braun <rbraun@sceen.net>
This is the time zone database, used by glibc for translations between
UTC and local time.
Signed-off-by: Richard Braun <rbraun@sceen.net>
[yann.morin.1998 at free.fr: use global ZIC, install posix TZ only once]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Danomi Manchego <danomimanchego123@gmail.com>
---
package/Config.in | 1 +
package/tzdata/Config.in | 20 ++++++++++++++++++++
package/tzdata/tzdata.mk | 46 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 67 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 22e64f8..f0c8960 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -569,6 +569,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..04d9b27
--- /dev/null
+++ b/package/tzdata/tzdata.mk
@@ -0,0 +1,46 @@
+#############################################################
+#
+# 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_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 \
+ $(ZIC) -d _output/posix -y yearistype.sh $$zone; \
+ $(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
+ cd $(TARGET_DIR)/usr/share/zoneinfo; \
+ for zone in posix/*; do \
+ ln -sfn "$${zone}" "$${zone##*/}"; \
+ done
+endef
+
+$(eval $(generic-package))
--
1.7.2.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-03-07 21:53 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04 11:48 [Buildroot] [PATCH] packages: add tzdata Richard Braun
2013-01-04 11:54 ` Thomas Petazzoni
2013-01-04 12:07 ` Richard Braun
2013-01-04 12:41 ` Thomas Petazzoni
2013-01-04 13:06 ` [Buildroot] [PATCH 1/2] package/zic: new host package Richard Braun
2013-01-04 13:06 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Richard Braun
2013-01-04 13:41 ` Thomas Petazzoni
2013-01-04 13:45 ` Richard Braun
2013-01-04 13:48 ` Thomas Petazzoni
2013-01-04 13:57 ` Richard Braun
2013-01-04 21:15 ` [Buildroot] [PATCH] packages: add tzdata Peter Korsgaard
2013-01-07 9:20 ` [Buildroot] [PATCH v2 2/2] package/tzdata: new package Richard Braun
-- strict thread matches above, loose matches on Subject: below --
2013-02-04 22:49 [Buildroot] [pull request] Pull request for branch yem-misc Yann E. MORIN
2013-02-04 22:49 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Yann E. MORIN
2013-02-26 2:02 ` Danomi Manchego
2013-02-26 7:43 ` Richard Braun
2013-02-26 20:52 ` Yann E. MORIN
2013-03-07 21:53 [Buildroot] [pull request v2] Pull request for branch yem-misc Yann E. MORIN
2013-03-07 21:53 ` [Buildroot] [PATCH 2/2] package/tzdata: new package Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox