diff --git a/.gitignore b/.gitignore index 1ca792f..7c9fb25 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,3 @@ clog /php-ocramius-code-generator-utils-0.3.0-5d9c4e3ae36010fef22b3393b3734c84106d1d5c.tar.gz /php-ocramius-code-generator-utils-0.3.1-d27db31c975001710beb4025768dcbd39e286a56.tar.gz /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..b2d088c 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 +# RPM spec file for php-ocramius-code-generator-utils # -# Copyright (c) 2014-2021 Shawn Iwinski +# Copyright (c) 2014-2015 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -11,59 +11,55 @@ %global github_owner Ocramius %global github_name CodeGenerationUtils -%global github_version 1.2.0 -%global github_commit 02aab6ab303c93f60915d0f6d4ffaf0381a6671b +%global github_version 0.3.2 +%global github_commit 0e2f6c593fc82801cbb5c8fa90559d923bd1445c %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": ">=5.3.3" +%global php_min_ver 5.3.3 +# "nikic/php-parser": "~1.3" +%global php_parser_min_ver 1.3 +%global php_parser_max_ver 2 # Build using "--without tests" to disable tests -%bcond_without tests +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} -%{!?phpdir: %global phpdir %{_datadir}/php} +%{!?phpdir: %global phpdir %{_datadir}/php} +%{!?__phpunit: %global __phpunit %{_bindir}/phpunit} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 10%{?github_release}%{?dist} +Release: 1%{?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_min_ver} +BuildRequires: php-composer(nikic/php-parser) < %{php_parser_max_ver} +BuildRequires: php-phpunit-PHPUnit +# phpcompatinfo (computed from version 0.3.0) BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: php-spl -# Autoloader -BuildRequires: php-composer(fedora/autoloader) %endif # 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_min_ver} +Requires: php-composer(nikic/php-parser) < %{php_parser_max_ver} +# phpcompatinfo (computed from version 0.3.0) Requires: php-pcre Requires: php-reflection Requires: php-spl -# Autoloader -Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} @@ -72,58 +68,37 @@ Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} A set of code generator utilities built on top of PHP-Parsers that ease its use when combined with Reflection. -Autoloader: %{phpdir}/CodeGenerationUtils/autoload.php - %prep %setup -qn %{github_name}-%{github_commit} %build -: Create autoloader -cat <<'AUTOLOAD' | tee src/CodeGenerationUtils/autoload.php - autoload.php <<'AUTOLOAD' - 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 - -* Fri Feb 09 2018 Fedora Release Engineering - 0.4.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 0.4.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Jun 23 2017 Remi Collet - 0.4.1-1 -- Update to 0.4.1 -- allow nikic/php-parser version 2 and 3 - -* Wed Feb 22 2017 Remi Collet - 0.4.0-3 -- switch to fedora-autoloader - -* Wed Feb 22 2017 Remi Collet - 0.4.0-2 -- implicitly requires php-nikic-php-parser (v2) -- fix FTBFS #1424073 - -* Sat Feb 11 2017 Fedora Release Engineering - 0.4.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Nov 30 2016 Remi Collet - 0.4.0-1 -- update to 0.4.0 -- raise dependency on php ~7.0 -- raise dependency on nikic/php-parser ~2.0 - -* Wed Oct 12 2016 Remi Collet - 0.3.2-4 -- add missing dependency for autoloader - -* Tue Oct 11 2016 Shawn Iwinski - 0.3.2-3 -- Add autoloader - -* Thu Feb 04 2016 Fedora Release Engineering - 0.3.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - * Sun Aug 9 2015 Remi Collet - 0.3.2-1 - update to 0.3.2 - raise dependency on nikic/php-parser ~1.3 diff --git a/sources b/sources index 875ea8a..2f60161 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-ocramius-code-generator-utils-1.2.0-02aab6ab303c93f60915d0f6d4ffaf0381a6671b.tar.gz) = 1caeda4e233c0556239e7caa5b9cf2ae35dd0c0b32d738ddfb588b4111f08daeec9d606b2465e66bc8cd59763abbf9a774a9ccdb50c071a4c670200a70e771a1 +28b56d51af6402d197517cd24c4500ae php-ocramius-code-generator-utils-0.3.2-0e2f6c593fc82801cbb5c8fa90559d923bd1445c.tar.gz