- add optional -static library package, intended to publish pixz for
CentOS / RHEL, default off OBS-URL: https://build.opensuse.org/package/show/Base:System/xz?expand=0&rev=61
This commit is contained in:
parent
43d70c1007
commit
9c36d60610
@ -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
|
||||
|
||||
|
42
xz.spec
42
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
|
||||
|
Loading…
Reference in New Issue
Block a user