%global compat_ver xz-4.999.9beta # Some old versions of pkg-config don't support the Url: field %global pkgconfig_ver %(pkg-config --version 2>/dev/null || echo 0.0) Summary: LZMA compression utilities Name: xz Version: 5.0.3 Release: 2.0.cf%{?dist} License: LGPLv2+ Group: Applications/File URL: http://tukaani.org/xz/ Source0: http://tukaani.org/xz/xz-%{version}.tar.bz2 # source created as "make dist" in checked out GIT tree Source1: %{compat_ver}.20100401git.tar.bz2 Patch100: xz-5.0.1-nourl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) Requires: xz-libs%{?_isa} = %{version}-%{release} %description XZ Utils are an attempt to make LZMA compression easy to use on free (as in freedom) operating systems. This is achieved by providing tools and libraries which are similar to use than the equivalents of the most popular existing compression algorithms. LZMA is a general purpose compression algorithm designed by Igor Pavlov as part of 7-Zip. It provides high compression ratio while keeping the decompression speed fast. %package libs Summary: Libraries for decoding LZMA compression Group: System Environment/Libraries 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 %{compat_ver} as of 1st of April 2010. %package devel Summary: Devel libraries & headers for liblzma Group: Development/Libraries License: LGPLv2+ Requires: xz-libs%{?_isa} = %{version}-%{release} # From Fedora 11, RHEL-6, pkgconfig dependency is auto-detected %if 0%{?fedora} < 11 && 0%{?rhel} < 6 Requires: pkgconfig %endif %description devel Devel libraries and headers for liblzma. %package lzma-compat Summary: Older LZMA format compatibility binaries Group: Development/Libraries # lz{grep,diff,more} are GPLv2+. Other binaries are LGPLv2+ License: GPLv2+ and LGPLv2+ Requires: xz%{?_isa} = %{version}-%{release} Obsoletes: lzma < %{version} Provides: lzma = %{version} %description lzma-compat The lzma-compat package contains compatibility links for older commands that deal with the older LZMA format. %prep %setup -q -a1 # pkg-config <= 0.15 barfs at URL tags in .pc files %if %(expr $(echo %{pkgconfig_ver} | sed -e 's/\\([.][^.]*\\)[.].*/\\1/g') '<=' 0.15) %patch100 -p1 -b .nourl %endif %build CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64" \ CXXFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64" \ %configure --disable-static sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ libtool make %{?_smp_mflags} cd %{compat_ver} %configure --disable-static sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ libtool make %{?_smp_mflags} cd - %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} INSTALL="install -p" # Install compat libraries cp -a %{compat_ver}/src/liblzma/.libs/liblzma.so.0* %{buildroot}%{_libdir}/ chmod g-w %{buildroot}%{_libdir}/liblzma.so.0* # Remove stuff we don't want packaged rm -f %{buildroot}%{_libdir}/*.a rm -f %{buildroot}%{_libdir}/*.la rm -rf %{buildroot}%{_docdir}/xz %find_lang xz %check LD_LIBRARY_PATH=$PWD/src/liblzma/.libs make check %clean rm -rf %{buildroot} %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %post compat-libs -p /sbin/ldconfig %postun compat-libs -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc AUTHORS COPYING* ChangeLog NEWS README THANKS TODO %{_bindir}/unxz %{_bindir}/xz %{_bindir}/xzcat %{_bindir}/xzcmp %{_bindir}/xzdec %{_bindir}/xzdiff %{_bindir}/xzegrep %{_bindir}/xzfgrep %{_bindir}/xzgrep %{_bindir}/xzless %{_bindir}/xzmore %{_mandir}/man1/unxz.1* %{_mandir}/man1/xz.1* %{_mandir}/man1/xzcat.1* %{_mandir}/man1/xzcmp.1* %{_mandir}/man1/xzdec.1* %{_mandir}/man1/xzdiff.1* %{_mandir}/man1/xzegrep.1* %{_mandir}/man1/xzfgrep.1* %{_mandir}/man1/xzgrep.1* %{_mandir}/man1/xzless.1* %{_mandir}/man1/xzmore.1* %files -f xz.lang libs %defattr(-,root,root,-) %doc COPYING* %{_libdir}/liblzma.so.5* %files compat-libs %defattr(-,root,root,-) %doc COPYING* %{_libdir}/liblzma.so.0* %files devel %defattr(-,root,root,-) %{_includedir}/lzma.h %{_includedir}/lzma/ %{_libdir}/liblzma.so %{_libdir}/pkgconfig/liblzma.pc %files lzma-compat %defattr(-,root,root,-) %{_bindir}/lzcat %{_bindir}/lzcmp %{_bindir}/lzdiff %{_bindir}/lzegrep %{_bindir}/lzfgrep %{_bindir}/lzgrep %{_bindir}/lzless %{_bindir}/lzma %{_bindir}/lzmadec %{_bindir}/lzmainfo %{_bindir}/lzmore %{_bindir}/unlzma %{_mandir}/man1/lzcat.1* %{_mandir}/man1/lzcmp.1* %{_mandir}/man1/lzdiff.1* %{_mandir}/man1/lzegrep.1* %{_mandir}/man1/lzfgrep.1* %{_mandir}/man1/lzgrep.1* %{_mandir}/man1/lzless.1* %{_mandir}/man1/lzma.1* %{_mandir}/man1/lzmadec.1* %{_mandir}/man1/lzmainfo.1* %{_mandir}/man1/lzmore.1* %{_mandir}/man1/unlzma.1* %changelog * Mon Jun 20 2011 Paul Howarth 5.0.3-2.0.cf - use bzipped tarball instead of gzipped one * Mon May 23 2011 Paul Howarth 5.0.3-1.0.cf - update to 5.0.3 - liblzma: a memory leak was fixed - liblzma: 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 - liblzma: 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 - liblzma: document that lzma_block_buffer_encode(), lzma_easy_buffer_encode(), lzma_stream_encoder(), and lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK - liblzma: 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. * Mon Apr 4 2011 Paul Howarth 5.0.2-1.0.cf - update to 5.0.2 - LZMA2 decompressor now correctly accepts LZMA2 streams with no uncompressed data - "xz --suffix=.foo filename.foo" now refuses to compress the file due to it already having the suffix .foo - "xzgrep -l foo bar.xz" works now - Polish translation was added - nobody else likes macros for commands * Wed Feb 9 2011 Paul Howarth 5.0.1-2.0.cf - remove URL tag from liblzma.pc if we have have pkgconfig <= 0.15 - drop explicit dependency of devel package on pkgconfig if rpm can auto-detect the requirement * Sat Jan 29 2011 Paul Howarth 5.0.1-1.0.cf - update to 5.0.1 - xz --force now (de)compresses files that have setuid, setgid, or sticky bit set and files that have multiple hard links; the man page had it documented this way already but the code had a bug - gzip and bzip2 support in xzdiff was fixed - portability fixes - Minor fix to Czech translation * Mon Oct 25 2010 Paul Howarth 5.0.0-4.0.cf - update to the new upstream release, with liblzma.so.5 - introduce compat-libs subpackage with liblzma.so.0 for compatibility with distributions using older releases * Sun Oct 17 2010 Paul Howarth 4.999.9-0.6.beta.212.gacbc - update to latest git snapshot * Tue Jun 8 2010 Paul Howarth 4.999.9-0.5.beta.20100401git - rebuild for i686 in RHEL-6 beta * Thu Apr 1 2010 Paul Howarth 4.999.9-0.4.beta.20100401git - sync with upstream (#578925) - add message translations, in libs package * Fri Feb 19 2010 Paul Howarth 4.999.9-0.3.beta.20091007git - move xz man pages to main package, leave lzma ones where they belong (#566484) * Sat Dec 26 2009 Paul Howarth 4.999.9-0.2.beta.20091007git - import from Fedora * Wed Oct 07 2009 Jindrich Novy 4.999.9-0.1.20091007.beta - sync with upstream again * Fri Oct 02 2009 Jindrich Novy 4.999.9-0.1.20091002.beta - sync with upstream to generate the same archives on machines with different endianess * Fri Aug 28 2009 Jindrich Novy 4.999.9-0.1.beta - update to 4.999.9beta * Mon Aug 17 2009 Jindrich Novy 4.999.8-0.10.beta.20090817git - sync with upstream because of #517806 * Tue Aug 04 2009 Jindrich Novy 4.999.8-0.9.beta.20090804git - update to the latest GIT snapshot * Mon Jul 27 2009 Fedora Release Engineering - 4.999.8-0.8.beta - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Fri Jul 17 2009 Bill Nottingham 4.999.8-0.7.beta - tweak summary - add %%check section () * Thu Jul 09 2009 Bill Nottingham 4.999.8-0.6.beta - fix release versioning to match guidelines - fix up lzma-compat summary/description - tweak licensing * Mon Jun 22 2009 Jindrich Novy 4.999.8beta-0.5 - introduce lzma-compat subpackage * Fri Jun 19 2009 Jindrich Novy 4.999.8beta-0.4 - try to not to conflict with lzma * Thu Jun 18 2009 Jindrich Novy 4.999.8beta-0.3 - obsolete but don't provide lzma, they are largely incompatible - put beta to Release * Wed Jun 17 2009 Jindrich Novy 4.999.8beta-0.2 - obsolete old lzma - add Requires: pkgconfig * Tue Jun 16 2009 Jindrich Novy 4.999.8beta-0.1 - package XZ Utils, based on LZMA Utils packaged by Per Patrice Bouchand