From 8896b672c4e78b999b24537b7a366935acae294c Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 18 Aug 2017 18:02:13 +0100 Subject: [PATCH] Problem: RPM build does not pass correct configure options Solution: fix it --- packaging/redhat/zeromq.spec | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/packaging/redhat/zeromq.spec b/packaging/redhat/zeromq.spec index a140a32b..ed5b66a9 100644 --- a/packaging/redhat/zeromq.spec +++ b/packaging/redhat/zeromq.spec @@ -24,9 +24,26 @@ BuildRequires: autoconf automake libtool libsodium-devel glib2-devel BuildRequires: e2fsprogs-devel BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %endif +%bcond_with pgm %if %{with pgm} BuildRequires: openpgm-devel +%define PGM yes +%else +%define PGM no +%endif +%bcond_with libgssapi_krb5 +%if %{with libgssapi_krb5} BuildRequires: krb5-devel +%define GSSAPI yes +%else +%define GSSAPI no +%endif +%bcond_with libsodium +%if %{with libsodium} +BuildRequires: libsodium-devel +%define SODIUM yes +%else +%define SODIUM no %endif BuildRequires: gcc, make, gcc-c++, libstdc++-devel, asciidoc, xmlto Requires: libstdc++ @@ -126,12 +143,9 @@ sed -i "s/openpgm-[0-9].[0-9]/%{openpgm_pc}/g" \ %build autoreconf -fi %configure --enable-drafts=%{DRAFTS} \ - %{?_with_libsodium} \ - %{?_without_libsodium} \ - %{?_with_pgm} \ - %{?_without_pgm} \ - %{?_with_libgssapi_krb5} \ - %{?_without_libgssapi_krb5} \ + --with-pgm=%{PGM} \ + --with-libsodium=%{SODIUM} \ + --with-libgssapi_krb5=%{GSSAPI} \ %{?_with_pic} \ %{?_without_pic} \ %{?_with_gnu_ld} \