From b13827bfde209c02e1503b72bea6c428c6522363 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 22 Mar 2018 08:55:56 +0100 Subject: Update to 4.0.0 rename to php-nikic-php-parser4 and move to /usr/share/php/PhpParser4 raise dependency on PHP 7 use phpunit6 or phpunit7 (F28+) --- php-nikic-php-parser4.spec | 81 +++++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 34 deletions(-) (limited to 'php-nikic-php-parser4.spec') diff --git a/php-nikic-php-parser4.spec b/php-nikic-php-parser4.spec index 1752c40..15a10d9 100644 --- a/php-nikic-php-parser4.spec +++ b/php-nikic-php-parser4.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-nikic-php-parser3 +# remirepo/fedora spec file for php-nikic-php-parser4 # # Copyright (c) 2016-2018 Remi Collet # License: CC-BY-SA @@ -10,20 +10,18 @@ # For compatibility with SCL %undefine __brp_mangle_shebangs -%global gh_commit bb87e28e7d7b8d9a7fda231d37457c9210faf6ce +%global gh_commit 9c18e3db49fa469f5feffe40dbd7b1ec2b61e41f %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 3 - -%global eolv1 0 -%global eolv2 0 +%global major 4 Name: php-%{gh_owner}-%{pk_project}%{major} -Version: 3.1.5 +Version: 4.0.0 Release: 1%{?dist} Summary: A PHP parser written in PHP @@ -37,51 +35,53 @@ Patch0: %{name}-rpm.patch BuildArch: noarch %if %{with_tests} # For tests -BuildRequires: php(language) >= 5.5 +BuildRequires: php(language) >= 7.0 BuildRequires: php-tokenizer -BuildRequires: php-filter +BuildRequires: php-reflection +BuildRequires: php-ctype BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-spl -BuildRequires: php-xmlreader -BuildRequires: php-xmlwriter # From composer.json, "require-dev": { -# "phpunit/phpunit": "~4.0|~5.0" -BuildRequires: php-composer(phpunit/phpunit) >= 4.0 +# "phpunit/phpunit": "^6.5 || ^7.0" +%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 +%global phpunit %{_bindir}/phpunit7 +BuildRequires: phpunit7 +%else +%global phpunit %{_bindir}/phpunit6 +BuildRequires: phpunit6 >= 6.5 +%endif +# Autoloader +BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require": { -# "php": ">=5.5", +# "php": ">=7.0", # "ext-tokenizer": "*" -Requires: php(language) >= 5.5 +Requires: php(language) >= 7.0 Requires: php-tokenizer -# From phpcompatinfo report for version 3.0.2 -Requires: php-filter +# From phpcompatinfo report for version 4.0.0 +Requires: php-reflection +Requires: php-ctype Requires: php-json Requires: php-pcre Requires: php-spl -Requires: php-xmlreader -Requires: php-xmlwriter -%if %{eolv1} -Obsoletes: php-PHPParser < %{major} -%endif -%if %{eolv2} -Obsoletes: php-%{gh_owner}-%{pk_project} < %{major} -%endif Requires: php-cli +# Autoloader +BuildRequires: php-composer(fedora/autoloader) Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version} %description -This is a PHP 5.2 to PHP 7.1 parser written in PHP. +This is a PHP 5.2 to PHP 7.2 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. Documentation: https://github.com/nikic/PHP-Parser/tree/master/doc -Autoloader: %{php_home}/PhpParser%{major}/autoload.php +Autoloader: %{php_home}/%{ns_project}%{major}/autoload.php %prep @@ -91,14 +91,20 @@ Autoloader: %{php_home}/PhpParser%{major}/autoload.php %build -# Empty build section, most likely nothing required. +: Generate an simple PSR-4 autoloader +cat << 'AUTOLOAD' | tee lib/%{ns_project}/autoload.php + - 4.0.0-1 +- Update to 4.0.0 +- rename to php-nikic-php-parser4 and move to /usr/share/php/PhpParser4 +- raise dependency on PHP 7 +- use phpunit6 or phpunit7 (F28+) + * Thu Mar 1 2018 Remi Collet - 3.1.5-1 - Update to 3.1.5 -- cgit