diff --git a/.gitignore b/.gitignore index 1ca792f..bb1c5c3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ clog /php-ocramius-code-generator-utils-0.3.2-0e2f6c593fc82801cbb5c8fa90559d923bd1445c.tar.gz /php-ocramius-code-generator-utils-0.4.0-7dc0be1dec3376d95ba094688f0d84f7cf95f300.tar.gz /php-ocramius-code-generator-utils-0.4.1-862c03de42475fe039e7d0f47966c25ac40a58a8.tar.gz -/php-ocramius-code-generator-utils-1.2.0-02aab6ab303c93f60915d0f6d4ffaf0381a6671b.tar.gz diff --git a/composer.json b/composer.json deleted file mode 100644 index 6d767ab..0000000 --- a/composer.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "ocramius/code-generator-utils", - "description": "A set of code generator utilities built on top of PHP-Parsers that ease its use when combined with Reflection", - "type": "library", - "license": "MIT", - "homepage": "https://github.com/Ocramius/CodeGenerationUtils", - "keywords": [ - "reflection", - "code generation", - "php code", - "parser", - "compiler" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "require": { - "php": "^8.0", - "nikic/php-parser": "^4.10.4" - }, - "require-dev": { - "doctrine/coding-standard": "^8.2.0", - "phpunit/phpunit": "^9.5.1", - "psalm/plugin-phpunit": "^0.15.0", - "roave/infection-static-analysis-plugin": "^1.7", - "squizlabs/php_codesniffer": "^3.5.8", - "vimeo/psalm": "^4.4.1" - }, - "autoload": { - "psr-4": { - "CodeGenerationUtils\\": "src/CodeGenerationUtils" - } - }, - "autoload-dev": { - "psr-4": { - "CodeGenerationUtilsTests\\": "tests/CodeGenerationUtilsTest", - "CodeGenerationUtilsTestAsset\\": "tests/CodeGenerationUtilsTestAsset" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/php-ocramius-code-generator-utils-get-source.sh b/php-ocramius-code-generator-utils-get-source.sh deleted file mode 100755 index b2ac62b..0000000 --- a/php-ocramius-code-generator-utils-get-source.sh +++ /dev/null @@ -1,73 +0,0 @@ -#/bin/sh - -GIT=`which git` -RPM=`which rpm` - -if [ -z "$GIT" ] -then - echo "ERROR: 'git' command not found" 1>&2 - exit 1 -elif [ -z "$RPM" ] -then - echo "ERROR: 'rpm' command not found" 1>&2 - exit 1 -fi - -function print { - echo -e "\e[0;33m>>>>> ${1}\e[0m" -} - -if [ -x "$1" ] -then - SPEC=$1 -else - SPEC=`ls *.spec | head -1` -fi - -SPEC_DIR=`pwd` - -print "SPEC_DIR = $SPEC_DIR" - -NAME=`echo $SPEC | sed 's#\.spec##'` -VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'` - -print "SPEC = $SPEC" -print "NAME = $NAME" - -GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'` -GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'` -GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'` -GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME} -GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'` - -print "GIT_OWNER = $GIT_OWNER" -print "GIT_NAME = $GIT_NAME" -print "GIT_COMMIT = $GIT_COMMIT" -print "GIT_REPO = $GIT_REPO" -print "GIT_DIR = $GIT_DIR" - -TEMP_DIR=$(mktemp --dir) - -pushd $TEMP_DIR - print "Cloning git repo..." - $GIT clone $GIT_REPO - - pushd $GIT_DIR - print "Checking out commit..." - $GIT checkout $GIT_COMMIT - popd - - TAR_DIR=${GIT_NAME}-${GIT_COMMIT} - print "TAR_DIR = $TAR_DIR" - - mv $GIT_DIR $TAR_DIR - - TAR_FILE=${SPEC_DIR}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz - print "TAR_FILE = $TAR_FILE" - - [ -e $TAR_FILE ] && rm -f $TAR_FILE - tar --exclude-vcs -czf $TAR_FILE $TAR_DIR - chmod 0644 $TAR_FILE -popd - -rm -rf $TEMP_DIR diff --git a/php-ocramius-code-generator-utils.spec b/php-ocramius-code-generator-utils.spec index e0637a6..300a06d 100644 --- a/php-ocramius-code-generator-utils.spec +++ b/php-ocramius-code-generator-utils.spec @@ -1,7 +1,7 @@ # # Fedora spec file for php-ocramius-code-generator-utils # -# Copyright (c) 2014-2021 Shawn Iwinski +# Copyright (c) 2014-2016 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -11,43 +11,41 @@ %global github_owner Ocramius %global github_name CodeGenerationUtils -%global github_version 1.2.0 -%global github_commit 02aab6ab303c93f60915d0f6d4ffaf0381a6671b +%global github_version 0.4.1 +%global github_commit 862c03de42475fe039e7d0f47966c25ac40a58a8 %global composer_vendor ocramius %global composer_project code-generator-utils -# "php": "^8.0" -%global php_min_ver 8.0 -# "nikic/php-parser": "^4.10.4" -%global php_parser_min_ver 4.10.4 -%global php_parser_max_ver 5 +# "php": "~7.0" +%global php_min_ver 7.0 +# "nikic/php-parser": "~2.0|~3.0" +%global php_parser_min_ver 2.0 +%global php_parser_max_ver 4 # Build using "--without tests" to disable tests -%bcond_without tests +%global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 10%{?github_release}%{?dist} +Release: 4%{?github_release}%{?dist} Summary: A set of code generator utilities built on top of PHP-Parsers +Group: Development/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} - -# GitHub export does not include tests. -# Run php-ocramius-code-generator-utils-get-source.sh to create full source. -Source0: %{name}-%{github_version}-%{github_commit}.tar.gz -Source1: %{name}-get-source.sh +Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz BuildArch: noarch -%if %{with tests} +%if %{with_tests} # composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: phpunit9 -BuildRequires: (php-composer(nikic/php-parser) >= %{php_parser_min_ver} with php-composer(nikic/php-parser) < %{php_parser_max_ver}) -# phpcompatinfo (computed from version 1.2.0) +BuildRequires: php-composer(nikic/php-parser) < %{php_parser_max_ver} +BuildRequires: php-composer(nikic/php-parser) >= %{php_parser_min_ver} +BuildRequires: php-composer(phpunit/phpunit) >= 5.0 +# phpcompatinfo (computed from version 0.4.0) BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: php-spl @@ -57,10 +55,10 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} -Requires: (php-composer(nikic/php-parser) >= %{php_parser_min_ver} with php-composer(nikic/php-parser) < %{php_parser_max_ver}) -# phpcompatinfo (computed from version 1.2.0) +Requires: php-composer(nikic/php-parser) < %{php_parser_max_ver} +Requires: php-composer(nikic/php-parser) >= %{php_parser_min_ver} +# phpcompatinfo (computed from version 0.4.0) Requires: php-pcre -Requires: php-reflection Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) @@ -93,9 +91,11 @@ cat <<'AUTOLOAD' | tee src/CodeGenerationUtils/autoload.php require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('CodeGenerationUtils\\', __DIR__); - \Fedora\Autoloader\Dependencies::required([ - '%{phpdir}/PhpParser4/autoload.php', + [ + '%{phpdir}/PhpParser3/autoload.php', + '%{phpdir}/PhpParser2/autoload.php', + ], ]); AUTOLOAD @@ -106,7 +106,7 @@ cp -rp src/CodeGenerationUtils %{buildroot}%{phpdir}/ %check -%if %{with tests} +%if %{with_tests} : Create tests bootstrap cat <<'BOOTSTRAP' | tee bootstrap.php - 1.2.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jan 18 2025 Fedora Release Engineering - 1.2.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Jul 19 2024 Fedora Release Engineering - 1.2.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jan 25 2024 Fedora Release Engineering - 1.2.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 1.2.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jul 21 2023 Fedora Release Engineering - 1.2.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jan 20 2023 Fedora Release Engineering - 1.2.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 1.2.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Jan 21 2022 Fedora Release Engineering - 1.2.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Sat Sep 18 2021 Shawn Iwinski - 1.2.0-1 -- Update to 1.2.0 (RHBZ #1674220) -- Fix "FTBFS in Fedora rawhide/f35" (RHBZ #1987840) - -* Fri Jul 23 2021 Fedora Release Engineering - 0.4.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 0.4.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 0.4.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jan 30 2020 Fedora Release Engineering - 0.4.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jul 26 2019 Fedora Release Engineering - 0.4.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Feb 02 2019 Fedora Release Engineering - 0.4.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - * Fri Jul 13 2018 Fedora Release Engineering - 0.4.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 875ea8a..d7c6aa4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-ocramius-code-generator-utils-1.2.0-02aab6ab303c93f60915d0f6d4ffaf0381a6671b.tar.gz) = 1caeda4e233c0556239e7caa5b9cf2ae35dd0c0b32d738ddfb588b4111f08daeec9d606b2465e66bc8cd59763abbf9a774a9ccdb50c071a4c670200a70e771a1 +SHA512 (php-ocramius-code-generator-utils-0.4.1-862c03de42475fe039e7d0f47966c25ac40a58a8.tar.gz) = 06205f284aa1345e0081595b2fd6068c4de14aefb99dd4fedaf4e634dec60a0c63a08e03d1ebce84f59cfe247f40a8ea8d5ff2c6baeaf964f50f81c92e3d2431