xz/xz.spec
Stephan Kulow 232099483e - Update to version 5.0.3
* liblzma fixes:
        - A memory leak was fixed.
        - lzma_stream_buffer_encode() no longer creates an empty .xz
          Block if encoding an empty buffer. Such an empty Block with
          LZMA2 data would trigger a bug in 5.0.1 and older (see the
          first bullet point in 5.0.2 notes). When releasing 5.0.2,
          I thought that no encoder creates this kind of files but
          I was wrong.
        - Validate function arguments better in a few functions. Most
          importantly, specifying an unsupported integrity check to
          lzma_stream_buffer_encode() no longer creates a corrupt .xz
          file. Probably no application tries to do that, so this
          shouldn't be a big problem in practice.
        - Document that lzma_block_buffer_encode(),
          lzma_easy_buffer_encode(), lzma_stream_encoder(), and
          lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
        - The return values of the _memusage() functions are now
          documented better.
    * Fix command name detection in xzgrep. xzegrep and xzfgrep now
      correctly use egrep and fgrep instead of grep.
    * French translation was added.

OBS-URL: https://build.opensuse.org/package/show/Base:System/xz?expand=0&rev=26
2011-06-08 19:26:22 +00:00

136 lines
3.7 KiB
RPMSpec

#
# spec file for package xz
#
# Copyright (c) 2011 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: xz
Summary: A Program for Compressing Files
Version: 5.0.3
Release: 1
Group: Productivity/Archiving/Compression
License: LGPLv2.1+
Url: http://tukaani.org/lzma/
Source: %{name}-%{version}.tar.bz2
Source2: baselibs.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkg-config
Provides: lzma = %version
Obsoletes: lzma < %version
# avoid bootstrapping problem
%define _binary_payload w9.bzdio
%description
The xz command is a very powerful program for compressing files.
* Average compression ratio of LZMA is about 30% better than that of
gzip, and 15% better than that of bzip2.
* Decompression speed is only little slower than that of gzip, being
two to five times faster than bzip2.
* In fast mode, compresses faster than bzip2 with a comparable
compression ratio.
* Achieving the best compression ratios takes four to even twelve
times longer than with bzip2. However. this doesn't affect
decompressing speed.
* Very similar command line interface to what gzip and bzip2 have.
%lang_package
%package -n liblzma5
License: LGPLv2.1+
Summary: LZMA library
Group: System/Libraries
%description -n liblzma5
Library for encoding/decoding LZMA files.
%package devel
License: LGPLv2.1+
Summary: Development package for the LZMA library
Group: Development/Libraries/C and C++
Requires: liblzma5 = %{version}
Provides: lzma-devel = %version
Obsoletes: lzma-devel < %version
Provides: lzma-alpha-devel = %version
Obsoletes: lzma-alpha-devel < %version
%description devel
This package contains the header files and libraries needed for
compiling programs using the LZMA library.
%prep
%setup -q
%build
AUTOPOINT=true autoreconf -fiv
%if %{do_profiling}
profiledir=$(mktemp -d)
trap "rm -rf $profiledir" EXIT
export CFLAGS="%optflags %{cflags_profile_generate}=$profiledir"
%endif
%configure --libdir=/%{_lib} --disable-static --with-pic --docdir=%_docdir/%name
make %{?_smp_mflags}
%if %{do_profiling}
time make check
make clean
export CFLAGS="%optflags %{cflags_profile_feedback}=$profiledir"
%configure --libdir=/%{_lib} --disable-static --with-pic --docdir=%_docdir/%name
make %{?_smp_mflags}
%endif
%check
time make check
%install
make install DESTDIR=$RPM_BUILD_ROOT
%{__mkdir_p} %{buildroot}%{_libdir}
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/liblzma.so) %{buildroot}%{_libdir}/liblzma.so
%{__mv} -v %{buildroot}/%{_lib}/pkgconfig %{buildroot}%{_libdir}
%{__rm} -v %{buildroot}/%{_lib}/liblzma.{so,la}
%find_lang %{name}
%clean
rm -fr $RPM_BUILD_ROOT
%post -n liblzma5 -p /sbin/ldconfig
%postun -n liblzma5 -p /sbin/ldconfig
%files
%defattr(-, root, root)
%_docdir/%name
%{_bindir}/*
%{_mandir}/man?/*
%files lang -f %{name}.lang
%files -n liblzma5
%defattr(-, root, root)
/%{_lib}/lib*.so.5*
%files devel
%defattr(-, root, root)
%{_includedir}/*.h
%{_includedir}/lzma
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%changelog