2012-11-20 23:06:40 +01:00
|
|
|
#
|
|
|
|
# spec file for package icu
|
|
|
|
#
|
2015-04-29 00:04:53 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-11-20 23:06:40 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%define lname libicu55_1
|
|
|
|
%define amajor 55
|
|
|
|
%define aversion 55_1
|
|
|
|
%ifarch %{armb} hppa mips mips64 ppc ppc64 %{sparc} s390 s390x m68k
|
|
|
|
%define be_platform 1
|
|
|
|
%else
|
|
|
|
%define be_platform 0
|
|
|
|
%endif
|
2012-11-20 23:06:40 +01:00
|
|
|
Name: icu
|
2015-04-29 00:04:53 +02:00
|
|
|
Version: 55.1
|
2012-11-20 23:06:40 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: International Components for Unicode
|
2013-07-29 22:14:57 +02:00
|
|
|
License: MIT
|
2013-05-06 10:15:27 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Url: http://icu-project.org/
|
2015-04-29 00:04:53 +02:00
|
|
|
Source: http://download.icu-project.org/files/icu4c/%{version}/icu4c-%{aversion}-src.tgz
|
|
|
|
Source2: http://download.icu-project.org/files/icu4c/%{version}/icu4c-%{aversion}-docs.zip
|
2013-06-05 19:42:10 +02:00
|
|
|
Source3: sanitize_docs.sh
|
2014-07-29 21:45:00 +02:00
|
|
|
Source100: baselibs.conf
|
2013-06-05 19:42:10 +02:00
|
|
|
Patch2: icu-remove-datetime.patch
|
2013-06-15 22:06:55 +02:00
|
|
|
Patch3: icu-versioning.diff
|
2013-07-14 17:27:58 +02:00
|
|
|
Patch4: icu-fix-install-mode-files.diff
|
2014-09-02 23:17:18 +02:00
|
|
|
Patch6: icu-error-reporting.diff
|
2013-03-27 01:04:24 +01:00
|
|
|
BuildRequires: fdupes
|
2012-11-20 23:06:40 +01:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: pkg-config
|
2014-06-03 13:51:30 +02:00
|
|
|
BuildRequires: unzip
|
2012-11-20 23:06:40 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
ICU is a set of C and C++ libraries that provides robust and
|
|
|
|
full-featured Unicode and locale support. The library provides calendar
|
|
|
|
support, conversions for many character sets, language sensitive
|
|
|
|
collation, date and time formatting, support for many locales, message
|
|
|
|
catalogs and resources, message formatting, normalization, number and
|
|
|
|
currency formatting, time zone support, transliteration, and word,
|
|
|
|
line, and sentence breaking, etc.
|
|
|
|
|
2013-05-06 10:15:27 +02:00
|
|
|
This subpackage contains the runtime programs for interacting with ICU.
|
2012-11-20 23:06:40 +01:00
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%package -n %{lname}
|
2013-07-14 17:27:58 +02:00
|
|
|
Summary: International Components for Unicode
|
|
|
|
Group: System/Libraries
|
2012-11-20 23:06:40 +01:00
|
|
|
Requires: timezone
|
|
|
|
# Following O/P added in timeframe for 12.2
|
2015-04-29 00:04:53 +02:00
|
|
|
Provides: libicu = %{version}
|
|
|
|
Obsoletes: libicu < %{version}
|
|
|
|
%if %{be_platform}
|
|
|
|
Requires: libicu%{aversion}-bedata = %{version}
|
|
|
|
%else
|
|
|
|
Requires: libicu%{aversion}-ledata = %{version}
|
|
|
|
%endif
|
2012-11-20 23:06:40 +01:00
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%description -n %{lname}
|
2012-11-20 23:06:40 +01:00
|
|
|
ICU is a set of C and C++ libraries that provides robust and
|
|
|
|
full-featured Unicode support. This package contains the runtime
|
2013-05-06 10:15:27 +02:00
|
|
|
libraries for ICU which include precompiled locale data.
|
2012-11-20 23:06:40 +01:00
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%package -n libicu%{aversion}-bedata
|
2014-09-02 23:17:18 +02:00
|
|
|
Summary: Rule databases and tables for ICU
|
2013-07-14 17:27:58 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
%if 0%{?suse_version} >= 1210
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2015-04-29 00:04:53 +02:00
|
|
|
%if %{be_platform}
|
2014-09-02 23:17:18 +02:00
|
|
|
# Added for 13.2
|
2015-04-29 00:04:53 +02:00
|
|
|
Obsoletes: libicu%{aversion}-data < %{version}
|
|
|
|
Provides: libicu%{aversion}-data = %{version}
|
2014-09-02 23:17:18 +02:00
|
|
|
%endif
|
2013-07-14 17:27:58 +02:00
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%description -n libicu%{aversion}-bedata
|
2013-07-14 17:27:58 +02:00
|
|
|
ICU is a set of C and C++ libraries that provides robust and
|
2014-09-02 23:17:18 +02:00
|
|
|
full-featured Unicode support.
|
|
|
|
|
|
|
|
ICU makes use of a wide variety of data tables to provide many of its
|
|
|
|
services: converter mapping tables, collation rules, transliteration
|
|
|
|
rules, break iterator rules and dictionaries.
|
2013-07-14 17:27:58 +02:00
|
|
|
|
2014-09-02 23:17:18 +02:00
|
|
|
This subpackage contains these data tables, in big-endian format.
|
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%package -n libicu%{aversion}-ledata
|
2014-09-02 23:17:18 +02:00
|
|
|
Summary: Rule databases and tables for ICU
|
|
|
|
Group: System/Libraries
|
|
|
|
%if 0%{?suse_version} >= 1210
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2015-04-29 00:04:53 +02:00
|
|
|
%if !%{be_platform}
|
2014-09-02 23:17:18 +02:00
|
|
|
# Added for 13.2
|
2015-04-29 00:04:53 +02:00
|
|
|
Obsoletes: libicu%{aversion}-data < %{version}
|
|
|
|
Provides: libicu%{aversion}-data = %{version}
|
2014-09-02 23:17:18 +02:00
|
|
|
%endif
|
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%description -n libicu%{aversion}-ledata
|
2014-09-02 23:17:18 +02:00
|
|
|
ICU is a set of C and C++ libraries that provides robust and
|
|
|
|
full-featured Unicode support.
|
|
|
|
|
|
|
|
ICU makes use of a wide variety of data tables to provide many of its
|
|
|
|
services: converter mapping tables, collation rules, transliteration
|
|
|
|
rules, break iterator rules and dictionaries.
|
|
|
|
|
|
|
|
This subpackage contains these data tables, in little-endian format.
|
2013-07-14 17:27:58 +02:00
|
|
|
|
2012-11-20 23:06:40 +01:00
|
|
|
%package -n libicu-devel
|
|
|
|
Summary: International Components for Unicode (development files)
|
|
|
|
Group: Development/Libraries/C and C++
|
2015-04-29 00:04:53 +02:00
|
|
|
Requires: %{lname} = %{version}
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%description -n libicu-devel
|
|
|
|
ICU is a C++ and C library that provides robust and full-featured
|
|
|
|
Unicode support. This package contains the development files for ICU.
|
|
|
|
|
|
|
|
%package -n libicu-doc
|
2014-09-02 23:17:18 +02:00
|
|
|
Summary: International Components for Unicode (HTML documentation)
|
|
|
|
Group: Documentation/HTML
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%description -n libicu-doc
|
|
|
|
ICU is a C++ and C library that provides robust and full-featured
|
2014-09-02 23:17:18 +02:00
|
|
|
Unicode support. This package contains the HTML documentation.
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%package data
|
|
|
|
Summary: International Components for Unicode (Sources for the Data in ICU)
|
2014-09-02 23:17:18 +02:00
|
|
|
Group: Development/Sources
|
2015-04-29 00:04:53 +02:00
|
|
|
Requires: %{lname} >= %{version}
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%description data
|
|
|
|
ICU is a C++ and C library that provides robust and full-featured
|
|
|
|
Unicode support. This package contains the source files for the data
|
|
|
|
found in the "icu" package.
|
|
|
|
|
|
|
|
This data describes the Unicode data (normative and informative) and
|
|
|
|
also all the table-based converters provided in the ICU distribution.
|
|
|
|
|
2013-07-14 17:27:58 +02:00
|
|
|
This package contains uncompiled source data.
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%prep
|
2014-06-03 13:51:30 +02:00
|
|
|
%setup -q -n icu
|
|
|
|
# docs are special
|
|
|
|
mkdir html
|
|
|
|
cd html
|
2015-04-29 00:04:53 +02:00
|
|
|
unzip %{SOURCE2}
|
2014-06-03 13:51:30 +02:00
|
|
|
cd ..
|
|
|
|
|
2014-10-11 18:52:20 +02:00
|
|
|
%patch -P 2 -P 3 -P 4 -P 6 -p1
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
cd source
|
2015-04-29 00:04:53 +02:00
|
|
|
export CXXFLAGS="%{optflags} -DICU_DATA_DIR=\\\"%{_datadir}/icu/%{version}/\\\""
|
2012-11-20 23:06:40 +01:00
|
|
|
export CFLAGS="$CXXFLAGS"
|
2014-06-03 13:51:30 +02:00
|
|
|
%configure \
|
|
|
|
--disable-static \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-samples \
|
2013-07-14 17:27:58 +02:00
|
|
|
--with-data-packaging=archive
|
2014-06-03 13:51:30 +02:00
|
|
|
make %{?_smp_mflags} VERBOSE=1
|
2014-09-02 23:17:18 +02:00
|
|
|
# Build the other endianess, too.
|
|
|
|
pushd data/
|
2015-04-29 00:04:53 +02:00
|
|
|
%if %{be_platform}
|
2014-09-02 23:17:18 +02:00
|
|
|
cp in/icudt%{amajor}l.dat out/
|
|
|
|
%else
|
|
|
|
LD_LIBRARY_PATH="../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH" \
|
2014-10-11 17:53:57 +02:00
|
|
|
../bin/icupkg -tb in/icudt%{amajor}l.dat out/icudt%{amajor}b.dat
|
|
|
|
! cmp in/icudt%{amajor}l.dat out/icudt%{amajor}b.dat
|
2014-09-02 23:17:18 +02:00
|
|
|
%endif
|
|
|
|
popd
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%install
|
2015-04-29 00:04:53 +02:00
|
|
|
mkdir -p "%{buildroot}/%{_docdir}/%{name}"
|
|
|
|
cp -a html "%{buildroot}/%{_docdir}/%{name}/"
|
|
|
|
cp -a license.html readme.html "%{buildroot}/%{_docdir}/%{name}/"
|
2013-03-27 01:04:24 +01:00
|
|
|
|
2012-11-20 23:06:40 +01:00
|
|
|
find . -name CVS -type d -exec rm -Rf "{}" "+"
|
|
|
|
cd source
|
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
|
|
cp data/out/icudt*.dat "%{buildroot}/%{_datadir}/icu/%{version}/"
|
2012-11-20 23:06:40 +01:00
|
|
|
|
2013-06-15 22:06:55 +02:00
|
|
|
#
|
|
|
|
# ICU's "pkgdata" utility is really fragile, so icu-versioning.diff
|
|
|
|
# does as few as possible, but that means we need some additional
|
|
|
|
# cleanup in the spec file now.
|
|
|
|
#
|
2015-04-29 00:04:53 +02:00
|
|
|
pushd "%{buildroot}/%{_libdir}/"
|
2013-07-23 20:00:42 +02:00
|
|
|
for i in *.so.[0-9]*; do
|
|
|
|
echo "Looking at $i"
|
2013-06-15 22:06:55 +02:00
|
|
|
if [ "${i##*.so.}" != "%version" ]; then
|
2013-07-23 20:00:42 +02:00
|
|
|
rm -fv "$i"
|
|
|
|
continue
|
2013-06-15 22:06:55 +02:00
|
|
|
fi
|
2013-07-23 20:00:42 +02:00
|
|
|
# Because U_ICU_VERSION_SHORT is "51_2" and not "51.2",
|
|
|
|
# create some symlinks.
|
2015-04-29 00:04:53 +02:00
|
|
|
ln -s "$i" "${i%%%version}%{aversion}"
|
2013-06-15 22:06:55 +02:00
|
|
|
done
|
2013-07-23 20:00:42 +02:00
|
|
|
popd
|
2013-06-15 22:06:55 +02:00
|
|
|
|
2014-09-02 23:17:18 +02:00
|
|
|
# /usr/lib/rpm/elfdeps requires +x bit and not all files had it at one point.
|
|
|
|
# - OpenBSD for example is known to have patched their libtool program
|
|
|
|
# to kill the x bit on install :(
|
2015-04-29 00:04:53 +02:00
|
|
|
chmod a+rx "%{buildroot}/%{_libdir}"/lib*.so.*
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
# install uncompiled source data:
|
2015-04-29 00:04:53 +02:00
|
|
|
mkdir -p "%{buildroot}/%{_datadir}/icu/%{version}/unidata"
|
|
|
|
install -m 644 data/unidata/*.txt "%{buildroot}/%{_datadir}/icu/%{version}/unidata"
|
|
|
|
ln -s unidata/UnicodeData.txt "%{buildroot}/%{_datadir}/icu/%{version}/"
|
2012-11-20 23:06:40 +01:00
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
rm "%{buildroot}/%{_datadir}/icu/%{version}/license.html"
|
|
|
|
rm "%{buildroot}/%{_datadir}/icu/%{version}/install-sh"
|
2013-03-27 01:04:24 +01:00
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%fdupes %{buildroot}/%{_prefix}
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%check
|
|
|
|
cd source
|
|
|
|
%if !0%{?qemu_user_space_build:1}
|
|
|
|
# Checks disabled in qemu because of races happening when we emulate
|
|
|
|
# multi-threaded programs, and some check tests atomic instructions in
|
|
|
|
# multi-threaded icu invocations
|
2015-04-29 00:04:53 +02:00
|
|
|
ICU_DATA="%{buildroot}/%{_datadir}/icu/%{version}" make check %{?_smp_mflags} VERBOSE=1
|
2012-11-20 23:06:40 +01:00
|
|
|
%endif
|
|
|
|
|
2014-06-03 14:15:05 +02:00
|
|
|
%post
|
2012-11-20 23:06:40 +01:00
|
|
|
# This should be run by whatever owns /usr/lib64/icu -
|
|
|
|
# the (main) package in this case
|
2015-04-29 00:04:53 +02:00
|
|
|
if test -d "%{_libdir}/icu"; then
|
|
|
|
current=$(cd "%{_libdir}/icu/"; find [0-9]* -maxdepth 1 -type d -printf '%%f\n' |
|
2012-11-20 23:06:40 +01:00
|
|
|
sort -V | tail -n1);
|
|
|
|
if test -n "$current"; then
|
2015-04-29 00:04:53 +02:00
|
|
|
rm -f "%{_libdir}/icu/current";
|
|
|
|
ln -sv "$current" "%{_libdir}/icu/current";
|
2012-11-20 23:06:40 +01:00
|
|
|
fi;
|
|
|
|
fi;
|
|
|
|
|
|
|
|
%postun
|
2015-04-29 00:04:53 +02:00
|
|
|
if test -d "%{_libdir}/icu"; then
|
|
|
|
current=$(cd "%{_libdir}/icu/"; find [0-9]* -maxdepth 1 -type d -printf '%%f\n' |
|
2012-11-20 23:06:40 +01:00
|
|
|
sort -V | tail -n1);
|
|
|
|
if test -n "$current"; then
|
2015-04-29 00:04:53 +02:00
|
|
|
rm -f "%{_libdir}/icu/current";
|
|
|
|
ln -sv "$current" "%{_libdir}/icu/current";
|
2012-11-20 23:06:40 +01:00
|
|
|
fi;
|
|
|
|
fi;
|
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%post -n %{lname} -p /sbin/ldconfig
|
2014-06-03 13:51:30 +02:00
|
|
|
|
2015-04-29 00:04:53 +02:00
|
|
|
%postun -n %{lname} -p /sbin/ldconfig
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2015-04-29 00:04:53 +02:00
|
|
|
%dir %{_libdir}/icu
|
|
|
|
%dir %{_libdir}/icu/%{version}
|
|
|
|
%{_libdir}/icu/current
|
|
|
|
%{_bindir}/derb
|
|
|
|
%{_bindir}/gen*
|
|
|
|
%{_bindir}/icuinfo
|
|
|
|
%{_bindir}/makeconv
|
|
|
|
%{_bindir}/pkgdata
|
|
|
|
%{_bindir}/uconv
|
|
|
|
%{_sbindir}/*
|
|
|
|
%{_mandir}/man*/*
|
|
|
|
%dir %{_docdir}/%{name}/
|
|
|
|
%{_docdir}/%{name}/license.html
|
|
|
|
%{_docdir}/%{name}/readme.html
|
|
|
|
|
|
|
|
%files -n %{lname}
|
2012-11-20 23:06:40 +01:00
|
|
|
%defattr(-, root, root)
|
2015-04-29 00:04:53 +02:00
|
|
|
%{_libdir}/libicu*.so.*
|
2012-11-20 23:06:40 +01:00
|
|
|
|
2014-09-02 23:17:18 +02:00
|
|
|
%files -n libicu%{aversion}-bedata
|
|
|
|
%defattr(-,root,root)
|
2015-04-29 00:04:53 +02:00
|
|
|
%dir %{_datadir}/icu
|
|
|
|
%dir %{_datadir}/icu/%{version}
|
|
|
|
%{_datadir}/icu/%{version}/icudt%{amajor}b.dat
|
2014-09-02 23:17:18 +02:00
|
|
|
|
|
|
|
%files -n libicu%{aversion}-ledata
|
2013-07-14 17:27:58 +02:00
|
|
|
%defattr(-,root,root)
|
2015-04-29 00:04:53 +02:00
|
|
|
%dir %{_datadir}/icu
|
|
|
|
%dir %{_datadir}/icu/%{version}
|
|
|
|
%{_datadir}/icu/%{version}/icudt%{amajor}l.dat
|
2013-07-14 17:27:58 +02:00
|
|
|
|
2012-11-20 23:06:40 +01:00
|
|
|
%files -n libicu-devel
|
|
|
|
%defattr(-, root, root)
|
2015-04-29 00:04:53 +02:00
|
|
|
%{_libdir}/libicu*.so
|
|
|
|
%{_includedir}/unicode/
|
|
|
|
%{_includedir}/layout/
|
|
|
|
%dir %{_libdir}/icu/
|
|
|
|
%dir %{_libdir}/icu/%{version}/
|
|
|
|
%{_libdir}/icu/%{version}/Makefile.inc
|
|
|
|
%{_libdir}/icu/%{version}/pkgdata.inc
|
|
|
|
%{_libdir}/icu/Makefile.inc
|
|
|
|
%{_libdir}/icu/pkgdata.inc
|
|
|
|
%{_libdir}/pkgconfig/icu-*.pc
|
|
|
|
%{_bindir}/icu-config
|
|
|
|
%dir %{_datadir}/icu/
|
|
|
|
%dir %{_datadir}/icu/%{version}/
|
|
|
|
%{_datadir}/icu/%{version}/mkinstalldirs
|
|
|
|
%{_datadir}/icu/%{version}/config/
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%files -n libicu-doc
|
|
|
|
%defattr(-,root,root)
|
2015-04-29 00:04:53 +02:00
|
|
|
%dir %{_docdir}/%{name}/
|
|
|
|
%{_docdir}/%{name}/html/
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%files data
|
|
|
|
%defattr(-, root, root)
|
2015-04-29 00:04:53 +02:00
|
|
|
%dir %{_datadir}/icu/
|
|
|
|
%dir %{_datadir}/icu/%{version}/
|
|
|
|
%{_datadir}/icu/%{version}/unidata/
|
|
|
|
%{_datadir}/icu/%{version}/UnicodeData.txt
|
2012-11-20 23:06:40 +01:00
|
|
|
|
|
|
|
%changelog
|