summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-sabre-xml2.spec8
1 files 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