add bcond for PKCS#11 support

use make macros
epel10
Joe Orton 4 years ago
parent fb985937fd
commit 431cf87f3a

@ -1,19 +1,24 @@
%bcond_without tests %bcond_without tests
%if 0%{?fedora}
%bcond_without pkcs11
%else
%bcond_with pkcs11
%endif
Summary: An HTTP and WebDAV client library Summary: An HTTP and WebDAV client library
Name: neon Name: neon
Version: 0.31.2 Version: 0.31.2
Release: 5%{?dist} Release: 6%{?dist}
License: LGPLv2+ License: LGPLv2+
URL: https://notroj.github.io/neon/ URL: https://notroj.github.io/neon/
Source0: https://notroj.github.io/neon/neon-%{version}.tar.gz Source0: https://notroj.github.io/neon/neon-%{version}.tar.gz
Patch0: neon-0.27.0-multilib.patch Patch0: neon-0.27.0-multilib.patch
Patch1: neon-0.31.2-lesstests.patch Patch1: neon-0.31.2-lesstests.patch
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: expat-devel, openssl-devel, zlib-devel, krb5-devel, libproxy-devel BuildRequires: expat-devel, openssl-devel, zlib-devel, krb5-devel, libproxy-devel
BuildRequires: pkgconfig, pakchois-devel BuildRequires: pkgconfig, make
Requires: ca-certificates %if %{with pkcs11}
BuildRequires: pakchois-devel
%endif
%if %{with tests} %if %{with tests}
# SSL tests require openssl binary, PKCS#11 testing need certutil # SSL tests require openssl binary, PKCS#11 testing need certutil
BuildRequires: /usr/bin/perl, /usr/bin/openssl, /usr/bin/certutil BuildRequires: /usr/bin/perl, /usr/bin/openssl, /usr/bin/certutil
@ -51,11 +56,11 @@ export CC="%{__cc} -pthread"
--enable-warnings \ --enable-warnings \
--with-ssl=openssl --enable-threadsafe-ssl=posix \ --with-ssl=openssl --enable-threadsafe-ssl=posix \
--with-libproxy --with-libproxy
make %{?_smp_mflags} %make_build
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" %make_install
sed -ri "/^dependency_libs/{s,-l[^ ']*,,g}" \ sed -ri "/^dependency_libs/{s,-l[^ ']*,,g}" \
$RPM_BUILD_ROOT%{_libdir}/libneon.la $RPM_BUILD_ROOT%{_libdir}/libneon.la
@ -84,6 +89,10 @@ make %{?_smp_mflags} check
%{_libdir}/*.so %{_libdir}/*.so
%changelog %changelog
* Thu Feb 4 2021 Joe Orton <jorton@redhat.com> - 0.31.2-6
- add bcond for PKCS#11 support
- use make macros
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.31.2-5 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.31.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save