[oe] [PATCH] tzdata-uclibc: add recipe for uclibc timezone database

Roman I Khimov khimov at altell.ru
Fri Jul 2 14:57:33 UTC 2010


Recent TZif2 file format contains TZ-like ASCII string at the end that is
easily extractable and usable with uclibc setup, so this recipe does exactly
that based on standard tzdata.

Signed-off-by: Roman I Khimov <khimov at altell.ru>
---
 recipes/tzdata/tzdata-uclibc_2010j.bb |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 recipes/tzdata/tzdata-uclibc_2010j.bb

diff --git a/recipes/tzdata/tzdata-uclibc_2010j.bb b/recipes/tzdata/tzdata-uclibc_2010j.bb
new file mode 100644
index 0000000..9d0de5d
--- /dev/null
+++ b/recipes/tzdata/tzdata-uclibc_2010j.bb
@@ -0,0 +1,16 @@
+require tzdata_${PV}.bb
+
+do_install_append () {
+	rm -f ${D}${sysconfdir}/localtime
+	rm -f ${D}${sysconfdir}/timezone
+	for i in `find ${D}${datadir}/zoneinfo -type f`; do
+		tail -n 1 $i > temp-zone
+		# Avoid useless NULL files
+		if [ "`cat temp-zone`" != "" ]; then
+			mv temp-zone $i
+		fi
+	done
+	cp -pPR ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/TZ
+}
+
+CONFFILES_${PN} = "${sysconfdir}/TZ"
\ No newline at end of file
-- 
1.5.6.5





More information about the Openembedded-devel mailing list