summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcouchbase.spec24
1 files changed, 20 insertions, 4 deletions
diff --git a/libcouchbase.spec b/libcouchbase.spec
index 0ed8d6e..b49e89d 100644
--- a/libcouchbase.spec
+++ b/libcouchbase.spec
@@ -32,7 +32,7 @@ Name: %{libname}%{soname}
Name: %{libname}
%endif
Version: 3.0.7
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Couchbase client library
Group: System Environment/Libraries
License: ASL 2.0
@@ -190,25 +190,38 @@ gcc --version
-DLCB_BUILD_DTRACE=OFF \
%endif
-DLCB_NO_MOCK=1 \
- -DLCB_PLUGINS_DIR:STRING=%{name} \
- -B . -S .
+ -DLCB_PLUGINS_DIR:STRING=%{name}
+%if 0%{?cmake_build:1}
+%cmake_build
+%else
make %{?_smp_mflags} V=1
+%endif
%install
%{?dtsenable}
+%if 0%{?cmake_install:1}
+%cmake_install
+%else
make install DESTDIR=%{buildroot}
+%endif
%check
%if %{with tests}
%{?dtsenable}
-# ARGS needed to pass arguments to ctest
export CTEST_OUTPUT_ON_FAILURE=1
+%if 0%{?cmake_build:1}
+%cmake_build --target alltests
+%ctest
+%else
+# ARGS needed to pass arguments to ctest
make %{_smp_mflags} alltests test ARGS=%{_smp_mflags}
+%endif
+
%else
: check disabled
%endif
@@ -253,6 +266,9 @@ make %{_smp_mflags} alltests test ARGS=%{_smp_mflags}
%changelog
+* Tue Jan 12 2021 Sergey Avseyev <sergey.avseyev@gmail.com> - 3.0.7-2
+- Use cmake macros for build, install and test steps
+
* Wed Dec 16 2020 Remi Collet <remi@remirepo.net> - 3.0.7-1
- update to 3.0.7
- drop patch merged upstream