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