tzdata: make it possible to set default timezone
authorJeremy Lainé <jeremy.laine@m4x.org>
Wed, 21 Jan 2009 16:04:44 +0000 (17:04 +0100)
committerJeremy Lainé <jeremy.laine@m4x.org>
Wed, 21 Jan 2009 16:04:44 +0000 (17:04 +0100)
* make it possible to choose the default timezone by
  setting the DEFAULT_TIMEZONE variable

packages/tzdata/tzdata_2007k.bb

index 75c9f34..b1d7d39 100644 (file)
@@ -3,7 +3,9 @@ SECTION = "base"
 PRIORITY = "optional"
 DEPENDS = "tzcode-native"
 
-PR = "r3.01"
+PR = "r4"
+
+DEFAULT_TIMEZONE ?= "Europe/London"
 
 RCONFLICTS= "timezones timezone-africa timezone-america timezone-antarctica \
              timezone-arctic timezone-asia timezone-atlantic \
@@ -38,8 +40,8 @@ do_install () {
 
         # Install a sane default for timezones
         install -d ${D}${sysconfdir}
-        echo "Europe/London" > ${D}${sysconfdir}/timezone
-        cp -pPR ${S}/usr/share/zoneinfo/Europe/London ${D}${sysconfdir}/localtime
+        echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+        cp -pPR ${S}/usr/share/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
 }
 
 # Packages primarily organized by directory with a major city