summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/tzdata/tzdata_2012b.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/tzdata/tzdata_2012b.bb')
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2012b.bb222
1 files changed, 222 insertions, 0 deletions
diff --git a/meta/recipes-extended/tzdata/tzdata_2012b.bb b/meta/recipes-extended/tzdata/tzdata_2012b.bb
new file mode 100644
index 0000000..7cb1c23
--- /dev/null
+++ b/meta/recipes-extended/tzdata/tzdata_2012b.bb
@@ -0,0 +1,222 @@
1DESCRIPTION = "Timezone data"
2HOMEPAGE = "ftp://elsie.nci.nih.gov/pub/"
3SECTION = "base"
4LICENSE = "PD"
5LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=06468c0e84ef4d4c97045a4a29b08234"
6DEPENDS = "tzcode-native"
7
8PR = "r0"
9
10RCONFLICTS= "timezones timezone-africa timezone-america timezone-antarctica \
11 timezone-arctic timezone-asia timezone-atlantic \
12 timezone-australia timezone-europe timezone-indian \
13 timezone-iso3166.tab timezone-pacific timezone-zone.tab"
14
15SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
16
17SRC_URI[tzdata.md5sum] = "0615fd29def380a917e528433c820368"
18SRC_URI[tzdata.sha256sum] = "2f9f8e2d1ae087be5917f60c3946e8dc3fe1068d7738c3395f2125135309e745"
19
20S = "${WORKDIR}"
21
22DEFAULT_TIMEZONE ?= "Universal"
23
24TZONES= "africa antarctica asia australasia europe northamerica southamerica \
25 factory solar87 solar88 solar89 etcetera backward systemv \
26 "
27# pacificnew
28
29do_compile () {
30 for zone in ${TZONES}; do \
31 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
32 -y ${S}/yearistype.sh ${S}/${zone} ; \
33 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
34 -y ${S}/yearistype.sh ${S}/${zone} ; \
35 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
36 -y ${S}/yearistype.sh ${S}/${zone} ; \
37 done
38}
39
40do_install () {
41 install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
42 cp -pPR ${S}/$exec_prefix ${D}/
43 # libc is removing zoneinfo files from package
44 cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
45 cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
46
47 # Install default timezone
48 install -d ${D}${sysconfdir}
49 echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
50
51 chown -R root:root ${D}
52}
53
54pkg_postinst_${PN} () {
55
56# code taken from Gentoo's tzdata ebuild
57
58 etc_lt="$D${sysconfdir}/localtime"
59 src="$D${sysconfdir}/timezone"
60
61 if [ -e ${src} ] ; then
62 tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
63 else
64 tz="FUBAR"
65 fi
66
67 if [ -z ${tz} ] ; then
68 return 0
69 fi
70
71 if [ ${tz} = "FUBAR" ] ; then
72 echo "You do not have TIMEZONE set in ${src}."
73
74 if [ ! -e ${etc_lt} ] ; then
75 # if /etc/localtime is a symlink somewhere, assume they
76 # know what they're doing and they're managing it themselves
77 if [ ! -L ${etc_lt} ] ; then
78 cp -f "$D${datadir}/zoneinfo/Universal" "${etc_lt}"
79 echo "Setting ${etc_lt} to Universal."
80 else
81 echo "Assuming your ${etc_lt} symlink is what you want; skipping update."
82 fi
83 else
84 echo "Skipping auto-update of ${etc_lt}."
85 fi
86 return 0
87 fi
88
89 if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
90 echo "You have an invalid TIMEZONE setting in ${src}"
91 echo "Your ${etc_lt} has been reset to Universal; enjoy!"
92 tz="Universal"
93 fi
94 echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
95 if [ -L ${etc_lt} ] ; then
96 rm -f "${etc_lt}"
97 fi
98 cp -f "$D${datadir}/zoneinfo/${tz}" "${etc_lt}"
99}
100
101# Packages primarily organized by directory with a major city
102# in most time zones in the base package
103
104PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
105 tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
106 tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
107
108FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
109RPROVIDES_tzdata-africa = "tzdata-africa"
110
111FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
112 ${datadir}/zoneinfo/US/* \
113 ${datadir}/zoneinfo/Brazil/* \
114 ${datadir}/zoneinfo/Canada/* \
115 ${datadir}/zoneinfo/Mexico/* \
116 ${datadir}/zoneinfo/Chile/*"
117RPROVIDES_tzdata-americas = "tzdata-americas"
118
119FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
120RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
121
122FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
123RPROVIDES_tzdata-arctic = "tzdata-arctic"
124
125FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
126 ${datadir}/zoneinfo/Indian/* \
127 ${datadir}/zoneinfo/Mideast/*"
128RPROVIDES_tzdata-asia = "tzdata-asia"
129
130FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
131RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
132
133FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
134RPROVIDES_tzdata-australia = "tzdata-australia"
135
136FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
137RPROVIDES_tzdata-europe = "tzdata-europe"
138
139FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
140RPROVIDES_tzdata-pacific = "tzdata-pacific"
141
142FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
143RPROVIDES_tzdata-posix = "tzdata-posix"
144
145FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
146RPROVIDES_tzdata-right = "tzdata-right"
147
148
149FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
150 ${datadir}/zoneinfo/Egypt \
151 ${datadir}/zoneinfo/Eire \
152 ${datadir}/zoneinfo/Factory \
153 ${datadir}/zoneinfo/GB-Eire \
154 ${datadir}/zoneinfo/Hongkong \
155 ${datadir}/zoneinfo/Iceland \
156 ${datadir}/zoneinfo/Iran \
157 ${datadir}/zoneinfo/Israel \
158 ${datadir}/zoneinfo/Jamaica \
159 ${datadir}/zoneinfo/Japan \
160 ${datadir}/zoneinfo/Kwajalein \
161 ${datadir}/zoneinfo/Libya \
162 ${datadir}/zoneinfo/Navajo \
163 ${datadir}/zoneinfo/Poland \
164 ${datadir}/zoneinfo/Portugal \
165 ${datadir}/zoneinfo/Singapore \
166 ${datadir}/zoneinfo/Turkey"
167RPROVIDES_tzdata-misc = "tzdata-misc"
168
169
170FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
171 ${datadir}/zoneinfo/America/Anchorage \
172 ${datadir}/zoneinfo/America/Los_Angeles \
173 ${datadir}/zoneinfo/America/Denver \
174 ${datadir}/zoneinfo/America/Chicago \
175 ${datadir}/zoneinfo/America/New_York \
176 ${datadir}/zoneinfo/America/Caracas \
177 ${datadir}/zoneinfo/America/Sao_Paulo \
178 ${datadir}/zoneinfo/Europe/London \
179 ${datadir}/zoneinfo/Europe/Paris \
180 ${datadir}/zoneinfo/Africa/Cairo \
181 ${datadir}/zoneinfo/Europe/Moscow \
182 ${datadir}/zoneinfo/Asia/Dubai \
183 ${datadir}/zoneinfo/Asia/Karachi \
184 ${datadir}/zoneinfo/Asia/Dhaka \
185 ${datadir}/zoneinfo/Asia/Bankok \
186 ${datadir}/zoneinfo/Asia/Hong_Kong \
187 ${datadir}/zoneinfo/Asia/Tokyo \
188 ${datadir}/zoneinfo/Australia/Darwin \
189 ${datadir}/zoneinfo/Australia/Adelaide \
190 ${datadir}/zoneinfo/Australia/Brisbane \
191 ${datadir}/zoneinfo/Australia/Sydney \
192 ${datadir}/zoneinfo/Pacific/Noumea \
193 ${datadir}/zoneinfo/CET \
194 ${datadir}/zoneinfo/CST6CDT \
195 ${datadir}/zoneinfo/EET \
196 ${datadir}/zoneinfo/EST \
197 ${datadir}/zoneinfo/EST5EDT \
198 ${datadir}/zoneinfo/GB \
199 ${datadir}/zoneinfo/GMT \
200 ${datadir}/zoneinfo/GMT+0 \
201 ${datadir}/zoneinfo/GMT-0 \
202 ${datadir}/zoneinfo/GMT0 \
203 ${datadir}/zoneinfo/Greenwich \
204 ${datadir}/zoneinfo/HST \
205 ${datadir}/zoneinfo/MET \
206 ${datadir}/zoneinfo/MST \
207 ${datadir}/zoneinfo/MST7MDT \
208 ${datadir}/zoneinfo/NZ \
209 ${datadir}/zoneinfo/NZ-CHAT \
210 ${datadir}/zoneinfo/PRC \
211 ${datadir}/zoneinfo/PST8PDT \
212 ${datadir}/zoneinfo/ROC \
213 ${datadir}/zoneinfo/ROK \
214 ${datadir}/zoneinfo/UCT \
215 ${datadir}/zoneinfo/UTC \
216 ${datadir}/zoneinfo/Universal \
217 ${datadir}/zoneinfo/W-SU \
218 ${datadir}/zoneinfo/WET \
219 ${datadir}/zoneinfo/Zulu \
220 ${datadir}/zoneinfo/zone.tab \
221 ${datadir}/zoneinfo/iso3166.tab \
222 ${datadir}/zoneinfo/Etc/*"