diff options
author | Remi Collet <remi@remirepo.net> | 2021-12-06 09:14:13 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2021-12-06 09:14:13 +0100 |
commit | fe516daf90e60f686781254c4c341253e46d4b82 (patch) | |
tree | 655e1e492b91d070b95372bf762f717aa6a88c43 /php-zetacomponents-console-tools.spec | |
parent | b40eb45cde8d610d0544412f2b4b7ba61f4f1095 (diff) |
disable test suite on EL
add autoloader from sources on EL
Diffstat (limited to 'php-zetacomponents-console-tools.spec')
-rw-r--r-- | php-zetacomponents-console-tools.spec | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/php-zetacomponents-console-tools.spec b/php-zetacomponents-console-tools.spec index 8594d75..dfad87c 100644 --- a/php-zetacomponents-console-tools.spec +++ b/php-zetacomponents-console-tools.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-zetacomponents-console-tools # -# Copyright (c) 2015-2020 Remi Collet +# Copyright (c) 2015-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -13,20 +13,30 @@ %global gh_project ConsoleTools %global cname console-tools %global ezcdir %{_datadir}/php/ezc -%global with_tests %{?_without_tests:0}%{!?_without_tests:1} + +%if 0%{?fedora} +%bcond_without tests +%bcond_without phpab +%else +%bcond_with tests +%bcond_with phpab +%endif Name: php-%{gh_owner}-%{cname} Version: 1.7.2 -Release: 1%{?dist} +Release: 4%{?dist} Summary: Zeta %{gh_project} Component License: ASL 2.0 URL: http://zetacomponents.org/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +Source1: autoloader.php BuildArch: noarch +%if %{with phpab} BuildRequires: %{_bindir}/phpab -%if %{with_tests} +%endif +%if %{with tests} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(%{gh_owner}/base) >= 1.8 with php-composer(%{gh_owner}/base) < 2) @@ -46,7 +56,7 @@ BuildRequires: php-composer(%{gh_owner}/unit-test) # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(%{gh_owner}/base) >= 1.8 with php-composer(%{gh_owner}/base) < 2) -# remirepo:4 +# remirepo:3 %else Requires: php-zetacomponents-base >= 1.8 %endif @@ -82,6 +92,7 @@ Requires: %{name} = %{version}-%{release} %build +%if %{with phpab} : Generate a simple autoloader %{_bindir}/phpab \ --output src/autoloader.php \ @@ -90,6 +101,9 @@ cat <<EOF | tee -a src/autoloader.php # Dependencies require_once '%{ezcdir}/Base/autoloader.php'; EOF +%else +cp %{SOURCE1} src/autoloader.php +%endif %install @@ -104,7 +118,7 @@ cp -pr src/*_autoload.php \ %check -%if %{with_tests} +%if %{with tests} : Create test autoloader mkdir vendor cat <<EOF | tee vendor/autoload.php @@ -117,7 +131,7 @@ EOF sed -e '/realpath/d' -i tests/statusbar_test.php : Run test test suite -for cmd in php php72 php73 php74 php80 +for cmd in php php74 php80 php81 do if which $cmd; then @@ -143,6 +157,10 @@ done %changelog +* Mon Dec 6 2021 Remi Collet <remi@remirepo.net> - 1.7.2-4 +- disable test suite on EL +- add autoloader from sources on EL + * Fri Oct 30 2020 Remi Collet <remi@remirepo.net> - 1.7.2-1 - update to 1.7.2 - switch to phpunit7 |