Undo {} bloating with spec-beautifier
OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=62
This commit is contained in:
parent
44fd041591
commit
3e797ec590
190
icu.spec
190
icu.spec
@ -19,7 +19,7 @@
|
||||
%define lname libicu55_1
|
||||
%define amajor 55
|
||||
%define aversion 55_1
|
||||
%ifarch %{armb} hppa mips mips64 ppc ppc64 %{sparc} s390 s390x m68k
|
||||
%ifarch %armb hppa mips mips64 ppc ppc64 %sparc s390 s390x m68k
|
||||
%define be_platform 1
|
||||
%else
|
||||
%define be_platform 0
|
||||
@ -31,8 +31,8 @@ Summary: International Components for Unicode
|
||||
License: MIT
|
||||
Group: Development/Libraries/C and C++
|
||||
Url: http://icu-project.org/
|
||||
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
|
||||
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
|
||||
Source3: sanitize_docs.sh
|
||||
Source100: baselibs.conf
|
||||
Patch2: icu-remove-datetime.patch
|
||||
@ -56,37 +56,37 @@ line, and sentence breaking, etc.
|
||||
|
||||
This subpackage contains the runtime programs for interacting with ICU.
|
||||
|
||||
%package -n %{lname}
|
||||
%package -n %lname
|
||||
Summary: International Components for Unicode
|
||||
Group: System/Libraries
|
||||
Requires: timezone
|
||||
# Following O/P added in timeframe for 12.2
|
||||
Provides: libicu = %{version}
|
||||
Obsoletes: libicu < %{version}
|
||||
%if %{be_platform}
|
||||
Requires: libicu%{aversion}-bedata = %{version}
|
||||
Provides: libicu = %version
|
||||
Obsoletes: libicu < %version
|
||||
%if %be_platform
|
||||
Requires: libicu%aversion-bedata = %version
|
||||
%else
|
||||
Requires: libicu%{aversion}-ledata = %{version}
|
||||
Requires: libicu%aversion-ledata = %version
|
||||
%endif
|
||||
|
||||
%description -n %{lname}
|
||||
%description -n %lname
|
||||
ICU is a set of C and C++ libraries that provides robust and
|
||||
full-featured Unicode support. This package contains the runtime
|
||||
libraries for ICU which include precompiled locale data.
|
||||
|
||||
%package -n libicu%{aversion}-bedata
|
||||
%package -n libicu%aversion-bedata
|
||||
Summary: Rule databases and tables for ICU
|
||||
Group: System/Libraries
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%if %{be_platform}
|
||||
%if %be_platform
|
||||
# Added for 13.2
|
||||
Obsoletes: libicu%{aversion}-data < %{version}
|
||||
Provides: libicu%{aversion}-data = %{version}
|
||||
Obsoletes: libicu%aversion-data < %version
|
||||
Provides: libicu%aversion-data = %version
|
||||
%endif
|
||||
|
||||
%description -n libicu%{aversion}-bedata
|
||||
%description -n libicu%aversion-bedata
|
||||
ICU is a set of C and C++ libraries that provides robust and
|
||||
full-featured Unicode support.
|
||||
|
||||
@ -96,19 +96,19 @@ rules, break iterator rules and dictionaries.
|
||||
|
||||
This subpackage contains these data tables, in big-endian format.
|
||||
|
||||
%package -n libicu%{aversion}-ledata
|
||||
%package -n libicu%aversion-ledata
|
||||
Summary: Rule databases and tables for ICU
|
||||
Group: System/Libraries
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%if !%{be_platform}
|
||||
%if !%be_platform
|
||||
# Added for 13.2
|
||||
Obsoletes: libicu%{aversion}-data < %{version}
|
||||
Provides: libicu%{aversion}-data = %{version}
|
||||
Obsoletes: libicu%aversion-data < %version
|
||||
Provides: libicu%aversion-data = %version
|
||||
%endif
|
||||
|
||||
%description -n libicu%{aversion}-ledata
|
||||
%description -n libicu%aversion-ledata
|
||||
ICU is a set of C and C++ libraries that provides robust and
|
||||
full-featured Unicode support.
|
||||
|
||||
@ -121,7 +121,7 @@ This subpackage contains these data tables, in little-endian format.
|
||||
%package -n libicu-devel
|
||||
Summary: International Components for Unicode (development files)
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{lname} = %{version}
|
||||
Requires: %lname = %version
|
||||
|
||||
%description -n libicu-devel
|
||||
ICU is a C++ and C library that provides robust and full-featured
|
||||
@ -138,7 +138,7 @@ Unicode support. This package contains the HTML documentation.
|
||||
%package data
|
||||
Summary: International Components for Unicode (Sources for the Data in ICU)
|
||||
Group: Development/Sources
|
||||
Requires: %{lname} >= %{version}
|
||||
Requires: %lname >= %version
|
||||
|
||||
%description data
|
||||
ICU is a C++ and C library that provides robust and full-featured
|
||||
@ -155,14 +155,14 @@ This package contains uncompiled source data.
|
||||
# docs are special
|
||||
mkdir html
|
||||
cd html
|
||||
unzip %{SOURCE2}
|
||||
unzip %SOURCE2
|
||||
cd ..
|
||||
|
||||
%patch -P 2 -P 3 -P 4 -P 6 -p1
|
||||
|
||||
%build
|
||||
cd source
|
||||
export CXXFLAGS="%{optflags} -DICU_DATA_DIR=\\\"%{_datadir}/icu/%{version}/\\\""
|
||||
export CXXFLAGS="%optflags -DICU_DATA_DIR=\\\"%_datadir/icu/%version/\\\""
|
||||
export CFLAGS="$CXXFLAGS"
|
||||
%configure \
|
||||
--disable-static \
|
||||
@ -172,7 +172,7 @@ export CFLAGS="$CXXFLAGS"
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
# Build the other endianess, too.
|
||||
pushd data/
|
||||
%if %{be_platform}
|
||||
%if %be_platform
|
||||
cp in/icudt%{amajor}l.dat out/
|
||||
%else
|
||||
LD_LIBRARY_PATH="../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH" \
|
||||
@ -182,22 +182,22 @@ LD_LIBRARY_PATH="../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH" \
|
||||
popd
|
||||
|
||||
%install
|
||||
mkdir -p "%{buildroot}/%{_docdir}/%{name}"
|
||||
cp -a html "%{buildroot}/%{_docdir}/%{name}/"
|
||||
cp -a license.html readme.html "%{buildroot}/%{_docdir}/%{name}/"
|
||||
mkdir -p "%buildroot/%_docdir/%name"
|
||||
cp -a html "%buildroot/%_docdir/%name/"
|
||||
cp -a license.html readme.html "%buildroot/%_docdir/%name/"
|
||||
|
||||
find . -name CVS -type d -exec rm -Rf "{}" "+"
|
||||
cd source
|
||||
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
cp data/out/icudt*.dat "%{buildroot}/%{_datadir}/icu/%{version}/"
|
||||
make DESTDIR=%buildroot install %{?_smp_mflags}
|
||||
cp data/out/icudt*.dat "%buildroot/%_datadir/icu/%version/"
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
pushd "%{buildroot}/%{_libdir}/"
|
||||
pushd "%buildroot/%_libdir/"
|
||||
for i in *.so.[0-9]*; do
|
||||
echo "Looking at $i"
|
||||
if [ "${i##*.so.}" != "%version" ]; then
|
||||
@ -206,24 +206,24 @@ for i in *.so.[0-9]*; do
|
||||
fi
|
||||
# Because U_ICU_VERSION_SHORT is "51_2" and not "51.2",
|
||||
# create some symlinks.
|
||||
ln -s "$i" "${i%%%version}%{aversion}"
|
||||
ln -s "$i" "${i%%%version}%aversion"
|
||||
done
|
||||
popd
|
||||
|
||||
# /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 :(
|
||||
chmod a+rx "%{buildroot}/%{_libdir}"/lib*.so.*
|
||||
chmod a+rx "%buildroot/%_libdir"/lib*.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}/"
|
||||
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"
|
||||
rm "%buildroot/%_datadir/icu/%version/license.html"
|
||||
rm "%buildroot/%_datadir/icu/%version/install-sh"
|
||||
|
||||
%fdupes %{buildroot}/%{_prefix}
|
||||
%fdupes %buildroot/%_prefix
|
||||
|
||||
%check
|
||||
cd source
|
||||
@ -231,96 +231,96 @@ cd source
|
||||
# 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
|
||||
ICU_DATA="%{buildroot}/%{_datadir}/icu/%{version}" make check %{?_smp_mflags} VERBOSE=1
|
||||
ICU_DATA="%buildroot/%_datadir/icu/%version" make check %{?_smp_mflags} VERBOSE=1
|
||||
%endif
|
||||
|
||||
%post
|
||||
# This should be run by whatever owns /usr/lib64/icu -
|
||||
# the (main) package in this case
|
||||
if test -d "%{_libdir}/icu"; then
|
||||
current=$(cd "%{_libdir}/icu/"; find [0-9]* -maxdepth 1 -type d -printf '%%f\n' |
|
||||
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";
|
||||
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' |
|
||||
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";
|
||||
rm -f "%_libdir/icu/current";
|
||||
ln -sv "$current" "%_libdir/icu/current";
|
||||
fi;
|
||||
fi;
|
||||
|
||||
%post -n %{lname} -p /sbin/ldconfig
|
||||
%post -n %lname -p /sbin/ldconfig
|
||||
|
||||
%postun -n %{lname} -p /sbin/ldconfig
|
||||
%postun -n %lname -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%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
|
||||
%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}
|
||||
%files -n %lname
|
||||
%defattr(-, root, root)
|
||||
%{_libdir}/libicu*.so.*
|
||||
%_libdir/libicu*.so.*
|
||||
|
||||
%files -n libicu%{aversion}-bedata
|
||||
%files -n libicu%aversion-bedata
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datadir}/icu
|
||||
%dir %{_datadir}/icu/%{version}
|
||||
%{_datadir}/icu/%{version}/icudt%{amajor}b.dat
|
||||
%dir %_datadir/icu
|
||||
%dir %_datadir/icu/%version
|
||||
%_datadir/icu/%version/icudt%{amajor}b.dat
|
||||
|
||||
%files -n libicu%{aversion}-ledata
|
||||
%files -n libicu%aversion-ledata
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datadir}/icu
|
||||
%dir %{_datadir}/icu/%{version}
|
||||
%{_datadir}/icu/%{version}/icudt%{amajor}l.dat
|
||||
%dir %_datadir/icu
|
||||
%dir %_datadir/icu/%version
|
||||
%_datadir/icu/%version/icudt%{amajor}l.dat
|
||||
|
||||
%files -n libicu-devel
|
||||
%defattr(-, root, root)
|
||||
%{_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/
|
||||
%_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/
|
||||
|
||||
%files -n libicu-doc
|
||||
%defattr(-,root,root)
|
||||
%dir %{_docdir}/%{name}/
|
||||
%{_docdir}/%{name}/html/
|
||||
%dir %_docdir/%name/
|
||||
%_docdir/%name/html/
|
||||
|
||||
%files data
|
||||
%defattr(-, root, root)
|
||||
%dir %{_datadir}/icu/
|
||||
%dir %{_datadir}/icu/%{version}/
|
||||
%{_datadir}/icu/%{version}/unidata/
|
||||
%{_datadir}/icu/%{version}/UnicodeData.txt
|
||||
%dir %_datadir/icu/
|
||||
%dir %_datadir/icu/%version/
|
||||
%_datadir/icu/%version/unidata/
|
||||
%_datadir/icu/%version/UnicodeData.txt
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user