From 3ad66139b6a3090cccc491bc5b21cd4a35c60673 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Wed, 2 Feb 2022 21:48:10 +0100 Subject: [PATCH] Introduce use_tzdata_update flag --- icu.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/icu.spec b/icu.spec index 6240bec..4e63e24 100644 --- a/icu.spec +++ b/icu.spec @@ -1,18 +1,26 @@ #%%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 Version: 69.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: International Components for Unicode License: MIT and UCD and Public Domain URL: http://site.icu-project.org/ 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 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 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 +%endif Source10: icu-config.sh BuildRequires: gcc @@ -64,11 +72,13 @@ BuildArch: noarch %prep %autosetup -p1 -n %{name} +%if 0%{?use_tzdata_update} pushd source 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 popd +%endif %build pushd source @@ -182,6 +192,9 @@ LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l %changelog +* Wed Feb 02 2022 Eike Rathke - 69.1-5 +- Introduce use_tzdata_update flag + * Tue Feb 01 2022 Mike FABIAN - 69.1-4 - Update timezone data to 2021a4