From e3802c7f4716c1b85f5a205e945cfea57407e0fc Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 5 Oct 2020 10:19:05 +0200
Subject: bcond

---
 php-sabre-xml2.spec | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/php-sabre-xml2.spec b/php-sabre-xml2.spec
index 3a88eb1..72bce3e 100644
--- a/php-sabre-xml2.spec
+++ b/php-sabre-xml2.spec
@@ -6,6 +6,9 @@
 #
 # Please, preserve the changelog entries
 #
+
+%bcond_without      tests
+
 # Github
 %global gh_commit    c3b959f821c19b36952ec4a595edd695c216bfc6
 %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
@@ -18,7 +21,6 @@
 %global ns_vendor    Sabre
 %global ns_project   Xml
 %global major        2
-%global with_tests   0%{!?_without_tests:1}
 
 Name:           php-%{pk_vendor}-%{pk_project}%{major}
 Summary:        XML library that you may not hate
@@ -32,7 +34,7 @@ Source0:        %{name}-%{version}-%{gh_short}.tgz
 Source1:        makesrc.sh
 
 BuildArch:      noarch
-%if %{with_tests}
+%if %{with tests}
 BuildRequires:  php(language) >= 7.1
 BuildRequires:  php-xmlwriter
 BuildRequires:  php-xmlreader
@@ -123,7 +125,7 @@ cp -pr lib %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}
 
 
 %check
-%if %{with_tests}
+%if %{with tests}
 mkdir vendor
 cat << 'EOF' | tee vendor/autoload.php
 <?php
-- 
cgit