diff --git a/php-patchwork-jsqueeze.spec b/php-patchwork-jsqueeze.spec index 11466b5..e0d5fcd 100644 --- a/php-patchwork-jsqueeze.spec +++ b/php-patchwork-jsqueeze.spec @@ -1,8 +1,8 @@ # # Fedora spec file for php-patchwork-jsqueeze # -# Copyright (c) 2016 Adam Williamson -# Shawn Iwinski +# Copyright (c) 2016-2021 Adam Williamson +# Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -21,14 +21,17 @@ # "php": ">=5.3.0" %global php_min_ver 5.3.0 -# Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +%if 0%{?fedora} +%bcond_without tests +%else +%bcond_with tests +%endif %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 11%{?dist} +Release: 12%{?dist} Summary: Efficient JavaScript minification License: ASL 2.0 or GPLv2 @@ -43,10 +46,10 @@ BuildArch: noarch # Autoloader BuildRequires: %{_bindir}/phpab # Tests -%if %{with_tests} +%if %{with tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: phpunit9 ## phpcompatinfo (computed from version 2.0.5) BuildRequires: php-pcre %endif @@ -89,16 +92,29 @@ cp -pr src/* %{buildroot}%{phpdir}/Patchwork/ %check -%if %{with_tests} -%{_bindir}/phpunit --verbose \ - --bootstrap %{buildroot}%{phpdir}/Patchwork/autoload-jsqueeze.php +%if %{with tests} +: Create tests autoloader +cat << 'EOF' | tee tests/bootstrap.php + - 2.0.5-12 +- disable test suite on EL +- switch to phpunit9 + * Fri Jul 23 2021 Fedora Release Engineering - 2.0.5-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild