8946b8
# Not needed for f21+ and probably RHEL8+
8946b8
%{!?_licensedir:%global license %%doc}
8946b8
8946b8
Summary:	LZMA compression utilities
8946b8
Name:		xz
8946b8
Version:	5.2.4
8946b8
Release:	3%{?dist}
8946b8
8946b8
# Scripts xz{grep,diff,less,more} and symlinks (copied from gzip) are
8946b8
# GPLv2+, binaries are Public Domain (linked against LGPL getopt_long but its
8946b8
# OK), documentation is Public Domain.
8946b8
License:	GPLv2+ and Public Domain
8946b8
# official upstream release
8946b8
Source0:	http://tukaani.org/%{name}/%{name}-%{version}.tar.xz
8946b8
8946b8
Source100:	colorxzgrep.sh
8946b8
Source101:	colorxzgrep.csh
8946b8
8946b8
URL:		http://tukaani.org/%{name}/
8946b8
Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
8946b8
8946b8
# For /usr/libexec/grepconf.sh (RHBZ#1189120).
8946b8
# Unfortunately F21 has a newer version of grep which doesn't
8946b8
# have grepconf, but we're only concerned with F22 here.
8946b8
Requires:	grep >= 2.20-5
8946b8
8946b8
BuildRequires:	gcc
8946b8
BuildRequires:	perl-interpreter
8946b8
8946b8
8946b8
%description
8946b8
XZ Utils are an attempt to make LZMA compression easy to use on free (as in
8946b8
freedom) operating systems. This is achieved by providing tools and libraries
8946b8
which are similar to use than the equivalents of the most popular existing
8946b8
compression algorithms.
8946b8
8946b8
LZMA is a general purpose compression algorithm designed by Igor Pavlov as
8946b8
part of 7-Zip. It provides high compression ratio while keeping the
8946b8
decompression speed fast.
8946b8
8946b8
8946b8
%package 	libs
8946b8
Summary:	Libraries for decoding LZMA compression
8946b8
License:	Public Domain
8946b8
Obsoletes:	%{name}-compat-libs < %{version}-%{release}
8946b8
8946b8
%description 	libs
8946b8
Libraries for decoding files compressed with LZMA or XZ utils.
8946b8
8946b8
8946b8
%package 	static
8946b8
Summary:	Statically linked library for decoding LZMA compression
8946b8
License:	Public Domain
8946b8
8946b8
%description 	static
8946b8
Statically linked library for decoding files compressed with LZMA or
8946b8
XZ utils.  Most users should *not* install this.
8946b8
8946b8
8946b8
%package 	devel
8946b8
Summary:	Devel libraries & headers for liblzma
8946b8
License:	Public Domain
8946b8
Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
8946b8
8946b8
%description	devel
8946b8
Devel libraries and headers for liblzma.
8946b8
8946b8
8946b8
%package 	lzma-compat
8946b8
Summary:	Older LZMA format compatibility binaries
8946b8
# Just a set of symlinks to 'xz' + two Public Domain binaries.
8946b8
License:	Public Domain
8946b8
Requires:	%{name}%{?_isa} = %{version}-%{release}
8946b8
Obsoletes:	lzma < %{version}
8946b8
Provides:	lzma = %{version}
8946b8
8946b8
%description	lzma-compat
8946b8
The lzma-compat package contains compatibility links for older
8946b8
commands that deal with the older LZMA format.
8946b8
8946b8
8946b8
%prep
8946b8
%autosetup
8946b8
8946b8
8946b8
%build
8946b8
export CFLAGS="%optflags"
8946b8
8946b8
%ifarch %{power64}
8946b8
  CFLAGS="$CFLAGS -O3"
8946b8
%endif
8946b8
8946b8
%ifarch %ix86
8946b8
  # rhbz#1630650, annocheck reports the following message because liblzma uses
8946b8
  # crc*_x86.S asm code on i686:
8946b8
  CFLAGS="$CFLAGS -Wa,--generate-missing-build-notes=yes"
