summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2021-12-15 16:20:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-20 15:29:01 +0000
commit6b70ea0443567ee358031343d2748979bdc14148 (patch)
tree436876ad726ab8ebd097480681c3c487fc6faeda /meta/recipes-extended
parent3550d29e9e85fedd53e6a3ed0744dc0f1384e35d (diff)
downloadpoky-6b70ea0443567ee358031343d2748979bdc14148.tar.gz
tzdata: Clean up
* Whitespace and indentation clean up. * Change shell variables from "${foo}" to "$foo". * Remove "/*" from directories specified in FILES. * Move RCONFLICTS:${PN} to the end of the recipe. (From OE-Core rev: a698cc12ac2d5b26b2415e3d14739d3f51b89dd1) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/timezone/tzdata.bb305
1 files changed, 156 insertions, 149 deletions
diff --git a/meta/recipes-extended/timezone/tzdata.bb b/meta/recipes-extended/timezone/tzdata.bb
index 64135ef8aa..cc1caff124 100644
--- a/meta/recipes-extended/timezone/tzdata.bb
+++ b/meta/recipes-extended/timezone/tzdata.bb
@@ -4,199 +4,206 @@ DEPENDS = "tzcode-native"
4 4
5inherit allarch 5inherit allarch
6 6
7RCONFLICTS:${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
8 timezone-arctic timezone-asia timezone-atlantic \
9 timezone-australia timezone-europe timezone-indian \
10 timezone-iso3166.tab timezone-pacific timezone-zone.tab"
11
12S = "${WORKDIR}" 7S = "${WORKDIR}"
13 8
14DEFAULT_TIMEZONE ?= "Universal" 9DEFAULT_TIMEZONE ?= "Universal"
15INSTALL_TIMEZONE_FILE ?= "1" 10INSTALL_TIMEZONE_FILE ?= "1"
16 11
17TZONES= "africa antarctica asia australasia europe northamerica southamerica \ 12TZONES = " \
18 factory etcetera backward \ 13 africa antarctica asia australasia europe northamerica southamerica \
19 " 14 factory etcetera backward \
20# pacificnew 15"
16# pacificnew
21 17
22# "slim" is the default since 2020b 18# "slim" is the default since 2020b
23# "fat" is needed by e.g. MariaDB's mysql_tzinfo_to_sql 19# "fat" is needed by e.g. MariaDB's mysql_tzinfo_to_sql
24ZIC_FMT ?= "slim" 20ZIC_FMT ?= "slim"
25 21
26do_compile () { 22do_compile() {
27 for zone in ${TZONES}; do \ 23 for zone in ${TZONES}; do
28 ${STAGING_BINDIR_NATIVE}/zic -b ${ZIC_FMT} -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \ 24 ${STAGING_BINDIR_NATIVE}/zic -b ${ZIC_FMT} -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null ${S}/${zone}
29 ${S}/${zone} ; \ 25 ${STAGING_BINDIR_NATIVE}/zic -b ${ZIC_FMT} -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null ${S}/${zone}
30 ${STAGING_BINDIR_NATIVE}/zic -b ${ZIC_FMT} -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \ 26 ${STAGING_BINDIR_NATIVE}/zic -b ${ZIC_FMT} -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds ${S}/${zone}
31 ${S}/${zone} ; \ 27 done
32 ${STAGING_BINDIR_NATIVE}/zic -b ${ZIC_FMT} -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
33 ${S}/${zone} ; \
34 done
35} 28}
36 29
37do_install () { 30do_install() {
38 install -d ${D}$exec_prefix ${D}${datadir}/zoneinfo 31 install -d ${D}$exec_prefix ${D}${datadir}/zoneinfo
39 cp -pPR ${WORKDIR}$exec_prefix ${D}${base_prefix} 32 cp -pPR ${WORKDIR}$exec_prefix ${D}${base_prefix}
40 # libc is removing zoneinfo files from package 33 # libc is removing zoneinfo files from package
41 cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo 34 cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
42 cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo 35 cp -pP "${S}/zone1970.tab" ${D}${datadir}/zoneinfo
43 cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo 36 cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
44 cp -pP "${S}/leapseconds" ${D}${datadir}/zoneinfo 37 cp -pP "${S}/leapseconds" ${D}${datadir}/zoneinfo
45 cp -pP "${S}/leap-seconds.list" ${D}${datadir}/zoneinfo 38 cp -pP "${S}/leap-seconds.list" ${D}${datadir}/zoneinfo
46 39
47 # Install default timezone 40 # Install default timezone
48 if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then 41 if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
49 install -d ${D}${sysconfdir} 42 install -d ${D}${sysconfdir}
50 if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then 43 if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
51 echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone 44 echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
52 fi 45 fi
53 ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime 46 ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
54 else 47 else
55 bberror "DEFAULT_TIMEZONE is set to an invalid value." 48 bberror "DEFAULT_TIMEZONE is set to an invalid value."
56 exit 1 49 exit 1
57 fi 50 fi
58 51
59 chown -R root:root ${D} 52 chown -R root:root ${D}
60} 53}
61 54
62pkg_postinst:${PN} () { 55pkg_postinst:${PN}() {
63 etc_lt="$D${sysconfdir}/localtime" 56 etc_lt="$D${sysconfdir}/localtime"
64 src="$D${sysconfdir}/timezone" 57 src="$D${sysconfdir}/timezone"
65 58
66 if [ -e ${src} ] ; then 59 if [ -e "$src" ]; then
67 tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") 60 tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "$src")
68 fi 61 fi
69 62
70 if [ ! -z "${tz}" -a ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then 63 if [ ! -z "$tz" -a ! -e "$D${datadir}/zoneinfo/$tz" ]; then
71 echo "You have an invalid TIMEZONE setting in ${src}" 64 echo "You have an invalid TIMEZONE setting in $src"
72 echo "Your ${etc_lt} has been reset to Universal; enjoy!" 65 echo "Your $etc_lt has been reset to Universal; enjoy!"
73 tz="Universal" 66 tz="Universal"
74 echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}" 67 echo "Updating $etc_lt with $D${datadir}/zoneinfo/$tz"
75 if [ -L ${etc_lt} ] ; then 68 if [ -L "$etc_lt" ]; then
76 rm -f "${etc_lt}" 69 rm -f "$etc_lt"
77 fi 70 fi
78 ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}" 71 ln -s "${datadir}/zoneinfo/$tz" "$etc_lt"
79 fi 72 fi
80} 73}
81 74
82# Packages primarily organized by directory with a major city 75# Packages are primarily organized by directory with a major city in most time
83# in most time zones in the base package 76# zones in the base package
84
85TZ_PACKAGES = " \ 77TZ_PACKAGES = " \
86 tzdata-core tzdata-misc tzdata-posix tzdata-right tzdata-africa \ 78 tzdata-core tzdata-misc tzdata-posix tzdata-right tzdata-africa \
87 tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \ 79 tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
88 tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific" 80 tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \
81"
89PACKAGES = "${TZ_PACKAGES} ${PN}" 82PACKAGES = "${TZ_PACKAGES} ${PN}"
90 83
91FILES:tzdata-africa += "${datadir}/zoneinfo/Africa/*" 84FILES:tzdata-africa += "${datadir}/zoneinfo/Africa"
92 85
93FILES:tzdata-americas += "${datadir}/zoneinfo/America/* \ 86FILES:tzdata-americas += " \
94 ${datadir}/zoneinfo/US/* \ 87 ${datadir}/zoneinfo/America \
95 ${datadir}/zoneinfo/Brazil/* \ 88 ${datadir}/zoneinfo/US \
96 ${datadir}/zoneinfo/Canada/* \ 89 ${datadir}/zoneinfo/Brazil \
97 ${datadir}/zoneinfo/Mexico/* \ 90 ${datadir}/zoneinfo/Canada \
98 ${datadir}/zoneinfo/Chile/*" 91 ${datadir}/zoneinfo/Mexico \
92 ${datadir}/zoneinfo/Chile \
93"
99 94
100FILES:tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*" 95FILES:tzdata-antarctica += "${datadir}/zoneinfo/Antarctica"
101 96
102FILES:tzdata-arctic += "${datadir}/zoneinfo/Arctic/*" 97FILES:tzdata-arctic += "${datadir}/zoneinfo/Arctic"
103 98
104FILES:tzdata-asia += "${datadir}/zoneinfo/Asia/* \ 99FILES:tzdata-asia += " \
105 ${datadir}/zoneinfo/Indian/* \ 100 ${datadir}/zoneinfo/Asia \
106 ${datadir}/zoneinfo/Mideast/*" 101 ${datadir}/zoneinfo/Indian \
102 ${datadir}/zoneinfo/Mideast \
103"
107 104
108FILES:tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*" 105FILES:tzdata-atlantic += "${datadir}/zoneinfo/Atlantic"
109 106
110FILES:tzdata-australia += "${datadir}/zoneinfo/Australia/*" 107FILES:tzdata-australia += "${datadir}/zoneinfo/Australia"
111 108
112FILES:tzdata-europe += "${datadir}/zoneinfo/Europe/*" 109FILES:tzdata-europe += "${datadir}/zoneinfo/Europe"
113 110
114FILES:tzdata-pacific += "${datadir}/zoneinfo/Pacific/*" 111FILES:tzdata-pacific += "${datadir}/zoneinfo/Pacific"
115 112
116FILES:tzdata-posix += "${datadir}/zoneinfo/posix/*" 113FILES:tzdata-posix += "${datadir}/zoneinfo/posix"
117 114
118FILES:tzdata-right += "${datadir}/zoneinfo/right/*" 115FILES:tzdata-right += "${datadir}/zoneinfo/right"
119 116
120FILES:tzdata-misc += "${datadir}/zoneinfo/Cuba \ 117FILES:tzdata-misc += " \
121 ${datadir}/zoneinfo/Egypt \ 118 ${datadir}/zoneinfo/Cuba \
122 ${datadir}/zoneinfo/Eire \ 119 ${datadir}/zoneinfo/Egypt \
123 ${datadir}/zoneinfo/Factory \ 120 ${datadir}/zoneinfo/Eire \
124 ${datadir}/zoneinfo/GB-Eire \ 121 ${datadir}/zoneinfo/Factory \
125 ${datadir}/zoneinfo/Hongkong \ 122 ${datadir}/zoneinfo/GB-Eire \
126 ${datadir}/zoneinfo/Iceland \ 123 ${datadir}/zoneinfo/Hongkong \
127 ${datadir}/zoneinfo/Iran \ 124 ${datadir}/zoneinfo/Iceland \
128 ${datadir}/zoneinfo/Israel \ 125 ${datadir}/zoneinfo/Iran \
129 ${datadir}/zoneinfo/Jamaica \ 126 ${datadir}/zoneinfo/Israel \
130 ${datadir}/zoneinfo/Japan \ 127 ${datadir}/zoneinfo/Jamaica \
131 ${datadir}/zoneinfo/Kwajalein \ 128 ${datadir}/zoneinfo/Japan \
132 ${datadir}/zoneinfo/Libya \ 129 ${datadir}/zoneinfo/Kwajalein \
133 ${datadir}/zoneinfo/Navajo \ 130 ${datadir}/zoneinfo/Libya \
134 ${datadir}/zoneinfo/Poland \ 131 ${datadir}/zoneinfo/Navajo \
135 ${datadir}/zoneinfo/Portugal \ 132 ${datadir}/zoneinfo/Poland \
136 ${datadir}/zoneinfo/Singapore \ 133 ${datadir}/zoneinfo/Portugal \
137 ${datadir}/zoneinfo/Turkey" 134 ${datadir}/zoneinfo/Singapore \
135 ${datadir}/zoneinfo/Turkey \
136"
138 137
139FILES:tzdata-core += " \ 138FILES:tzdata-core += " \
140 ${sysconfdir}/localtime \ 139 ${sysconfdir}/localtime \
141 ${sysconfdir}/timezone \ 140 ${sysconfdir}/timezone \
142 ${datadir}/zoneinfo/leapseconds \ 141 ${datadir}/zoneinfo/leapseconds \
143 ${datadir}/zoneinfo/leap-seconds.list \ 142 ${datadir}/zoneinfo/leap-seconds.list \
144 ${datadir}/zoneinfo/Pacific/Honolulu \ 143 ${datadir}/zoneinfo/Pacific/Honolulu \
145 ${datadir}/zoneinfo/America/Anchorage \ 144 ${datadir}/zoneinfo/America/Anchorage \
146 ${datadir}/zoneinfo/America/Los_Angeles \ 145 ${datadir}/zoneinfo/America/Los_Angeles \
147 ${datadir}/zoneinfo/America/Denver \ 146 ${datadir}/zoneinfo/America/Denver \
148 ${datadir}/zoneinfo/America/Chicago \ 147 ${datadir}/zoneinfo/America/Chicago \
149 ${datadir}/zoneinfo/America/New_York \ 148 ${datadir}/zoneinfo/America/New_York \
150 ${datadir}/zoneinfo/America/Caracas \ 149 ${datadir}/zoneinfo/America/Caracas \
151 ${datadir}/zoneinfo/America/Sao_Paulo \ 150 ${datadir}/zoneinfo/America/Sao_Paulo \
152 ${datadir}/zoneinfo/Europe/London \ 151 ${datadir}/zoneinfo/Europe/London \
153 ${datadir}/zoneinfo/Europe/Paris \ 152 ${datadir}/zoneinfo/Europe/Paris \
154 ${datadir}/zoneinfo/Africa/Cairo \ 153 ${datadir}/zoneinfo/Africa/Cairo \
155 ${datadir}/zoneinfo/Europe/Moscow \ 154 ${datadir}/zoneinfo/Europe/Moscow \
156 ${datadir}/zoneinfo/Asia/Dubai \ 155 ${datadir}/zoneinfo/Asia/Dubai \
157 ${datadir}/zoneinfo/Asia/Karachi \ 156 ${datadir}/zoneinfo/Asia/Karachi \
158 ${datadir}/zoneinfo/Asia/Dhaka \ 157 ${datadir}/zoneinfo/Asia/Dhaka \
159 ${datadir}/zoneinfo/Asia/Bangkok \ 158 ${datadir}/zoneinfo/Asia/Bangkok \
160 ${datadir}/zoneinfo/Asia/Hong_Kong \ 159 ${datadir}/zoneinfo/Asia/Hong_Kong \
161 ${datadir}/zoneinfo/Asia/Tokyo \ 160 ${datadir}/zoneinfo/Asia/Tokyo \
162 ${datadir}/zoneinfo/Australia/Darwin \ 161 ${datadir}/zoneinfo/Australia/Darwin \
163 ${datadir}/zoneinfo/Australia/Adelaide \ 162 ${datadir}/zoneinfo/Australia/Adelaide \
164 ${datadir}/zoneinfo/Australia/Brisbane \ 163 ${datadir}/zoneinfo/Australia/Brisbane \
165 ${datadir}/zoneinfo/Australia/Sydney \ 164 ${datadir}/zoneinfo/Australia/Sydney \
166 ${datadir}/zoneinfo/Pacific/Noumea \ 165 ${datadir}/zoneinfo/Pacific/Noumea \
167 ${datadir}/zoneinfo/CET \ 166 ${datadir}/zoneinfo/CET \
168 ${datadir}/zoneinfo/CST6CDT \ 167 ${datadir}/zoneinfo/CST6CDT \
169 ${datadir}/zoneinfo/EET \ 168 ${datadir}/zoneinfo/EET \
170 ${datadir}/zoneinfo/EST \ 169 ${datadir}/zoneinfo/EST \
171 ${datadir}/zoneinfo/EST5EDT \ 170 ${datadir}/zoneinfo/EST5EDT \
172 ${datadir}/zoneinfo/GB \ 171 ${datadir}/zoneinfo/GB \
173 ${datadir}/zoneinfo/GMT \ 172 ${datadir}/zoneinfo/GMT \
174 ${datadir}/zoneinfo/GMT+0 \ 173 ${datadir}/zoneinfo/GMT+0 \
175 ${datadir}/zoneinfo/GMT-0 \ 174 ${datadir}/zoneinfo/GMT-0 \
176 ${datadir}/zoneinfo/GMT0 \ 175 ${datadir}/zoneinfo/GMT0 \
177 ${datadir}/zoneinfo/Greenwich \ 176 ${datadir}/zoneinfo/Greenwich \
178 ${datadir}/zoneinfo/HST \ 177 ${datadir}/zoneinfo/HST \
179 ${datadir}/zoneinfo/MET \ 178 ${datadir}/zoneinfo/MET \
180 ${datadir}/zoneinfo/MST \ 179 ${datadir}/zoneinfo/MST \
181 ${datadir}/zoneinfo/MST7MDT \ 180 ${datadir}/zoneinfo/MST7MDT \
182 ${datadir}/zoneinfo/NZ \ 181 ${datadir}/zoneinfo/NZ \
183 ${datadir}/zoneinfo/NZ-CHAT \ 182 ${datadir}/zoneinfo/NZ-CHAT \
184 ${datadir}/zoneinfo/PRC \ 183 ${datadir}/zoneinfo/PRC \
185 ${datadir}/zoneinfo/PST8PDT \ 184 ${datadir}/zoneinfo/PST8PDT \
186 ${datadir}/zoneinfo/ROC \ 185 ${datadir}/zoneinfo/ROC \
187 ${datadir}/zoneinfo/ROK \ 186 ${datadir}/zoneinfo/ROK \
188 ${datadir}/zoneinfo/UCT \ 187 ${datadir}/zoneinfo/UCT \
189 ${datadir}/zoneinfo/UTC \ 188 ${datadir}/zoneinfo/UTC \
190 ${datadir}/zoneinfo/Universal \ 189 ${datadir}/zoneinfo/Universal \
191 ${datadir}/zoneinfo/W-SU \ 190 ${datadir}/zoneinfo/W-SU \
192 ${datadir}/zoneinfo/WET \ 191 ${datadir}/zoneinfo/WET \
193 ${datadir}/zoneinfo/Zulu \ 192 ${datadir}/zoneinfo/Zulu \
194 ${datadir}/zoneinfo/zone.tab \ 193 ${datadir}/zoneinfo/zone.tab \
195 ${datadir}/zoneinfo/zone1970.tab \ 194 ${datadir}/zoneinfo/zone1970.tab \
196 ${datadir}/zoneinfo/iso3166.tab \ 195 ${datadir}/zoneinfo/iso3166.tab \
197 ${datadir}/zoneinfo/Etc/*" 196 ${datadir}/zoneinfo/Etc \
197"
198 198
199CONFFILES:tzdata-core = "${sysconfdir}/localtime ${sysconfdir}/timezone" 199CONFFILES:tzdata-core = "${sysconfdir}/localtime ${sysconfdir}/timezone"
200 200
201ALLOW_EMPTY:${PN} = "1" 201ALLOW_EMPTY:${PN} = "1"
202
202RDEPENDS:${PN} = "${TZ_PACKAGES}" 203RDEPENDS:${PN} = "${TZ_PACKAGES}"
204RCONFLICTS:${PN} = " \
205 timezones timezone-africa timezone-america timezone-antarctica \
206 timezone-arctic timezone-asia timezone-atlantic timezone-australia \
207 timezone-europe timezone-indian timezone-iso3166.tab timezone-pacific \
208 timezone-zone.tab \
209"