diff options
-rw-r--r-- | php-PHPParser.spec | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/php-PHPParser.spec b/php-PHPParser.spec index 3a064ce..859073d 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 <shawn.iwinski@gmail.com> +# Copyright (c) 2012-2021 Shawn Iwinski <shawn.iwinski@gmail.com> # # 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,18 +23,11 @@ %global php_min_ver 5.3 -%if 0 -%global script 1 -%else -%global script 0 -%endif - Name: php-%{lib_name_old} Version: %{github_version} -Release: 4%{?dist} -Summary: A PHP parser written in PHP +Release: 14%{?dist} +Summary: A PHP parser written in PHP - version 1 -Group: Development/Libraries License: BSD URL: https://github.com/%{github_owner}/%{github_name} # Upstream tarball don't provide test suite @@ -42,11 +38,12 @@ Source1: makesrc.sh # Patch for distribution Patch0: %{name}-command.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 @@ -65,23 +62,17 @@ 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'; @@ -105,30 +96,33 @@ 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 -%defattr(-,root,root,-) %{!?_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 +* Tue Mar 30 2021 Remi Collet <remi@fedoraproject.org> - 1.4.1-14 +- outdated package, disable test suite + +* Tue Feb 4 2020 Remi Collet <remi@fedoraproject.org> - 1.4.1-11 +- skip 1 failed test with 7.4 + * Fri May 20 2016 Remi Collet <remi@fedoraproject.org> - 1.4.1-4 - drop the php-parse command, provided by php-nikic-php-parser |