diff --git a/libarchive.changes b/libarchive.changes index 40dd84a..5c1bdd6 100644 --- a/libarchive.changes +++ b/libarchive.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Nov 24 16:22:02 UTC 2013 - andreas.stieger@gmx.de + +- add optional -static library package, intended to publish pixz + for CentOS / RHEL, default off +- skip some dependencies not required for pixz on CentOS / RHEL + ------------------------------------------------------------------- Tue Aug 20 05:34:09 UTC 2013 - crrodriguez@opensuse.org diff --git a/libarchive.spec b/libarchive.spec index 0e6244d..39e5bff 100644 --- a/libarchive.spec +++ b/libarchive.spec @@ -16,6 +16,18 @@ # +%if 0%{?centos_version} || 0%{?rhel_version} +%if 0%{?centos_version} <= 600 || 0%{?rhel_version <= 600} +%bcond_without static_libs +%bcond_with openssl +%bcond_with ext2fs +%endif +%else +%bcond_with static_libs +%bcond_without openssl +%bcond_without ext2fs +%endif + %define somajor 13 %define libname libarchive%{somajor} @@ -32,8 +44,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: libbz2-devel +%if %{with ext2fs} BuildRequires: libext2fs-devel +%endif +%if %{with openssl} BuildRequires: libopenssl-devel +%endif BuildRequires: libxml2-devel BuildRequires: pkg-config BuildRequires: xz-devel @@ -132,12 +148,29 @@ and 6. This package contains the development files. +%if %{with static_libs} +%package static +Requires: %{name}-devel = %{version} +Summary: static library for libarchive +Group: Development/Libraries/C and C++ + +%description static +static library for libarchive +%endif + %prep %setup -q +%if %{with openssl} %patch0 +%endif %build %global optflags %{optflags} -D_REENTRANT -pipe -%configure --disable-silent-rules --disable-static --enable-bsdcpio +%configure \ + --disable-silent-rules \ +%if ! %{with static_libs} + --disable-static \ +%endif + --enable-bsdcpio make %{?_smp_mflags} %check @@ -173,4 +206,10 @@ sed -i -e '/Libs.private/d' %{buildroot}%{_libdir}/pkgconfig/libarchive.pc %{_includedir}/archive* %{_libdir}/pkgconfig/libarchive.pc +%if %{with static_libs} +%files static +%defattr(-,root,root) +%{_libdir}/%{name}.a +%endif + %changelog