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