SHA256
1
0
forked from pool/icu
icu/icu.spec

363 lines
11 KiB
RPMSpec
Raw Normal View History

#
# spec file for package icu
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
Name: icu
%define sover 49
Version: 49.1
Release: 0
%define aversion 49_1
Summary: International Components for Unicode
License: SUSE-XFree86-1.0
Group: System/Libraries
Url: http://ibm.com/software/globalization/icu
Source0: icu4c-%aversion-src.tgz
Source1: icu4c-%aversion-docs.zip
# PATCH-FIX-UPSTREAM icu-rpmlint.diff -- http://bugs.icu-project.org/trac/ticket/7808
Patch1: icu-rpmlint.diff
# PATCH-FIX-OPENSUSE icu-remove-datetime.patch vuntz@novell.com -- Do not put date/time in icu-config (needed for build-compare)
Patch99: icu-remove-datetime.patch
#BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: unzip
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.
This package contains the Unicode character database and derived
properties along with converters and time zone data.
This package contains the runtime libraries for ICU. It does not
contain any of the data files needed at runtime and present in the icu
and icu-locales packages.
%package -n libicudata%sover
Summary: International Components for Unicode: Data library
Group: System/Libraries
Obsoletes: icu-i18ndata
%description -n libicudata%sover
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the main runtime
library for ICU.
icudata contains data required by the common and i18n ICU libraries.
%package -n libicui18n%sover
Summary: International Components for Unicode: Internationalization library
Group: System/Libraries
%description -n libicui18n%sover
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the main runtime
library for ICU.
icui18n is a library that contains many local-based
internationalization (i18n) functions.
%package -n libicuio%sover
Summary: International Components for Unicode
Group: System/Libraries
%description -n libicuio%sover
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the main runtime
library for ICU.
icuio is an optional library that provides a stdio-like API with
Unicode support.
%package -n libicule%sover
Summary: International Components for Unicode: Layout engine
Group: System/Libraries
%description -n libicule%sover
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the main runtime
library for ICU.
icule is an optional engine for doing font layout.
%package -n libiculx%sover
Summary: International Components for Unicode: Layout extensions engine
Group: System/Libraries
%description -n libiculx%sover
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the main runtime
library for ICU.
iculx is an optional engine for doing font layout that uses parts of
ICU.
%package -n libicutest%sover
Summary: International Components for Unicode: Testing library
Group: System/Libraries
%description -n libicutest%sover
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the main runtime
library for ICU.
(Upstream has not provided a description for this library.)
%package -n libicutu%sover
Summary: International Components for Unicode: Tool utility library
Group: System/Libraries
%description -n libicutu%sover
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the main runtime
library for ICU.
An internal library that contains internal APIs that are only used
by ICU's tools.
%package -n libicuuc%sover
Summary: International Components for Unicode: Common library
Group: System/Libraries
# bug437293
%ifarch ppc64
Obsoletes: libicu-64bit
%endif
Requires: timezone
# Following O/P added in timeframe for 12.2
Provides: libicu = %version-%release
Obsoletes: libicu < %version-%release
%description -n libicuuc%sover
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the main runtime
library for ICU.
Base library required by all other ICU libraries.
%package -n libicu-devel
Summary: International Components for Unicode (development files)
Group: Development/Libraries/C and C++
# bug437293
%ifarch ppc64
Obsoletes: libicu-devel-64bit
%endif
#
Requires: libicudata%sover = %version
Requires: libicui18n%sover = %version
Requires: libicuio%sover = %version
Requires: libicule%sover = %version
Requires: libiculx%sover = %version
Requires: libicutest%sover = %version
Requires: libicutu%sover = %version
Requires: libicuuc%sover = %version
%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
Summary: International Components for Unicode (html documentation)
Group: Development/Libraries/C and C++
%description -n libicu-doc
ICU is a C++ and C library that provides robust and full-featured
Unicode support. This package contains the html documentation.
%package data
Summary: International Components for Unicode (Sources for the Data in ICU)
Group: System/Libraries
Requires: libicudata%sover >= %version
%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.
This package contains uncompiled source data. Precompiled data is in
the "libicudata%sover" package.
%prep
%setup -q -n icu
mkdir html
pushd html
unzip %{SOURCE1}
popd
%patch1 -p1
%patch99 -p1
%build
cd source
export CXXFLAGS="%{optflags} -DU_TRACE_DYLOAD -DICU_DATA_DIR=\\\"/usr/share/icu/%{version}/\\\"";
export CFLAGS="$CXXFLAGS";
%configure --disable-static --with-pic\
--enable-shared \
--without-samples
make %{?_smp_mflags}
%install
find . -name CVS -type d -exec rm -Rf "{}" "+"
cd source
make install DESTDIR="%buildroot";
# to extract debug info
chmod a+rx %{buildroot}%{_libdir}/*.so.*
# install uncompiled source data:
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}/
rm %{buildroot}/%{_datadir}/icu/%{version}/license.html
rm %{buildroot}/%{_datadir}/icu/%{version}/install-sh
%check
exit 0
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
make check
%endif
# This should be run by whatever owns /usr/lib64/icu -
# the (main) package in this case
%post
if test -d "%_libdir/icu"; then
current=$(cd %_libdir/icu; find [0-9]* -maxdepth 1 -type d -printf '%f\n' |
sort -V | tail -n1);
if test -n "$current"; then
rm -f "%_libdir/icu/current";
ln -sv "$current" "%_libdir/icu/current";
fi;
fi;
%postun
if test -d "%_libdir/icu"; then
current=$(cd %_libdir/icu; find [0-9]* -maxdepth 1 -type d -printf '%f\n' |
sort -V | tail -n1);
if test -n "$current"; then
rm -f "%_libdir/icu/current";
ln -sv "$current" "%_libdir/icu/current";
fi;
fi;
%post -n libicudata%sover -p /sbin/ldconfig
%postun -n libicudata%sover -p /sbin/ldconfig
%post -n libicui18n%sover -p /sbin/ldconfig
%postun -n libicui18n%sover -p /sbin/ldconfig
%post -n libicuio%sover -p /sbin/ldconfig
%postun -n libicuio%sover -p /sbin/ldconfig
%post -n libicule%sover -p /sbin/ldconfig
%postun -n libicule%sover -p /sbin/ldconfig
%post -n libiculx%sover -p /sbin/ldconfig
%postun -n libiculx%sover -p /sbin/ldconfig
%post -n libicutest%sover -p /sbin/ldconfig
%postun -n libicutest%sover -p /sbin/ldconfig
%post -n libicutu%sover -p /sbin/ldconfig
%postun -n libicutu%sover -p /sbin/ldconfig
%post -n libicuuc%sover -p /sbin/ldconfig
%postun -n libicuuc%sover -p /sbin/ldconfig
%files
%defattr(-, root, root)
%doc license.html readme.html
%dir %{_libdir}/icu/
%dir %{_libdir}/icu/%{version}
%{_libdir}/icu/current
%{_bindir}/derb
%{_bindir}/genbrk
%{_bindir}/gencfu
%{_bindir}/gencnval
%{_bindir}/genrb
%{_bindir}/genctd
%{_bindir}/icuinfo
%{_bindir}/makeconv
%{_bindir}/pkgdata
%{_bindir}/uconv
%{_sbindir}/*
%{_mandir}/*/*
%files -n libicudata%sover
%defattr(-,root,root)
%_libdir/libicudata.so.%{sover}*
%files -n libicui18n%sover
%defattr(-,root,root)
%_libdir/libicui18n.so.%{sover}*
%files -n libicuio%sover
%defattr(-,root,root)
%_libdir/libicuio.so.%{sover}*
%files -n libicule%sover
%defattr(-,root,root)
%_libdir/libicule.so.%{sover}*
%files -n libiculx%sover
%defattr(-,root,root)
%_libdir/libiculx.so.%{sover}*
%files -n libicutest%sover
%defattr(-,root,root)
%_libdir/libicutest.so.%{sover}*
%files -n libicutu%sover
%defattr(-,root,root)
%_libdir/libicutu.so.%{sover}*
%files -n libicuuc%sover
%defattr(-,root,root)
%_libdir/libicuuc.so.%{sover}*
%files -n libicu-devel
%defattr(-, root, root)
%{_libdir}/libicu*.so
%{_includedir}/unicode/
%{_includedir}/layout/
%{_libdir}/icu/%{version}/Makefile.inc
%{_libdir}/icu/%{version}/pkgdata.inc
%{_libdir}/icu/Makefile.inc
%{_libdir}/icu/pkgdata.inc
%{_libdir}/pkgconfig/*.pc
%{_bindir}/icu-config
%dir %{_datadir}/icu
%dir %{_datadir}/icu/%{version}
%{_datadir}/icu/%{version}/mkinstalldirs
%{_datadir}/icu/%{version}/config/
%files -n libicu-doc
%defattr(-, root, root)
%doc html/
%files data
%defattr(-, root, root)
%{_datadir}/icu/%{version}/unidata/
%{_datadir}/icu/%{version}/UnicodeData.txt
%changelog