2013-11-25 13:18:05 +01:00
|
|
|
#
|
|
|
|
# spec file for package xz
|
|
|
|
#
|
2015-01-21 12:25:49 +01:00
|
|
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2013-11-25 13:18:05 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-09-23 10:40:06 +02:00
|
|
|
# avoid bootstrapping problem
|
|
|
|
%define _binary_payload w9.bzdio
|
2013-11-25 13:24:18 +01:00
|
|
|
%if 0%{?centos_version} || 0%{?rhel_version}
|
|
|
|
%if 0%{?centos_version} <= 600 || 0%{?rhel_version <= 600}
|
|
|
|
%bcond_without static_libs
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%bcond_with static_libs
|
|
|
|
%endif
|
2014-09-23 10:40:06 +02:00
|
|
|
%if 0%{?suse_version} < 1130
|
|
|
|
%define do_profiling 0
|
|
|
|
%endif
|
|
|
|
%ifarch aarch64 %{arm} %{sparc}
|
|
|
|
%define do_profiling 0
|
|
|
|
%endif
|
2013-11-25 13:18:05 +01:00
|
|
|
Name: xz
|
2015-02-28 09:37:57 +01:00
|
|
|
Version: 5.2.1
|
2014-09-23 10:40:06 +02:00
|
|
|
Release: 0
|
2013-11-25 13:18:05 +01:00
|
|
|
Summary: A Program for Compressing Files
|
|
|
|
License: LGPL-2.1+ and GPL-2.0+
|
|
|
|
Group: Productivity/Archiving/Compression
|
2013-11-25 13:24:18 +01:00
|
|
|
Url: http://tukaani.org/xz/
|
2013-11-25 13:18:05 +01:00
|
|
|
Source0: http://tukaani.org/xz/%{name}-%{version}.tar.gz
|
|
|
|
Source1: http://tukaani.org/xz/%{name}-%{version}.tar.gz.sig
|
|
|
|
Source2: baselibs.conf
|
2013-11-25 13:24:18 +01:00
|
|
|
# from http://tukaani.org/misc/lasse_collin_pubkey.txt#/xz.keyring
|
2013-11-25 13:18:05 +01:00
|
|
|
Source3: xz.keyring
|
|
|
|
BuildRequires: pkgconfig
|
2014-09-23 10:40:06 +02:00
|
|
|
Provides: lzma = %{version}
|
|
|
|
Obsoletes: lzma < %{version}
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-11-25 13:18:05 +01:00
|
|
|
%if 0%{?lang_package:1} > 0
|
2014-09-23 10:40:06 +02:00
|
|
|
Recommends: %{name}-lang
|
2013-11-25 13:18:05 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%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
|
|
|
|
Summary: LZMA library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n liblzma5
|
|
|
|
Library for encoding/decoding LZMA files.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development package for the LZMA library
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: liblzma5 = %{version}
|
2014-09-23 10:40:06 +02:00
|
|
|
Provides: lzma-devel = %{version}
|
|
|
|
Obsoletes: lzma-devel < %{version}
|
|
|
|
Provides: lzma-alpha-devel = %{version}
|
|
|
|
Obsoletes: lzma-alpha-devel < %{version}
|
2013-11-25 13:18:05 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the header files and libraries needed for
|
|
|
|
compiling programs using the LZMA library.
|
|
|
|
|
2013-11-25 13:24:18 +01:00
|
|
|
%if %{with static_libs}
|
2014-09-23 10:40:06 +02:00
|
|
|
|
2013-12-10 18:06:54 +01:00
|
|
|
%package static-devel
|
2013-11-25 13:24:18 +01:00
|
|
|
Summary: Static version of LZMA library
|
|
|
|
Group: Development/Libraries/C and C++
|
2014-09-23 10:40:06 +02:00
|
|
|
Requires: lzma-devel = %{version}
|
2013-11-25 13:24:18 +01:00
|
|
|
|
2013-12-10 18:06:54 +01:00
|
|
|
%description static-devel
|
2014-09-23 10:40:06 +02:00
|
|
|
Static library for the LZMA library
|
2013-11-25 13:24:18 +01:00
|
|
|
%endif
|
|
|
|
|
2013-11-25 13:18:05 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2014-12-19 10:38:38 +01:00
|
|
|
%global optflags %{optflags} -D_REENTRANT -pipe -fPIE
|
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
2013-11-25 13:24:18 +01:00
|
|
|
%configure \
|
|
|
|
%if ! %{with static_libs}
|
|
|
|
--disable-static \
|
|
|
|
%endif
|
|
|
|
--with-pic \
|
2014-09-23 10:40:06 +02:00
|
|
|
--docdir=%{_docdir}/%{name}
|
2013-11-25 13:18:05 +01:00
|
|
|
%if %{do_profiling}
|
2015-01-21 12:25:49 +01:00
|
|
|
profiledir=$(mktemp -d)
|
|
|
|
trap "rm -rf $profiledir" EXIT
|
|
|
|
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir"
|
2013-11-25 13:18:05 +01:00
|
|
|
time make check
|
2014-09-23 10:40:06 +02:00
|
|
|
make clean %{?_smp_mflags}
|
2015-01-21 12:25:49 +01:00
|
|
|
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir"
|
|
|
|
%else
|
2013-11-25 13:18:05 +01:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%check
|
|
|
|
time make check
|
|
|
|
|
|
|
|
%install
|
2014-09-23 10:40:06 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
|
|
rm -v %{buildroot}%{_libdir}/liblzma.la
|
2013-11-25 13:18:05 +01:00
|
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
%post -n liblzma5 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n liblzma5 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%if 0%{?lang_package:1} > 0
|
|
|
|
|
|
|
|
%files lang -f %{name}.lang
|
|
|
|
%defattr(-, root, root)
|
|
|
|
|
|
|
|
%files
|
2014-09-23 10:40:06 +02:00
|
|
|
%defattr(-,root,root)
|
2013-11-25 13:18:05 +01:00
|
|
|
%else
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%endif
|
|
|
|
%defattr(-, root, root)
|
2014-09-23 10:40:06 +02:00
|
|
|
%{_docdir}/%{name}
|
2013-11-25 13:18:05 +01:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_mandir}/man?/*
|
|
|
|
|
|
|
|
%files -n liblzma5
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_libdir}/lib*.so.5*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_includedir}/*.h
|
|
|
|
%{_includedir}/lzma
|
|
|
|
%{_libdir}/lib*.so
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
2013-11-25 13:24:18 +01:00
|
|
|
%if %{with static_libs}
|
2014-09-23 10:40:06 +02:00
|
|
|
|
2013-12-10 18:06:54 +01:00
|
|
|
%files static-devel
|
2013-11-25 13:24:18 +01:00
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_libdir}/*.a
|
|
|
|
%endif
|
|
|
|
|
2013-11-25 13:18:05 +01:00
|
|
|
%changelog
|