Introduce use_tzdata_update flag

This commit is contained in:
Eike Rathke 2022-02-02 21:48:10 +01:00
parent 0759968964
commit 3ad66139b6

View File

@ -1,18 +1,26 @@
#%%global debugtrace 1 #%%global debugtrace 1
# Set to 0 when upgrading to a new ICU release that contains up-to-date timezone data.
# (or update the timezone data update..).
%global use_tzdata_update 1
# Adjust to version major; used in tzdata update.
%global icu_major 69
Name: icu Name: icu
Version: 69.1 Version: 69.1
Release: 4%{?dist} Release: 5%{?dist}
Summary: International Components for Unicode Summary: International Components for Unicode
License: MIT and UCD and Public Domain License: MIT and UCD and Public Domain
URL: http://site.icu-project.org/ URL: http://site.icu-project.org/
Source0: https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-src.tgz Source0: https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-src.tgz
%if 0%{?use_tzdata_update}
Source1: https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-data.zip Source1: https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-data.zip
Source2: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2021a4/44/metaZones.txt Source2: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2021a4/44/metaZones.txt
Source3: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2021a4/44/timezoneTypes.txt Source3: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2021a4/44/timezoneTypes.txt
Source4: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2021a4/44/windowsZones.txt Source4: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2021a4/44/windowsZones.txt
Source5: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2021a4/44/zoneinfo64.txt Source5: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2021a4/44/zoneinfo64.txt
%endif
Source10: icu-config.sh Source10: icu-config.sh
BuildRequires: gcc BuildRequires: gcc
@ -64,11 +72,13 @@ BuildArch: noarch
%prep %prep
%autosetup -p1 -n %{name} %autosetup -p1 -n %{name}
%if 0%{?use_tzdata_update}
pushd source pushd source
unzip -o %{SOURCE1} unzip -o %{SOURCE1}
rm -f data/in/icudt69l.dat rm -f data/in/icudt%{icu_major}l.dat
cp -v -f %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} data/misc cp -v -f %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} data/misc
popd popd
%endif
%build %build
pushd source pushd source
@ -182,6 +192,9 @@ LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l
%changelog %changelog
* Wed Feb 02 2022 Eike Rathke <erack@redhat.com> - 69.1-5
- Introduce use_tzdata_update flag
* Tue Feb 01 2022 Mike FABIAN <mfabian@redhat.com> - 69.1-4 * Tue Feb 01 2022 Mike FABIAN <mfabian@redhat.com> - 69.1-4
- Update timezone data to 2021a4 - Update timezone data to 2021a4