Accepting request 210580 from Archiving

- add optional -static-devel library package, intended to publish pixz
  for CentOS / RHEL, default off
- skip some dependencies not required for pixz on CentOS / RHEL

OBS-URL: https://build.opensuse.org/request/show/210580
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libarchive?expand=0&rev=15
This commit is contained in:
Stephan Kulow 2013-12-13 12:06:36 +00:00 committed by Git OBS Bridge
commit 18f8ac6a7b
2 changed files with 47 additions and 1 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Nov 24 16:22:02 UTC 2013 - andreas.stieger@gmx.de
- add optional -static-devel 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

View File

@ -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-devel
Requires: %{name}-devel = %{version}
Summary: static library for libarchive
Group: Development/Libraries/C and C++
%description static-devel
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 %{without 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-devel
%defattr(-,root,root)
%{_libdir}/%{name}.a
%endif
%changelog