diff options
Diffstat (limited to 'meta/recipes-extended/tzdata/tzdata_2016b.bb')
-rw-r--r-- | meta/recipes-extended/tzdata/tzdata_2016b.bb | 212 |
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 @@ | |||
1 | SUMMARY = "Timezone data" | ||
2 | HOMEPAGE = "http://www.iana.org/time-zones" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "PD & BSD & BSD-3-Clause" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2" | ||
6 | |||
7 | DEPENDS = "tzcode-native" | ||
8 | |||
9 | SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata" | ||
10 | |||
11 | SRC_URI[tzdata.md5sum] = "f638ec0d4d7a17f001ce475860255c85" | ||
12 | SRC_URI[tzdata.sha256sum] = "6392091d92556a32de488ea06a055c51bc46b7d8046c8a677f0ccfe286b3dbdc" | ||
13 | |||
14 | inherit allarch | ||
15 | |||
16 | RCONFLICTS_${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 | |||
21 | S = "${WORKDIR}" | ||
22 | |||
23 | DEFAULT_TIMEZONE ?= "Universal" | ||
24 | INSTALL_TIMEZONE_FILE ?= "1" | ||
25 | |||
26 | TZONES= "africa antarctica asia australasia europe northamerica southamerica \ | ||
27 | factory etcetera backward systemv \ | ||
28 | " | ||
29 | # pacificnew | ||
30 | |||
31 | do_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 | |||
42 | do_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 | |||
64 | pkg_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 | |||
91 | PACKAGES = "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 | |||
95 | FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*" | ||
96 | RPROVIDES_tzdata-africa = "tzdata-africa" | ||
97 | |||
98 | FILES_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/*" | ||
104 | RPROVIDES_tzdata-americas = "tzdata-americas" | ||
105 | |||
106 | FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*" | ||
107 | RPROVIDES_tzdata-antarctica = "tzdata-antarctica" | ||
108 | |||
109 | FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*" | ||
110 | RPROVIDES_tzdata-arctic = "tzdata-arctic" | ||
111 | |||
112 | FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \ | ||
113 | ${datadir}/zoneinfo/Indian/* \ | ||
114 | ${datadir}/zoneinfo/Mideast/*" | ||
115 | RPROVIDES_tzdata-asia = "tzdata-asia" | ||
116 | |||
117 | FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*" | ||
118 | RPROVIDES_tzdata-atlantic = "tzdata-atlantic" | ||
119 | |||
120 | FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*" | ||
121 | RPROVIDES_tzdata-australia = "tzdata-australia" | ||
122 | |||
123 | FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*" | ||
124 | RPROVIDES_tzdata-europe = "tzdata-europe" | ||
125 | |||
126 | FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*" | ||
127 | RPROVIDES_tzdata-pacific = "tzdata-pacific" | ||
128 | |||
129 | FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*" | ||
130 | RPROVIDES_tzdata-posix = "tzdata-posix" | ||
131 | |||
132 | FILES_tzdata-right += "${datadir}/zoneinfo/right/*" | ||
133 | RPROVIDES_tzdata-right = "tzdata-right" | ||
134 | |||
135 | |||
136 | FILES_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" | ||
154 | RPROVIDES_tzdata-misc = "tzdata-misc" | ||
155 | |||
156 | |||
157 | FILES_${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 | |||
211 | CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE', True)) else "" }" | ||
212 | CONFFILES_${PN} += "${sysconfdir}/localtime" | ||