summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-11-05 14:04:37 +0100
committerRemi Collet <remi@remirepo.net>2020-11-05 14:04:37 +0100
commitac35bf9e4a1d04b4fec70ea2c13fbe898fbccfb3 (patch)
tree242a91a499831f2c9382dece61baa9bbda03ece2
parentb64f5ecf55896710874aaa47504149d125f84743 (diff)
use bcond
-rw-r--r--php-pecl-mongodb.spec6
1 files changed, 3 insertions, 3 deletions
diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec
index a7bf5be..bacc5fc 100644
--- a/php-pecl-mongodb.spec
+++ b/php-pecl-mongodb.spec
@@ -23,7 +23,7 @@
%global ini_name 50-%{pecl_name}.ini
# test suite requires a MongoDB server
-%global with_tests 0%{?_with_tests:1}
+%bcond_with tests
# temp for EL-8 until available in EPEL
%if 0%{?fedora} >= 31 || 0%{?rhel} >= 8
@@ -72,7 +72,7 @@ Provides: bundled(libbson) = %{libmongo}
Provides: bundled(mongo-c-driver) = %{libmongo}
Provides: bundled(libmongocrypt) = %{libcrypt}
%endif
-%if %{with_tests}
+%if %{with tests}
BuildRequires: mongodb-server
%endif
@@ -271,7 +271,7 @@ OPT="-n"
--modules | grep %{pecl_name}
%endif
-%if %{with_tests}
+%if %{with tests}
ret=0
%global mongo_version %(mongod --version | sed -n '/db version/{s/.*v//;p}' 2>/dev/null)