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