diff --git a/php-PHPParser.spec b/php-PHPParser.spec index 520a7b0..d7630df 100644 --- a/php-PHPParser.spec +++ b/php-PHPParser.spec @@ -1,7 +1,7 @@ # # RPM spec file for php-PHPParser # -# Copyright (c) 2012-2015 Shawn Iwinski +# Copyright (c) 2012-2021 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -9,6 +9,9 @@ # Please preserve changelog entries # +# Outdated, see php-nikic-php-parser4 +%bcond_with tests + %global github_owner nikic %global github_name PHP-Parser %global github_version 1.4.1 @@ -20,19 +23,13 @@ %global php_min_ver 5.3 -%if 0%{?fedora} < 24 -%global script 1 -%else -%global script 0 -%endif - Name: php-%{lib_name_old} Version: %{github_version} -Release: 7%{?dist} -Summary: A PHP parser written in PHP +Release: 25%{?dist} +Summary: A PHP parser written in PHP - version 1 -Group: Development/Libraries -License: BSD +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-BSD URL: https://github.com/%{github_owner}/%{github_name} # Upstream tarball don't provide test suite # Use mksrc.sh to generate a git snapshot tarball @@ -45,7 +42,9 @@ Patch0: %{name}-command.patch BuildArch: noarch # For tests BuildRequires: php(language) >= %{php_min_ver} +%if %{with tests} BuildRequires: %{_bindir}/phpunit +%endif # For tests: phpcompatinfo (computed from version 1.4.1) BuildRequires: php-ctype BuildRequires: php-filter @@ -64,30 +63,24 @@ Requires: php-pcre Requires: php-spl Requires: php-xmlreader Requires: php-xmlwriter -%if %{script} -Requires: php-cli -%endif Provides: php-composer(nikic/php-parser) = %{version} %description A PHP parser written in PHP to simplify static analysis and code manipulation. -%if %{script} -This package provides the library version 1 and the php-parse command. -The php-nikic-php-parser package provides the library version 2. -%else + This package provides the library version 1. -The php-nikic-php-parser package provides the library version 2 -and the php-parse command. -%endif +The php-nikic-php-parser3 package provides the library version 3. +The php-nikic-php-parser4 package provides the library version 4. + Autoloader: '%{_datadir}/php/%{lib_name}/autoload.php'; %prep %setup -q -n %{github_name}-%{github_short} -%patch0 -p0 -b .rpm +%patch -P0 -p0 -b .rpm rm lib/%{lib_name}/*rpm @@ -104,30 +97,84 @@ mkdir -p -m 755 %{buildroot}%{_datadir}/php/%{lib_name_old} ln -s ../%{lib_name}/Autoloader.php \ %{buildroot}%{_datadir}/php/%{lib_name_old}/Autoloader.php -%if %{script} -install -Dpm 755 bin/php-parse.php %{buildroot}%{_bindir}/php-parse -%endif - %check +%if %{with tests} %{_bindir}/phpunit \ --bootstrap %{buildroot}%{_datadir}/php/%{lib_name}/autoload.php \ + --filter '^((?!(testResolveLocations)).)*$' \ --verbose +%else +: Test suite disabled +%endif %files %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md doc grammar composer.json -%if %{script} -%{_bindir}/php-parse -%endif %{_datadir}/php/%{lib_name_old} %{_datadir}/php/%{lib_name} - %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.4.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 1.4.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Sep 4 2024 Miroslav Suchý - 1.4.1-23 +- convert license to SPDX + +* Fri Jul 19 2024 Fedora Release Engineering - 1.4.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 1.4.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.4.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 1.4.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 1.4.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 1.4.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 1.4.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 1.4.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Mar 30 2021 Remi Collet - 1.4.1-14 +- outdated package, disable test suite + +* Wed Jan 27 2021 Fedora Release Engineering - 1.4.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.4.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Feb 4 2020 Remi Collet - 1.4.1-11 +- skip 1 failed test with 7.4 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.4.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 1.4.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.4.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.4.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 1.4.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild