diff --git a/xz.changes b/xz.changes index d4e115b..e5d8c2c 100644 --- a/xz.changes +++ b/xz.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Nov 24 16:25:53 UTC 2013 - andreas.stieger@gmx.de + +- add optional -static library package, intended to publish pixz for + CentOS / RHEL, default off + ------------------------------------------------------------------- Wed Oct 16 08:53:16 UTC 2013 - mvyskocil@suse.com diff --git a/xz.spec b/xz.spec index 62e1c7e..9f5c3fc 100644 --- a/xz.spec +++ b/xz.spec @@ -16,16 +16,25 @@ # +%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 + Name: xz Summary: A Program for Compressing Files License: LGPL-2.1+ and GPL-2.0+ Group: Productivity/Archiving/Compression Version: 5.0.5 Release: 0 -Url: http://tukaani.org/lzma/ +Url: http://tukaani.org/xz/ Source0: http://tukaani.org/xz/%{name}-%{version}.tar.gz Source1: http://tukaani.org/xz/%{name}-%{version}.tar.gz.sig Source2: baselibs.conf +# from http://tukaani.org/misc/lasse_collin_pubkey.txt#/xz.keyring Source3: xz.keyring BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pkgconfig @@ -85,22 +94,43 @@ Obsoletes: lzma-alpha-devel < %version This package contains the header files and libraries needed for compiling programs using the LZMA library. +%if %{with static_libs} +%package static +Summary: Static version of LZMA library +Group: Development/Libraries/C and C++ +Requires: lzma-devel = %version + +%description static +Static library for the LZMA library +%endif + %prep %setup -q %build +%global optflags %{optflags} -D_REENTRANT -pipe %if %{do_profiling} profiledir=$(mktemp -d) trap "rm -rf $profiledir" EXIT export CFLAGS="%optflags %{cflags_profile_generate}=$profiledir" %endif -%configure --disable-static --with-pic --docdir=%_docdir/%name +%configure \ +%if ! %{with static_libs} + --disable-static \ +%endif + --with-pic \ + --docdir=%_docdir/%name make %{?_smp_mflags} %if %{do_profiling} time make check make clean export CFLAGS="%optflags %{cflags_profile_feedback}=$profiledir" -%configure --disable-static --with-pic --docdir=%_docdir/%name +%configure \ +%if ! %{with static_libs} + --disable-static \ +%endif + --with-pic \ + --docdir=%_docdir/%name make %{?_smp_mflags} %endif @@ -143,4 +173,10 @@ make install DESTDIR=$RPM_BUILD_ROOT %{_libdir}/lib*.so %{_libdir}/pkgconfig/*.pc +%if %{with static_libs} +%files static +%defattr(-, root, root) +%{_libdir}/*.a +%endif + %changelog