diff --git a/.gitignore b/.gitignore index fbe5034..e4240a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,3 @@ -/php-nikic-php-parser4-4.0.0-9c18e3d.tar.gz -/php-nikic-php-parser4-4.0.1-e4a54fa.tar.gz -/php-nikic-php-parser4-4.0.2-35b8caf.tar.gz -/php-nikic-php-parser4-4.0.3-bd088dc.tar.gz -/php-nikic-php-parser4-4.0.4-fa6ee28.tar.gz -/php-nikic-php-parser4-4.1.0-d0230c5.tar.gz -/php-nikic-php-parser4-4.1.1-8aae5b5.tar.gz -/php-nikic-php-parser4-4.2.0-594bcae.tar.gz -/php-nikic-php-parser4-4.2.1-5221f49.tar.gz -/php-nikic-php-parser4-4.2.2-1bd73cc.tar.gz +clog +/php-nikic-php-parser4-4.2.5-b76bbc3.tgz +/php-nikic-php-parser4-4.3.0-9a9981c.tgz diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..7d752c6 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Commit=$COMMIT\n" + +echo "Cloning..." +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + +echo "Getting commit..." +pushd $PROJECT-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.json +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." + diff --git a/php-nikic-php-parser4.spec b/php-nikic-php-parser4.spec index a77d03c..8451566 100644 --- a/php-nikic-php-parser4.spec +++ b/php-nikic-php-parser4.spec @@ -10,24 +10,25 @@ # For compatibility with SCL %undefine __brp_mangle_shebangs -%global gh_commit 1bd73cc04c3843ad8d6b0bfc0956026a151fc420 +%global gh_commit 9a9981c347c5c49d6dfe5cf826bb882b824080dc %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 with_tests 0 %global major 4 Name: php-%{gh_owner}-%{pk_project}%{major} -Version: 4.2.2 +Version: 4.3.0 Release: 1%{?dist} Summary: A PHP parser written in PHP - version %{major} License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} -Source: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz +Source0: %{name}-%{version}-%{gh_short}.tgz +Source1: makesrc.sh # Autoloader Patch0: %{name}-rpm.patch @@ -43,9 +44,10 @@ BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-spl # From composer.json, "require-dev": { -# "phpunit/phpunit": "^6.5 || ^7.0" -%global phpunit %{_bindir}/phpunit7 -BuildRequires: phpunit7 +# "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0", +# "ircmaxell/php-yacc": "0.0.5" +%global phpunit %{_bindir}/phpunit8 +BuildRequires: phpunit8 # Autoloader BuildRequires: php-composer(fedora/autoloader) %endif @@ -69,7 +71,7 @@ Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version} %description -This is a PHP 5.2 to PHP 7.2 parser written in PHP. +This is a PHP 5.2 to PHP 7.4 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. @@ -121,11 +123,14 @@ require_once '%{buildroot}/%{php_home}/%{ns_project}%{major}/autoload.php'; AUTOLOAD : Upstream test suite +# ignore test failing on 32-bit (in koji) ret=0 -for cmdarg in "php %{phpunit}" php71 php72 php73 php74; do +for cmdarg in "php %{phpunit}" "php71 %{_bindir}/phpunit7" php72 php73 php74; do if which $cmdarg; then set $cmdarg - $1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1 + $1 ${2:-%{_bindir}/phpunit8} \ + --filter '^((?!(testParse|testLexNewFeatures)).)*$' \ + --verbose || ret=1 fi done exit $ret @@ -143,6 +148,20 @@ exit $ret %changelog +* Tue Nov 12 2019 Remi Collet - 4.3.0-1 +- update to 4.3.0 + +* Mon Oct 28 2019 Remi Collet - 4.2.5-1 +- update to 4.2.5 +- sources from git snapshot + +* Mon Sep 2 2019 Remi Collet - 4.2.4-1 +- update to 4.2.4 + +* Mon Aug 19 2019 Remi Collet - 4.2.3-1 +- update to 4.2.3 +- use phpunit8 + * Mon May 27 2019 Remi Collet - 4.2.2-1 - update to 4.2.2 diff --git a/sources b/sources index 37f98b2..6fc7ca3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-nikic-php-parser4-4.2.2-1bd73cc.tar.gz) = f28591a6daa44d19c367cde731be8b59d2d7116945c857d76bf95bbe9e5ba7b300261efb1e57170657f775371f866a695f4aa72e9ad99e3055f7069a778d15fd +SHA512 (php-nikic-php-parser4-4.3.0-9a9981c.tgz) = f7aa21e66e3b9851099a5f1deee2d797c187707f9262ee604d4b19a1acfef68395ec0461c8439cb67b21e116dbcfdb3e51a71950f3aff753e5e2d473c0c7c0ae