diff mbox

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

Message ID 2897ea63-deca-2304-f2ce-8a1a778d02d6@suse.de (mailing list archive)
State Accepted
Headers show

Commit Message

Nicolas Morey-Chaisemartin Nov. 8, 2017, 2:31 p.m. UTC
Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
---
 suse/rdma-core.spec | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox

Patch

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