diff --git a/php-patchwork-jsqueeze.spec b/php-patchwork-jsqueeze.spec index a88ff4e..8949b9c 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-2021 Adam Williamson -# Shawn Iwinski +# Copyright (c) 2016 Adam Williamson +# Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -21,21 +21,17 @@ # "php": ">=5.3.0" %global php_min_ver 5.3.0 -%if 0%{?fedora} -%bcond_without tests -%else -%bcond_with tests -%endif +# Build using "--without tests" to disable tests +%global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 22%{?dist} +Release: 10%{?dist} Summary: Efficient JavaScript minification -# Automatically converted from old format: ASL 2.0 or GPLv2 - review is highly recommended. -License: Apache-2.0 OR GPL-2.0-only +License: ASL 2.0 or GPLv2 URL: https://github.com/%{github_owner}/%{github_name} # GitHub export does not include tests. @@ -47,10 +43,10 @@ BuildArch: noarch # Autoloader BuildRequires: %{_bindir}/phpab # Tests -%if %{with tests} +%if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: phpunit9 +BuildRequires: php-composer(phpunit/phpunit) ## phpcompatinfo (computed from version 2.0.5) BuildRequires: php-pcre %endif @@ -93,29 +89,16 @@ cp -pr src/* %{buildroot}%{phpdir}/Patchwork/ %check -%if %{with tests} -: Create tests autoloader -cat << 'EOF' | tee tests/bootstrap.php - - 2.0.5-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jan 18 2025 Fedora Release Engineering - 2.0.5-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Aug 7 2024 Miroslav Suchý - 2.0.5-20 -- convert license to SPDX - -* Fri Jul 19 2024 Fedora Release Engineering - 2.0.5-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jan 25 2024 Fedora Release Engineering - 2.0.5-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 2.0.5-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jul 21 2023 Fedora Release Engineering - 2.0.5-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jan 20 2023 Fedora Release Engineering - 2.0.5-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 2.0.5-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Jan 21 2022 Fedora Release Engineering - 2.0.5-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Dec 8 2021 Remi Collet - 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 - * Wed Jan 27 2021 Fedora Release Engineering - 2.0.5-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild