diff options
Diffstat (limited to 'meta/recipes-extended/tzdata/tzdata_2016f.bb')
-rw-r--r-- | meta/recipes-extended/tzdata/tzdata_2016f.bb | 213 |
1 files changed, 213 insertions, 0 deletions
diff --git a/meta/recipes-extended/tzdata/tzdata_2016f.bb b/meta/recipes-extended/tzdata/tzdata_2016f.bb new file mode 100644 index 0000000000..a66603fff5 --- /dev/null +++ b/meta/recipes-extended/tzdata/tzdata_2016f.bb | |||
@@ -0,0 +1,213 @@ | |||
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 | UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones" | ||
11 | |||
12 | SRC_URI[tzdata.md5sum] = "b20b3c1618db1984aac685e763de001d" | ||
13 | SRC_URI[tzdata.sha256sum] = "ed8c951008d12f1db55a11e96fc055718c6571233327d9de16a7f8475e2502b0" | ||
14 | |||
15 | inherit allarch | ||
16 | |||
17 | RCONFLICTS_${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 | |||
22 | S = "${WORKDIR}" | ||
23 | |||
24 | DEFAULT_TIMEZONE ?= "Universal" | ||
25 | INSTALL_TIMEZONE_FILE ?= "1" | ||
26 | |||
27 | TZONES= "africa antarctica asia australasia europe northamerica southamerica \ | ||
28 | factory etcetera backward systemv \ | ||
29 | " | ||
30 | # pacificnew | ||
31 | |||
32 | do_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 | |||
43 | do_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 | |||
65 | pkg_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 | |||
92 | PACKAGES = "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 | |||
96 | FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*" | ||
97 | RPROVIDES_tzdata-africa = "tzdata-africa" | ||
98 | |||
99 | FILES_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/*" | ||
105 | RPROVIDES_tzdata-americas = "tzdata-americas" | ||
106 | |||
107 | FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*" | ||
108 | RPROVIDES_tzdata-antarctica = "tzdata-antarctica" | ||
109 | |||
110 | FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*" | ||
111 | RPROVIDES_tzdata-arctic = "tzdata-arctic" | ||
112 | |||
113 | FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \ | ||
114 | ${datadir}/zoneinfo/Indian/* \ | ||
115 | ${datadir}/zoneinfo/Mideast/*" | ||
116 | RPROVIDES_tzdata-asia = "tzdata-asia" | ||
117 | |||
118 | FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*" | ||
119 | RPROVIDES_tzdata-atlantic = "tzdata-atlantic" | ||
120 | |||
121 | FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*" | ||
122 | RPROVIDES_tzdata-australia = "tzdata-australia" | ||
123 | |||
124 | FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*" | ||
125 | RPROVIDES_tzdata-europe = "tzdata-europe" | ||
126 | |||
127 | FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*" | ||
128 | RPROVIDES_tzdata-pacific = "tzdata-pacific" | ||
129 | |||
130 | FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*" | ||
131 | RPROVIDES_tzdata-posix = "tzdata-posix" | ||
132 | |||
133 | FILES_tzdata-right += "${datadir}/zoneinfo/right/*" | ||
134 | RPROVIDES_tzdata-right = "tzdata-right" | ||
135 | |||
136 | |||
137 | FILES_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" | ||
155 | RPROVIDES_tzdata-misc = "tzdata-misc" | ||
156 | |||
157 | |||
158 | FILES_${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 | |||
212 | CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE', True)) else "" }" | ||
213 | CONFFILES_${PN} += "${sysconfdir}/localtime" | ||