From da5c2342f2a55eaf32b8be1176c5b36a0e17c07c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 6 Dec 2021 09:04:11 +0100 Subject: disable test suite on EL add autoloader from sources on EL --- php-zetacomponents-base.spec | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/php-zetacomponents-base.spec b/php-zetacomponents-base.spec index f90300d..8099b75 100644 --- a/php-zetacomponents-base.spec +++ b/php-zetacomponents-base.spec @@ -13,24 +13,34 @@ %global gh_project Base %global cname base %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.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Zeta Base Component Group: Development/Libraries License: ASL 2.0 URL: http://zetacomponents.org/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz +Source1: autoloader.php # Use old PEAR layout Patch0: %{name}-layout.patch BuildArch: noarch +%if %{with phpab} BuildRequires: %{_bindir}/phpab -%if %{with_tests} +%endif +%if %{with tests} BuildRequires: phpunit8 BuildRequires: %{_bindir}/convert BuildRequires: php-composer(%{gh_owner}/unit-test) @@ -60,10 +70,14 @@ autoload support. %build +%if %{with phpab} : Generate a simple autoloader %{_bindir}/phpab \ --output src/autoloader.php \ src +%else +cp %{SOURCE1} src/autoloader.php +%endif %install @@ -78,7 +92,7 @@ cp -pr src/*_autoload.php \ %check -%if %{with_tests} +%if %{with tests} : Ignore test relying on composer layout rm tests/file_find_recursive_test.php @@ -116,6 +130,10 @@ exit $ret %changelog +* Mon Dec 6 2021 Remi Collet - 1.9.3-2 +- disable test suite on EL +- add autoloader from sources on EL + * Mon Jul 26 2021 Remi Collet - 1.9.3-1 - update to 1.9.3 -- cgit