diff options
| -rw-r--r-- | composer.json | 3 | ||||
| -rwxr-xr-x | makesrc.sh | 29 | ||||
| -rw-r--r-- | php-nikic-php-parser5.spec | 26 |
3 files changed, 23 insertions, 35 deletions
diff --git a/composer.json b/composer.json index 7a8591d..9d1835f 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,7 @@ "require": { "php": ">=7.4", "ext-tokenizer": "*", - "ext-json": "*", - "ext-ctype": "*" + "ext-json": "*" }, "require-dev": { "phpunit/phpunit": "^9.0", @@ -3,32 +3,25 @@ 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 '/^%global upstream_version/{s/.* //;p}' $NAME.spec) -PREVER=$(sed -n '/^%global upstream_prever/{s/.* //;p}' $NAME.spec) -COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) -SHORT=${COMMIT:0:7} +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) -echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION$PREVER, Commit=$COMMIT\n" - -TAR=$NAME-$VERSION$PREVER-$SHORT.tgz - -if [ -f $TAR ]; then - echo "Skip $TAR" +if [ -f $NAME-$VERSION.tgz ]; then + echo "$NAME-$VERSION.tgz already there" else + echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION \n" + echo "Cloning..." - git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + rm -rf $PROJECT-$VERSION + git clone https://github.com/$OWNER/$PROJECT.git --depth 1 --branch v$VERSION $PROJECT-$VERSION || exit 1 - echo "Getting commit..." - pushd $PROJECT-$COMMIT - git checkout $COMMIT || exit 1 - cp composer.json ../composer.json - popd + echo "Getting composer..." + cp $PROJECT-$VERSION/composer.json composer.json echo "Archiving..." - tar czf $TAR --exclude-vcs $PROJECT-$COMMIT + tar czf $NAME-$VERSION.tgz --exclude-vcs --exclude tools $PROJECT-$VERSION echo "Cleaning..." - rm -rf $PROJECT-$COMMIT + rm -rf $PROJECT-$VERSION echo "Done." fi diff --git a/php-nikic-php-parser5.spec b/php-nikic-php-parser5.spec index a76318c..9026ae2 100644 --- a/php-nikic-php-parser5.spec +++ b/php-nikic-php-parser5.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-nikic-php-parser5 # -# SPDX-FileCopyrightText: Copyright 2016-2025 Remi Collet +# SPDX-FileCopyrightText: Copyright 2016-2026 Remi Collet # SPDX-License-Identifier: CECILL-2.1 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # @@ -18,27 +18,23 @@ %bcond_with tests %endif -%global gh_commit dca41cd15c2ac9d055ad70dbfd011130757d1f82 -%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 major 5 - -%global upstream_version 5.7.0 -#global upstream_prever rc1 +%global forgeurl https://github.com/%{gh_owner}/%{gh_project} Name: php-%{gh_owner}-%{pk_project}%{major} -Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +Version: 5.8.0 Release: 1%{?dist} Summary: A PHP parser written in PHP - version %{major} License: BSD-3-Clause -URL: https://github.com/%{gh_owner}/%{gh_project} +URL: %{forgeurl} # run makesrc.sh to create a git snapshot with test suite -Source0: %{name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tgz +Source0: %{name}-%{version}.tgz Source1: makesrc.sh # Autoloader @@ -49,7 +45,6 @@ BuildArch: noarch # For tests BuildRequires: php(language) >= 7.4 BuildRequires: php-tokenizer -BuildRequires: php-ctype BuildRequires: php-json # From composer.json, "require-dev": { # "phpunit/phpunit": "^9.0", @@ -63,12 +58,10 @@ BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { # "php": ">=7.4", # "ext-tokenizer": "*", -# "ext-json": "*", -# "ext-ctype": "*" +# "ext-json": "*" Requires: php(language) >= 7.4 Requires: php-tokenizer Requires: php-json -Requires: php-ctype # From phpcompatinfo report for version 5.0.0 Requires: php-cli # Autoloader @@ -89,7 +82,7 @@ Autoloader: %{php_home}/%{ns_project}%{major}/autoload.php %prep -%setup -q -n %{gh_project}-%{gh_commit} +%setup -q -n %{gh_project}-%{version} %patch -P0 -p1 -b .rpm @@ -127,7 +120,7 @@ AUTOLOAD : Upstream test suite ret=0 -for cmdarg in "php %{phpunit}" php81 php82 php83 php84 php85; do +for cmdarg in "php %{phpunit}" php82 php83 php84 php85 php86; do if which $cmdarg; then set $cmdarg $1 -d include_path=%{php_home} \ @@ -150,6 +143,9 @@ exit $ret %changelog +* Mon Jul 6 2026 Remi Collet <remi@remirepo.net> - 5.8.0-1 +- update to 5.8.0 + * Tue Dec 9 2025 Remi Collet <remi@remirepo.net> - 5.7.0-1 - update to 5.7.0 |
