introduce compat-libs subpackage with older library

- to resolve problems with soname bump
- for packages requiring older xz-4.999.9beta
This commit is contained in:
Jindrich Novy 2010-10-26 10:26:11 +02:00
parent 796290b6e3
commit d0b81acc4d
3 changed files with 39 additions and 7 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
xz-5.0.0.tar.xz
xz-4.999.9beta.20100401git.tar.xz

View File

@ -1 +1,2 @@
5d4b128e1cefa301a232a4817bdbfc03 xz-5.0.0.tar.xz
b136554a69e1a7e6eb371302c0d75c06 xz-4.999.9beta.20100401git.tar.xz

40
xz.spec
View File

@ -1,11 +1,15 @@
%global compat_ver xz-4.999.9beta
Summary: LZMA compression utilities
Name: xz
Version: 5.0.0
Release: 2%{?dist}
Release: 3%{?dist}
License: LGPLv2+
Group: Applications/File
# source created as "make dist" in checked out GIT tree
# official upstream release
Source0: http://tukaani.org/%{name}/%{name}-%{version}.tar.xz
# source created as "make dist" in checked out GIT tree
Source1: %{compat_ver}.20100401git.tar.xz
URL: http://tukaani.org/%{name}/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{name}-libs = %{version}-%{release}
@ -28,6 +32,15 @@ License: LGPLv2+
%description libs
Libraries for decoding files compressed with LZMA or XZ utils.
%package compat-libs
Summary: Compatibility libraries for decoding LZMA compression
Group: System Environment/Libraries
License: LGPLv2+
%description compat-libs
Compatibility libraries for decoding files compressed with LZMA or XZ utils.
This particular package ships libraries from xz-%{compat_ver} as of 1st of April 2010.
%package devel
Summary: Devel libraries & headers for liblzma
Group: Development/Libraries
@ -52,7 +65,7 @@ The lzma-compat package contains compatibility links for older
commands that deal with the older LZMA format.
%prep
%setup -q
%setup -q -a1
%build
CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64" \
@ -60,9 +73,15 @@ CXXFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64" \
%configure --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
pushd %{compat_ver}
%configure --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
popd
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
@ -70,6 +89,7 @@ rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
rm -rf %{buildroot}%{_docdir}/%{name}
rm -rf %{buildroot}%{_datadir}/locale
cp -r %{compat_ver}/src/liblzma/.libs/liblzma.so.0* %{buildroot}%{_libdir}
%check
LD_LIBRARY_PATH=$PWD/src/liblzma/.libs make check
@ -90,7 +110,12 @@ rm -rf %{buildroot}
%files libs
%defattr(-,root,root,-)
%doc COPYING*
%{_libdir}/lib*.so.*
%{_libdir}/lib*.so.5*
%files compat-libs
%defattr(-,root,root,-)
%doc COPYING*
%{_libdir}/lib*.so.0*
%files devel
%defattr(-,root,root,-)
@ -106,6 +131,11 @@ rm -rf %{buildroot}
%{_mandir}/man1/*lz*
%changelog
* Mon Oct 25 2010 Jindrich Novy <jnovy@redhat.com> 5.0.0-3
- introduce compat-libs subpackage with older soname to
resolve problems with soname bump and for packages requiring
older xz-4.999.9beta
* Mon Oct 25 2010 Jindrich Novy <jnovy@redhat.com> 5.0.0-2
- rebuild