From 24b54c389eb553228631e278c99fda7849d7d129 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 25 Aug 2020 14:16:27 +0200 Subject: use bcond --- php-laminas-stdlib.spec | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/php-laminas-stdlib.spec b/php-laminas-stdlib.spec index 53cf6e9..046ebd4 100644 --- a/php-laminas-stdlib.spec +++ b/php-laminas-stdlib.spec @@ -6,7 +6,13 @@ # # Please, preserve the changelog entries # -%global bootstrap 0 +%bcond_with bootstrap +%if %{with bootstrap} +%bcond_with tests +%else +%bcond_without tests +%endif + %global gh_commit b9d84eaa39fde733356ea948cdef36c631f202b6 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner laminas @@ -15,11 +21,6 @@ %global php_home %{_datadir}/php %global namespace Laminas %global library Stdlib -%if %{bootstrap} -%global with_tests 0%{?_with_tests:1} -%else -%global with_tests 0%{!?_without_tests:1} -%endif Name: php-%{gh_project} Version: 3.3.0 @@ -33,7 +34,7 @@ Source1: makesrc.sh BuildArch: noarch # Tests -%if %{with_tests} +%if %{with tests} BuildRequires: php(language) >= 7.3 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 @@ -132,7 +133,7 @@ cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}/autoload.php %check -%if %{with_tests} +%if %{with tests} mkdir vendor cat << 'EOF' | tee vendor/autoload.php