[PATCH rdma-core 1/4] suse: add a bcond to disable usage of curl-mini

Nicolas Morey-Chaisemartin
2017-11-08T14:31:20Z

suse/rdma-core.spec | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/suse/rdma-core.spec b/suse/rdma-core.spec
index 03c4a296..4f3638f3 100644
--- a/suse/rdma-core.spec
+++ b/suse/rdma-core.spec
@@ -77,9 +77,21 @@ Obsoletes: rdma < %{version}
Provides: ofed = %{version}
Obsoletes: ofed < %{version}

+# Trickery to handle both SUSE OpenBuild System and Manual build
+# In OBS, rdma-core must use curl-mini instead of curl to avoid
+# a build dependency loop:
+# rdma-core -> cmake -> curl -> ... -> boost -> rdma-core
+# Thus we force a BuildRequires to curl-mini which as no impact
+# as it is not used during the build.
+# However curl-mini is not a published RPM. This would prevent any build
+# outside of OBS. Thus we add a bcond to allow manual build.
+# To force build without the use of curl-mini, --without=curlmini
+# should be passed to rpmbuild
%if 0%{?suse_version} >= 1330
+%if %{with curlmini}
BuildRequires: curl-mini
%endif
+%endif

# Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags
# which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style