From 8343b8414527cb53386b0e4225c51b968508f7fd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 22 Jan 2018 11:27:43 +0100 Subject: duplicate php-phpdocumentor-reflection-docblock --- .gitignore | 8 + composer.json | 28 +++ ...phpdocumentor-reflection-docblock-get-source.sh | 71 ++++++++ php-phpdocumentor-reflection-docblock4.spec | 200 +++++++++++++++++++++ 4 files changed, 307 insertions(+) create mode 100644 .gitignore create mode 100644 composer.json create mode 100755 php-phpdocumentor-reflection-docblock-get-source.sh create mode 100644 php-phpdocumentor-reflection-docblock4.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..558046c --- /dev/null +++ b/composer.json @@ -0,0 +1,28 @@ +{ + "name": "phpdocumentor/reflection-docblock", + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.3.0", + "webmozart/assert": "^1.0" + }, + "autoload": { + "psr-4": {"phpDocumentor\\Reflection\\": ["src/"]} + }, + "autoload-dev": { + "psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]} + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + } +} diff --git a/php-phpdocumentor-reflection-docblock-get-source.sh b/php-phpdocumentor-reflection-docblock-get-source.sh new file mode 100755 index 0000000..8cf51f1 --- /dev/null +++ b/php-phpdocumentor-reflection-docblock-get-source.sh @@ -0,0 +1,71 @@ +#/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 + +NAME=`echo $SPEC | sed 's#\.spec##'` +VERSION=`egrep '^Version:' $SPEC | awk '{print $2}'` + +print "SPEC = $SPEC" +print "NAME = $NAME" + +GIT_OWNER=`egrep '%global\s*gh_owner' $SPEC | awk '{print $3}'` +GIT_NAME=`egrep '%global\s*gh_project' $SPEC | awk '{print $3}'` +GIT_COMMIT=`egrep '%global\s*gh_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) +TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz +CMP_FILE=$PWD/composer.json + +pushd $TEMP_DIR + print "Cloning git repo..." + $GIT clone $GIT_REPO + + pushd $GIT_DIR + print "Checking out commit..." + $GIT checkout $GIT_COMMIT + cp composer.json $CMP_FILE + popd + + TAR_DIR=${GIT_NAME}-${GIT_COMMIT} + print "TAR_DIR = $TAR_DIR" + + mv $GIT_DIR $TAR_DIR + + 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-phpdocumentor-reflection-docblock4.spec b/php-phpdocumentor-reflection-docblock4.spec new file mode 100644 index 0000000..779e09d --- /dev/null +++ b/php-phpdocumentor-reflection-docblock4.spec @@ -0,0 +1,200 @@ +# Fedora/remirepo spec file for php-phpdocumentor-reflection-docblock +# +# Copyright (c) 2017 Remi Collet, Shawn Iwinski +# 2014-2015 Remi Collet +# +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%global gh_commit 4aada1f93c72c35e22fb1383b47fee43b8f1d157 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner phpDocumentor +%global gh_project ReflectionDocBlock +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} + +Name: php-phpdocumentor-reflection-docblock +Version: 3.2.2 +Release: 1%{?dist} +Summary: DocBlock parser + +Group: Development/Libraries +License: MIT +URL: https://github.com/%{gh_owner}/%{gh_project} + +# GitHub export does not include tests. +# Run php-phpdocumentor-reflection-docblock-get-source.sh to create full source. +Source0: %{name}-%{version}-%{gh_commit}.tar.gz +Source1: %{name}-get-source.sh + +BuildArch: noarch +BuildRequires: php-fedora-autoloader-devel +%if %{with_tests} +BuildRequires: php(language) >= 5.5 +BuildRequires: php-composer(phpdocumentor/reflection-common) < 2 +BuildRequires: php-composer(phpdocumentor/reflection-common) >= 1.0 +BuildRequires: php-composer(phpdocumentor/type-resolver) < 1.0 +BuildRequires: php-composer(phpdocumentor/type-resolver) >= 0.3.0 +BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: php-composer(webmozart/assert) < 2 +BuildRequires: php-composer(webmozart/assert) >= 1.0 +# From composer.json, require-dev +# "mockery/mockery": "^0.9.4" +BuildRequires: php-composer(mockery/mockery) < 1 +BuildRequires: php-composer(mockery/mockery) >= 0.9.4 +# From phpcompatinfo report for 3.2.1 +BuildRequires: php-filter +BuildRequires: php-pcre +BuildRequires: php-reflection +BuildRequires: php-spl +%endif + +# From composer.json, require +# "php": ">=5.5" +# "phpdocumentor/reflection-common": "^1.0@dev", +# "phpdocumentor/type-resolver": "^0.3.0", +# "webmozart/assert": "^1.0" +Requires: php(language) >= 5.5 +Requires: php-composer(phpdocumentor/reflection-common) < 2 +Requires: php-composer(phpdocumentor/reflection-common) >= 1.0 +Requires: php-composer(phpdocumentor/type-resolver) < 1 +Requires: php-composer(phpdocumentor/type-resolver) >= 0.3.0 +Requires: php-composer(webmozart/assert) < 2 +Requires: php-composer(webmozart/assert) >= 1.0 +# From phpcompatinfo report for 3.2.1 +Requires: php-filter +Requires: php-pcre +Requires: php-reflection +Requires: php-spl +# Autoloader +Requires: php-composer(fedora/autoloader) + +Provides: php-composer(phpdocumentor/reflection-docblock) = %{version} + +Conflicts: drush < 8.1.10-2 +Conflicts: php-bartlett-PHP-Reflect < 4.0.2-3 +Conflicts: php-consolidation-annotated-command < 2.4.8 +Conflicts: php-phpdocumentor-reflection < 1.0.7-3 +Conflicts: php-phpspec-prophecy < 1.7.0-4 + + +%description +The ReflectionDocBlock component of phpDocumentor provides a DocBlock +parser that is fully compatible with the PHPDoc standard. + +With this component, a library can provide support for annotations via +DocBlocks or otherwise retrieve information that is embedded in a DocBlock. + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + +sed 's#vendor/mockery/mockery/library#%{_datadir}/php#' phpunit.xml.dist \ + > phpunit.xml + + +%build +phpab \ + --template fedora \ + --output src/DocBlock/autoload.php \ + src/ + +cat < - 3.2.2-1 +- Update to 3.2.2 + +* Mon Aug 7 2017 Remi Collet - 3.2.1-2 +- add patch to fix BC break, thanks to Koschei, from + https://github.com/phpDocumentor/ReflectionDocBlock/pull/113 + +* Sat Aug 05 2017 Shawn Iwinski - 3.2.1-1 +- Update to 3.2.1 (RHBZ #1471379) + +* Tue Jul 18 2017 Shawn Iwinski - 3.2.0-1 +- Update to 3.2.0 (RHBZ #1471379) + +* Fri May 5 2017 Shawn Iwinski , Remi Collet - 3.1.1-1 +- update to 3.1.1 +- raise dependency on PHP 5.5 +- add dependency on phpdocumentor/reflection-common +- add dependency on phpdocumentor/type-resolver +- add dependency on webmozart/assert +- switch to fedora/autoloader + +* Sat Feb 11 2017 Fedora Release Engineering - 2.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 2.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 2.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Feb 11 2015 Remi Collet - 2.0.4-1 +- update to 2.0.4 +- LICENSE is in upstream archive + +* Tue Feb 3 2015 Remi Collet - 2.0.3-2 +- add LICENSE from upstream repository + +* Fri Dec 19 2014 Remi Collet - 2.0.3-1 +- initial package +- open https://github.com/phpDocumentor/ReflectionDocBlock/issues/40 + for missing LICENSE file -- cgit