icu/icu.spec

304 lines
8 KiB
RPMSpec
Raw Normal View History

2022-10-13 22:19:12 +03:00
%define icule 0
%define iculx 0
2014-06-17 16:24:23 +04:00
%define major %(echo %{version} |cut -d. -f1)
%define libicudata %mklibname %{name}data %{major}
%define libicui18n %mklibname %{name}i18n %{major}
%define libicuio %mklibname %{name}io %{major}
2022-10-13 22:19:12 +03:00
%if %icule
%define libicule %mklibname %{name}le %{major}
2022-10-13 22:19:12 +03:00
%endif
%if %iculx
%define libiculx %mklibname %{name}lx %{major}
2022-10-13 22:19:12 +03:00
%endif
%define libicutest %mklibname %{name}test %{major}
%define libicutu %mklibname %{name}tu %{major}
%define libicuuc %mklibname %{name}uc %{major}
2014-06-17 16:24:23 +04:00
%define devname %mklibname %{name} -d
2014-06-17 16:24:23 +04:00
%define tarballver %(echo %{version}|sed -e 's|\\.|_|g')
2022-10-11 00:28:37 +03:00
%define releasever %(echo %{version}|sed -e 's|\\.|-|g')
2016-09-07 12:33:55 +10:00
%bcond_with crosscompile
%bcond_with tests
2012-02-01 14:13:44 +04:00
Summary: International Components for Unicode
Name: icu
2024-10-04 20:58:09 +00:00
Epoch: 2
2025-02-21 19:54:38 +00:00
Version: 76.1
2023-06-29 13:28:23 +00:00
Release: 1
2012-02-01 14:13:44 +04:00
License: MIT
Group: System/Libraries
2022-10-11 00:28:37 +03:00
URL: https://icu.unicode.org
Source0: https://github.com/unicode-org/icu/releases/download/release-%{releasever}/%{name}4c-%{tarballver}-src.tgz
Source1: https://github.com/unicode-org/icu/releases/download/release-%{releasever}/%{name}4c-%{tarballver}-docs.zip
2022-10-13 22:19:12 +03:00
Source1000: %{name}.rpmlintrc
Patch0: %{name}4c-49.1-setBreakType.patch
Patch1: icu-57.1-ICU-12936.patch
2016-09-07 12:33:55 +10:00
# From Fedora package
Patch10: icu.7601.Indic-ccmp.patch
Patch11: icu.8198.revert.icu5431.patch
Patch12: icu.8800.freeserif.crash.patch
# From Debian
Patch20: CVE-2016-6293.patch
Patch21: CVE-2016-7415.patch
Patch22: CVE-2017-7867_CVE-2017-7868.patch
Patch23: CVE-2017-14952.patch
Patch24: CVE-2017-15422.patch
Patch25: CVE-2020-10531.patch
2012-02-01 14:13:44 +04:00
BuildRequires: doxygen
2022-10-11 00:28:37 +03:00
BuildRequires: clang
2012-02-01 14:13:44 +04:00
%description
The International Components for Unicode (ICU) libraries provide robust and
full-featured Unicode services on a wide variety of platforms. ICU supports
the most current version of the Unicode standard, and they provide support
for supplementary Unicode characters (needed for GB 18030 repertoire support).
As computing environments become more heterogeneous, software portability
becomes more important. ICU lets you produce the same results across all the
various platforms you support, without sacrificing performance. It offers
great flexibility to extend and customize the supplied services, which
include:
* Text: Unicode text handling, full character properties and character set
conversions (500+ codepages)
* Analysis: Unicode regular expressions; full Unicode sets; character, word
and line boundaries
* Comparison: Language sensitive collation and searching
* Transformations: normalization, upper/lowercase, script transliterations
(50+ pairs)
* Locales: Comprehensive locale data (230+) and resource bundle architecture
* Complex Text Layout: Arabic, Hebrew, Indic and Thai
* Time: Multi-calendar and time zone
* Formatting and Parsing: dates, times, numbers, currencies, messages and
rule based
2016-09-07 12:33:55 +10:00
%files
%{_bindir}/*
%exclude %{_bindir}/icu-config
%{_sbindir}/*
#----------------------------------------------------------------------------
2012-02-01 14:13:44 +04:00
%package doc
Summary: Documentation for the International Components for Unicode
2016-09-07 12:33:55 +10:00
Group: Documentation
Requires: %{name} >= %{EVRD}
2012-02-01 14:13:44 +04:00
%description doc
Documentation for the International Components for Unicode.
2016-09-07 12:33:55 +10:00
%files doc
%doc readme.html docs/*
%{_mandir}/man1/*
%{_mandir}/man8/*
#----------------------------------------------------------------------------
%package -n %{libicudata}
Summary: Library for the International Components for Unicode - icudata
Group: System/Libraries
%description -n %{libicudata}
Library for the International Components for Unicode - icudata.
2016-09-07 12:33:55 +10:00
%files -n %{libicudata}
%{_libdir}/libicudata.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{libicui18n}
Summary: Library for the International Components for Unicode - icui18n
Group: System/Libraries
%description -n %{libicui18n}
Library for the International Components for Unicode - icui18n.
2016-09-07 12:33:55 +10:00
%files -n %{libicui18n}
%{_libdir}/libicui18n.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{libicuio}
Summary: Library for the International Components for Unicode - icuio
Group: System/Libraries
%description -n %{libicuio}
Library for the International Components for Unicode - icuio.
2016-09-07 12:33:55 +10:00
%files -n %{libicuio}
%{_libdir}/libicuio.so.%{major}*
2022-10-13 22:19:12 +03:00
2016-09-07 12:33:55 +10:00
#----------------------------------------------------------------------------
2022-10-13 22:19:12 +03:00
%if %icule
%package -n %{libicule}
Summary: Library for the International Components for Unicode - icule
Group: System/Libraries
%description -n %{libicule}
Library for the International Components for Unicode - icule.
2016-09-07 12:33:55 +10:00
%files -n %{libicule}
%{_libdir}/libicule.so.%{major}*
2022-10-13 22:19:12 +03:00
%endif
2016-09-07 12:33:55 +10:00
#----------------------------------------------------------------------------
2022-10-13 22:19:12 +03:00
%if %icule
%package -n %{libiculx}
Summary: Library for the International Components for Unicode - iculx
Group: System/Libraries
%description -n %{libiculx}
Library for the International Components for Unicode - iculx.
2016-09-07 12:33:55 +10:00
%files -n %{libiculx}
%{_libdir}/libiculx.so.%{major}*
2022-10-13 22:19:12 +03:00
%endif
2016-09-07 12:33:55 +10:00
#----------------------------------------------------------------------------
%package -n %{libicutest}
Summary: Library for the International Components for Unicode - icutest
Group: System/Libraries
%description -n %{libicutest}
Library for the International Components for Unicode - icutest.
2016-09-07 12:33:55 +10:00
%files -n %{libicutest}
%{_libdir}/libicutest.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{libicutu}
Summary: Library for the International Components for Unicode - icutu
2012-02-01 14:13:44 +04:00
Group: System/Libraries
%description -n %{libicutu}
Library for the International Components for Unicode - icutu.
2016-09-07 12:33:55 +10:00
%files -n %{libicutu}
%{_libdir}/libicutu.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{libicuuc}
Summary: Library for the International Components for Unicode - icuuc
Group: System/Libraries
%description -n %{libicuuc}
Library for the International Components for Unicode - icuuc.
2012-02-01 14:13:44 +04:00
2016-09-07 12:33:55 +10:00
%files -n %{libicuuc}
%{_libdir}/libicuuc.so.%{major}*
#----------------------------------------------------------------------------
2014-06-17 16:24:23 +04:00
%package -n %{devname}
2012-02-01 14:13:44 +04:00
Summary: Development files for the International Components for Unicode
Group: Development/Other
2016-09-07 12:33:55 +10:00
Requires: %{libicudata} = %{EVRD}
Requires: %{libicui18n} = %{EVRD}
Requires: %{libicuio} = %{EVRD}
2022-10-13 22:19:12 +03:00
%if %icule
2016-09-07 12:33:55 +10:00
Requires: %{libicule} = %{EVRD}
2022-10-13 22:19:12 +03:00
%endif
%if %iculx
2016-09-07 12:33:55 +10:00
Requires: %{libiculx} = %{EVRD}
2022-10-13 22:19:12 +03:00
%endif
2016-09-07 12:33:55 +10:00
Requires: %{libicutest} = %{EVRD}
Requires: %{libicutu} = %{EVRD}
Requires: %{libicuuc} = %{EVRD}
Provides: %{name}%{major}-devel = %{EVRD}
Provides: %{name}-devel = %{EVRD}
2012-02-01 14:13:44 +04:00
2016-09-07 12:33:55 +10:00
%description -n %{devname}
2012-02-01 14:13:44 +04:00
Development files and headers for the International Components for Unicode.
2016-09-07 12:33:55 +10:00
%files -n %{devname}
%{_bindir}/icu-config
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
2022-10-13 22:19:12 +03:00
#dir %{_includedir}/layout
2016-09-07 12:33:55 +10:00
%dir %{_includedir}/unicode
2022-10-13 22:19:12 +03:00
#{_includedir}/layout/*
2016-09-07 12:33:55 +10:00
%{_includedir}/unicode/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
#----------------------------------------------------------------------------
2012-02-01 14:13:44 +04:00
%prep
2014-06-17 16:24:23 +04:00
%setup -qn %{name}
2022-10-11 00:28:37 +03:00
#patch0 -p1 -b .setBreakType
#patch1 -p1
#patch10 -p1
#patch11 -p2 -R
#patch12 -p1
#patch20 -p1
#patch21 -p1
#patch22 -p1
#patch23 -p1
#patch24 -p1
#patch25 -p1
2012-02-01 14:13:44 +04:00
mkdir -p docs
cd docs
unzip -q %{SOURCE1}
cd -
%build
pushd source
2022-10-11 05:31:40 +03:00
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir}
2022-10-11 00:28:37 +03:00
2012-02-01 14:13:44 +04:00
# (tpg) needed for patch 2
2022-10-11 00:28:37 +03:00
#export CFLAGS='%{optflags} -fno-strict-aliasing'
#export CXXFLAGS='%{optflags} -fno-strict-aliasing'
2014-06-17 16:24:23 +04:00
# If we want crosscompile icu we need to built ICU package
# and add --with-cross-build=/path/to/icu
# disable bits and do unset TARGET twice, after configure
# and before makeinstall
2022-10-11 00:28:37 +03:00
#configure2_5x \
#if !%{with crosscompile}
# --with-library-bits=64else32 \
#endif
# --with-data-packaging=library \
#if %{with crosscompile}
# --with-cross-build=/path/to/built/icu/source/ \
#endif
# --disable-samples
#if %{with crosscompile}
#unset TARGET
#endif
2012-02-01 14:13:44 +04:00
%make
%make doc
popd
%install
2014-06-17 16:24:23 +04:00
%if %{with crosscompile}
unset TARGET
%endif
%makeinstall_std -C source
2012-02-01 14:13:44 +04:00
%if %{with tests}
%check
pushd source
make check
popd
%endif