summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/tzdata/tzdata_2017a.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/tzdata/tzdata_2017a.bb')
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2017a.bb213
1 files changed, 213 insertions, 0 deletions
diff --git a/meta/recipes-extended/tzdata/tzdata_2017a.bb b/meta/recipes-extended/tzdata/tzdata_2017a.bb
new file mode 100644
index 0000000000..1a37c274f8
--- /dev/null
+++ b/meta/recipes-extended/tzdata/tzdata_2017a.bb
@@ -0,0 +1,213 @@
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"
10UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
11
12SRC_URI[tzdata.md5sum] = "cb8274cd175f8a4d9d1b89895df876dc"
13SRC_URI[tzdata.sha256sum] = "df3a5c4d0a2cf0cde0b3f35796ccf6c9acfd598b8e70f8dece5404cd7626bbd6"
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}/iso3166.tab" ${D}${datadir}/zoneinfo
49
50 # Install default timezone
51 if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
52 install -d ${D}${sysconfdir}
53 if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
54 echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
55 fi
56 ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
57 else
58 bberror "DEFAULT_TIMEZONE is set to an invalid value."
59 exit 1
60 fi
61
62 chown -R root:root ${D}
63}
64
65pkg_postinst_${PN} () {
66 etc_lt="$D${sysconfdir}/localtime"
67 src="$D${sysconfdir}/timezone"
68
69 if [ -e ${src} ] ; then
70 tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
71 fi
72
73 if [ -z "${tz}" ] ; then
74 exit 0
75 fi
76
77 if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
78 echo "You have an invalid TIMEZONE setting in ${src}"
79 echo "Your ${etc_lt} has been reset to Universal; enjoy!"
80 tz="Universal"
81 echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
82 if [ -L ${etc_lt} ] ; then
83 rm -f "${etc_lt}"
84 fi
85 ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
86 fi
87}
88
89# Packages primarily organized by directory with a major city
90# in most time zones in the base package
91
92PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
93 tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
94 tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
95
96FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
97RPROVIDES_tzdata-africa = "tzdata-africa"
98
99FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
100 ${datadir}/zoneinfo/US/* \
101 ${datadir}/zoneinfo/Brazil/* \
102 ${datadir}/zoneinfo/Canada/* \
103 ${datadir}/zoneinfo/Mexico/* \
104 ${datadir}/zoneinfo/Chile/*"
105RPROVIDES_tzdata-americas = "tzdata-americas"
106
107FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
108RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
109
110FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
111RPROVIDES_tzdata-arctic = "tzdata-arctic"
112
113FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
114 ${datadir}/zoneinfo/Indian/* \
115 ${datadir}/zoneinfo/Mideast/*"
116RPROVIDES_tzdata-asia = "tzdata-asia"
117
118FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
119RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
120
121FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
122RPROVIDES_tzdata-australia = "tzdata-australia"
123
124FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
125RPROVIDES_tzdata-europe = "tzdata-europe"
126
127FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
128RPROVIDES_tzdata-pacific = "tzdata-pacific"
129
130FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
131RPROVIDES_tzdata-posix = "tzdata-posix"
132
133FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
134RPROVIDES_tzdata-right = "tzdata-right"
135
136
137FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
138 ${datadir}/zoneinfo/Egypt \
139 ${datadir}/zoneinfo/Eire \
140 ${datadir}/zoneinfo/Factory \
141 ${datadir}/zoneinfo/GB-Eire \
142 ${datadir}/zoneinfo/Hongkong \
143 ${datadir}/zoneinfo/Iceland \
144 ${datadir}/zoneinfo/Iran \
145 ${datadir}/zoneinfo/Israel \
146 ${datadir}/zoneinfo/Jamaica \
147 ${datadir}/zoneinfo/Japan \
148 ${datadir}/zoneinfo/Kwajalein \
149 ${datadir}/zoneinfo/Libya \
150 ${datadir}/zoneinfo/Navajo \
151 ${datadir}/zoneinfo/Poland \
152 ${datadir}/zoneinfo/Portugal \
153 ${datadir}/zoneinfo/Singapore \
154 ${datadir}/zoneinfo/Turkey"
155RPROVIDES_tzdata-misc = "tzdata-misc"
156
157
158FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
159 ${datadir}/zoneinfo/America/Anchorage \
160 ${datadir}/zoneinfo/America/Los_Angeles \
161 ${datadir}/zoneinfo/America/Denver \
162 ${datadir}/zoneinfo/America/Chicago \
163 ${datadir}/zoneinfo/America/New_York \
164 ${datadir}/zoneinfo/America/Caracas \
165 ${datadir}/zoneinfo/America/Sao_Paulo \
166 ${datadir}/zoneinfo/Europe/London \
167 ${datadir}/zoneinfo/Europe/Paris \
168 ${datadir}/zoneinfo/Africa/Cairo \
169 ${datadir}/zoneinfo/Europe/Moscow \
170 ${datadir}/zoneinfo/Asia/Dubai \
171 ${datadir}/zoneinfo/Asia/Karachi \
172 ${datadir}/zoneinfo/Asia/Dhaka \
173 ${datadir}/zoneinfo/Asia/Bankok \
174 ${datadir}/zoneinfo/Asia/Hong_Kong \
175 ${datadir}/zoneinfo/Asia/Tokyo \
176 ${datadir}/zoneinfo/Australia/Darwin \
177 ${datadir}/zoneinfo/Australia/Adelaide \
178 ${datadir}/zoneinfo/Australia/Brisbane \
179 ${datadir}/zoneinfo/Australia/Sydney \
180 ${datadir}/zoneinfo/Pacific/Noumea \
181 ${datadir}/zoneinfo/CET \
182 ${datadir}/zoneinfo/CST6CDT \
183 ${datadir}/zoneinfo/EET \
184 ${datadir}/zoneinfo/EST \
185 ${datadir}/zoneinfo/EST5EDT \
186 ${datadir}/zoneinfo/GB \
187 ${datadir}/zoneinfo/GMT \
188 ${datadir}/zoneinfo/GMT+0 \
189 ${datadir}/zoneinfo/GMT-0 \
190 ${datadir}/zoneinfo/GMT0 \
191 ${datadir}/zoneinfo/Greenwich \
192 ${datadir}/zoneinfo/HST \
193 ${datadir}/zoneinfo/MET \
194 ${datadir}/zoneinfo/MST \
195 ${datadir}/zoneinfo/MST7MDT \
196 ${datadir}/zoneinfo/NZ \
197 ${datadir}/zoneinfo/NZ-CHAT \
198 ${datadir}/zoneinfo/PRC \
199 ${datadir}/zoneinfo/PST8PDT \
200 ${datadir}/zoneinfo/ROC \
201 ${datadir}/zoneinfo/ROK \
202 ${datadir}/zoneinfo/UCT \
203 ${datadir}/zoneinfo/UTC \
204 ${datadir}/zoneinfo/Universal \
205 ${datadir}/zoneinfo/W-SU \
206 ${datadir}/zoneinfo/WET \
207 ${datadir}/zoneinfo/Zulu \
208 ${datadir}/zoneinfo/zone.tab \
209 ${datadir}/zoneinfo/iso3166.tab \
210 ${datadir}/zoneinfo/Etc/*"
211
212CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE')) else "" }"
213CONFFILES_${PN} += "${sysconfdir}/localtime"