(cherry picked from commit 3ac55d0d06)
This commit is contained in:
Remi Collet 2022-09-08 12:25:20 +02:00
commit 50eb0b6e07
3 changed files with 19 additions and 8 deletions

View file

@ -10,18 +10,24 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
%global gh_commit 34bea19b6e03d8153165d8f30bba4c3be86184c1
%if 0%{?fedora}
%bcond_without tests
%else
# disabled as phpunit not availble
%bcond_with tests
%endif
%global gh_commit 0ef6c55a3f47f89d7a374e6f835197a0b5fcf900
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner nikic
%global gh_project PHP-Parser
%global pk_project php-parser
%global php_home %{_datadir}/php
%global ns_project PhpParser
%global with_tests 0%{!?_without_tests:1}
%global major 4
Name: php-%{gh_owner}-%{pk_project}%{major}
Version: 4.14.0
Version: 4.15.1
Release: 1%{?dist}
Summary: A PHP parser written in PHP - version %{major}
@ -34,7 +40,7 @@ Source1: makesrc.sh
Patch0: %{name}-rpm.patch
BuildArch: noarch
%if %{with_tests}
%if %{with tests}
# For tests
# as we use phpunit9
BuildRequires: php(language) >= 7.3
@ -50,8 +56,8 @@ BuildRequires: php-spl
%global phpunit %{_bindir}/phpunit9
BuildRequires: phpunit9
# Autoloader
BuildRequires: php-fedora-autoloader-devel
%endif
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
# "php": ">=7.0",
@ -72,7 +78,7 @@ Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version}
%description
This is a PHP 5.2 to PHP 7.4 parser written in PHP.
This is a PHP parser written in PHP.
Its purpose is to simplify static code analysis and manipulation.
This package provides the library version %{major} and the php-parse%{major} command.
@ -105,7 +111,7 @@ install -Dpm 0755 bin/php-parse %{buildroot}%{_bindir}/php-parse%{major}
%check
%if %{with_tests}
%if %{with tests}
: Test the command
sed -e 's:%{php_home}:%{buildroot}%{php_home}:' \
bin/php-parse > bin/php-parse-test
@ -151,6 +157,10 @@ exit $ret
%changelog
* Thu Sep 8 2022 Remi Collet <remi@remirepo.net> - 4.15.1-1
- update to 4.15.1
- only run test suite on Fedora, not on EL
* Wed Jun 1 2022 Remi Collet <remi@remirepo.net> - 4.14.0-1
- update to 4.14.0