8946b8
%endif
8946b8
8946b8
%configure
8946b8
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
8946b8
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
8946b8
%make_build
8946b8
8946b8
8946b8
%install
8946b8
%make_install
8946b8
rm -f %{buildroot}%{_libdir}/*.la
8946b8
8946b8
# xzgrep colorization
8946b8
%global profiledir %{_sysconfdir}/profile.d
8946b8
mkdir -p %{buildroot}%{profiledir}
8946b8
install -p -m 644 %{SOURCE100} %{buildroot}%{profiledir}
8946b8
install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir}
8946b8
8946b8
%find_lang %name
8946b8
8946b8
8946b8
%check
8946b8
LD_LIBRARY_PATH=$PWD/src/liblzma/.libs make check
8946b8
8946b8
%ldconfig_scriptlets libs
8946b8
8946b8
8946b8
%files -f %{name}.lang
8946b8
%license %{_pkgdocdir}/COPYING*
8946b8
%doc %{_pkgdocdir}
8946b8
%exclude %_pkgdocdir/examples*
8946b8
%{_bindir}/*xz*
8946b8
%{_mandir}/man1/*xz*
8946b8
%{profiledir}/*
8946b8
8946b8
8946b8
%files libs
8946b8
%license %{_pkgdocdir}/COPYING
8946b8
%{_libdir}/lib*.so.5*
8946b8
8946b8
8946b8
%files static
8946b8
%license %{_pkgdocdir}/COPYING
8946b8
%{_libdir}/liblzma.a
8946b8
8946b8
8946b8
%files devel
8946b8
%dir %{_includedir}/lzma
8946b8
%{_includedir}/lzma/*.h
8946b8
%{_includedir}/lzma.h
8946b8
%{_libdir}/*.so
8946b8
%{_libdir}/pkgconfig/liblzma.pc
8946b8
%doc %_pkgdocdir/examples*
8946b8
8946b8
8946b8
%files lzma-compat
8946b8
%{_bindir}/*lz*
8946b8
%{_mandir}/man1/*lz*
8946b8
8946b8
8946b8
%changelog
8946b8
* Thu Nov 22 2018 Pavel Raiskup <praiskup@redhat.com> - 5.2.4-3
8946b8
- fix annocheck failures on i686 (rhbz#1630650)
8946b8
8946b8
* Wed May 09 2018 Pavel Raiskup <praiskup@redhat.com> - 5.2.4-2
8946b8
- drop ppc64p7 hack, per fedora devel list discussion:
8946b8
  https://lists.fedoraproject.org/archives/list/
8946b8
  devel@lists.fedoraproject.org/thread/2OWD2QRDFBEC6HTPVQ7FMJENH32BWT54/
8946b8
- don't explicitly set _FILE_OFFSET_BITS, package uses AC_SYS_LARGEFILE
8946b8
8946b8
* Tue May 08 2018 Pavel Raiskup <praiskup@redhat.com> - 5.2.4-1
8946b8
- rebase to 5.2.4 (rhbz#1574039), per release notes:
8946b8
  https://www.mail-archive.com/xz-devel@tukaani.org/msg00295.html
8946b8
8946b8
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.3-7
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8946b8
8946b8
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5.2.3-6
8946b8
- Switch to %%ldconfig_scriptlets
8946b8
8946b8
* Wed Sep 13 2017 Vasiliy N. Glazov <vascom2@gmail.com> - 5.2.3.-5
8946b8
- Cleanup spec
8946b8
8946b8
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.3-4
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
8946b8
8946b8
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.3-3
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8946b8
8946b8
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.3-2
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8946b8
8946b8
* Mon Jan 02 2017 Pavel Raiskup <praiskup@redhat.com> - 5.2.3-1
8946b8
- rebase to stable 5.2.3 per release notes:
8946b8
  http://www.mail-archive.com/xz-devel@tukaani.org/msg00285.html
8946b8
8946b8
* Mon Nov 28 2016 Lubomir Rintel <lkundrak@v3.sk> - 5.2.2-3
8946b8
- Fix FTBFS by requiring Perl
8946b8
8946b8
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.2-2
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8946b8
8946b8
* Tue Sep 29 2015 Pavel Raiskup <praiskup@redhat.com> - 5.2.2-1
8946b8
- rebase to stable 5.2.2 per release notes:
8946b8
  http://www.mail-archive.com/xz-devel@tukaani.org/msg00244.html
8946b8
8946b8
* Thu Jul 09 2015 Pavel Raiskup <praiskup@redhat.com> - 5.2.1-3
8946b8
- remove xz-compat-libs as it is not necessary (#1179193)
8946b8
8946b8
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.1-2
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8946b8
8946b8
* Fri Feb 27 2015 Pavel Raiskup <praiskup@redhat.com> - 5.2.1-1
8946b8
- bugfix rebase to 5.2.1, per release notes
8946b8
  http://www.mail-archive.com/xz-devel@tukaani.org/msg00226.html
8946b8
8946b8
* Wed Feb 04 2015 Richard W.M. Jones <rjones@redhat.com> - 5.2.0-2
8946b8
- Depend on grep that contains grepconf.sh (#1189120)
8946b8
8946b8
* Tue Dec 23 2014 Pavel Raiskup <praiskup@redhat.com> - 5.2.0-1
8946b8
- rebase per upstream release notes (#1023718)
8946b8
  http://www.mail-archive.com/xz-devel@tukaani.org/msg00216.html
8946b8
- fedora-review fixes, documentation/license fixes in spec
8946b8
8946b8
* Tue Aug 26 2014 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-15alpha
8946b8
- xz*grep's output is colored iff grep's is (#1034846)
8946b8
8946b8
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-14alpha
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
8946b8
8946b8
* Wed Aug  6 2014 Tom Callaway <spot@fedoraproject.org> - 5.1.2-13alpha
8946b8
- fix license handling
8946b8
8946b8
* Fri Jun 13 2014 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-12alpha
8946b8
- xzgrep: return 0 when at least one file matches (#1109122)
8946b8
8946b8
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-11alpha
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8946b8
8946b8
* Sat May 31 2014 Peter Robinson <pbrobinson@fedoraproject.org> 5.1.2-10alpha
8946b8
- Drop ChangeLog, it's big and the excitement is summarised in NEWS
8946b8
8946b8
* Fri May 16 2014 Richard W.M. Jones <rjones@redhat.com> - 5.1.2-9alpha
8946b8
- Add a -static subpackage (see RHBZ#547011).
8946b8
8946b8
* Wed Apr 02 2014 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-8alpha
8946b8
- add _isa requirements where appropriate
8946b8
- better check the version of less binary (#1015924)
8946b8
8946b8
* Fri Jan 10 2014 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-7alpha
8946b8
- build with -O3 on ppc64 (private #1051078)
8946b8
8946b8
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-6alpha
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8946b8
8946b8
* Tue Apr 09 2013 Pavel Raiskup <praiskup@redhat.com> - 5.1.2-5alpha
8946b8
- fix manual page inconsistencies with help output (private #948533)
8946b8
- enable/fix the 'xzgrep -h' (private #850898)
8946b8
8946b8
* Thu Feb 21 2013 Karsten Hopp <karsten@redhat.com> 5.1.2-4alpha
8946b8
- add support for ppc64p7 arch (Power7 optimized)
8946b8
8946b8
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-3alpha
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8946b8
8946b8
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.2-2alpha
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8946b8
8946b8
* Thu Jul 05 2012 Jindrich Novy <jnovy@redhat.com> 5.1.2alpha-1
8946b8
- update to 5.1.2alpha
8946b8
8946b8
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.1-2alpha
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8946b8
8946b8
* Sun Oct 16 2011 Jindrich Novy <jnovy@redhat.com> 5.1.1alpha-1
8946b8
- update to 5.1.1alpha
8946b8
8946b8
* Mon Jun 20 2011 Jindrich Novy <jnovy@redhat.com> 5.0.3-2
8946b8
- better to have upstream tarballs in different formats than XZ
8946b8
  to allow bootstrapping (#714765)
8946b8
8946b8
* Mon May 23 2011 Jindrich Novy <jnovy@redhat.com> 5.0.3-1
8946b8
- update to 5.0.3
8946b8
8946b8
* Mon Apr 04 2011 Jindrich Novy <jnovy@redhat.com> 5.0.2-1
8946b8
- update to 5.0.2
8946b8
8946b8
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.1-2
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8946b8
8946b8
* Sat Jan 29 2011 Jindrich Novy <jnovy@redhat.com> 5.0.1-1
8946b8
- update to 5.0.1
8946b8
8946b8
* Tue Oct 26 2010 Jindrich Novy <jnovy@redhat.com> 5.0.0-4
8946b8
- call ldconfig for compat-libs and fix description
8946b8
8946b8
* Mon Oct 25 2010 Jindrich Novy <jnovy@redhat.com> 5.0.0-3
8946b8
- introduce compat-libs subpackage with older soname to
8946b8
  resolve problems with soname bump and for packages requiring
8946b8
  older xz-4.999.9beta
8946b8
8946b8
* Mon Oct 25 2010 Jindrich Novy <jnovy@redhat.com> 5.0.0-2
8946b8
- rebuild
8946b8
8946b8
* Mon Oct 25 2010 Jindrich Novy <jnovy@redhat.com> 5.0.0-1
8946b8
- update to the new upstream release
8946b8
8946b8
* Sat Oct 16 2010 Jindrich Novy <jnovy@redhat.com> 4.999.9-0.3.beta.212.gacbc
8946b8
- update to latest git snapshot
8946b8
8946b8
* Thu Apr 01 2010 Jindrich Novy <jnovy@redhat.com> 4.999.9-0.2.20100401.beta
8946b8
- sync with upstream (#578925)
8946b8
8946b8
* Thu Feb 18 2010 Jindrich Novy <jnovy@redhat.com> 4.999.9-0.2.20091007.beta
8946b8
- move xz man pages to main package, leave lzma ones where they belong (#566484)
8946b8
8946b8
* Wed Oct 07 2009 Jindrich Novy <jnovy@redhat.com> 4.999.9-0.1.20091007.beta
8946b8
- sync with upstream again
8946b8
8946b8
* Fri Oct 02 2009 Jindrich Novy <jnovy@redhat.com> 4.999.9-0.1.20091002.beta
8946b8
- sync with upstream to generate the same archives on machines with different
8946b8
  endianess
8946b8
8946b8
* Fri Aug 28 2009 Jindrich Novy <jnovy@redhat.com> 4.999.9-0.1.beta
8946b8
- update to 4.999.9beta
8946b8
8946b8
* Mon Aug 17 2009 Jindrich Novy <jnovy@redhat.com> 4.999.8-0.10.beta.20090817git
8946b8
- sync with upstream because of #517806
8946b8
8946b8
* Tue Aug 04 2009 Jindrich Novy <jnovy@redhat.com> 4.999.8-0.9.beta.20090804git
8946b8
- update to the latest GIT snapshot
8946b8
8946b8
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.999.8-0.8.beta
8946b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8946b8
8946b8
* Fri Jul 17 2009 Bill Nottingham <notting@redhat.com> 4.999.8-0.7.beta
8946b8
- tweak summary
8946b8
- add %%check section (<tibbs@math.uh.edu>)
8946b8
 
8946b8
* Thu Jul 09 2009 Bill Nottingham <notting@redhat.com> 4.999.8-0.6.beta
8946b8
- fix release versioning to match guidelines
8946b8
- fix up lzma-compat summary/description
8946b8
- tweak licensing
8946b8
8946b8
* Mon Jun 22 2009 Jindrich Novy <jnovy@redhat.com> 4.999.8beta-0.5
8946b8
- introduce lzma-compat subpackage
8946b8
8946b8
* Fri Jun 19 2009 Jindrich Novy <jnovy@redhat.com> 4.999.8beta-0.4
8946b8
- try to not to conflict with lzma
8946b8
8946b8
* Thu Jun 18 2009 Jindrich Novy <jnovy@redhat.com> 4.999.8beta-0.3
8946b8
- obsolete but don't provide lzma, they are largely incompatible
8946b8
- put beta to Release
8946b8
8946b8
* Wed Jun 17 2009 Jindrich Novy <jnovy@redhat.com> 4.999.8beta-0.2
8946b8
- obsolete old lzma
8946b8
- add Requires: pkgconfig
8946b8
8946b8
* Tue Jun 16 2009 Jindrich Novy <jnovy@redhat.com> 4.999.8beta-0.1
8946b8
- package XZ Utils, based on LZMA Utils packaged by Per Patrice Bouchand