From 9be81f1ecc487f18cc14acc51e477d9b541d0ced Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 15 Apr 2016 14:42:06 +0200 Subject: php-league-climate: backport --- Makefile | 4 ++++ composer.json | 36 ++++++++++++++++++++++++++++++++++++ php-league-climate-get-source.sh | 4 +++- php-league-climate.spec | 16 ++++++++++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 Makefile create mode 100644 composer.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..24fbfbc --- /dev/null +++ b/composer.json @@ -0,0 +1,36 @@ +{ + "name": "league/climate", + "description": "PHP's best friend for the terminal. CLImate allows you to easily output colored text, special formats, and more.", + "keywords": ["cli","php", "terminal", "command", "colors"], + "license": "MIT", + "authors": [ + { + "name": "Joe Tannenbaum", + "email": "hey@joe.codes", + "homepage": "http://joe.codes/", + "role": "Developer" + } + ], + "require": { + "php": ">=5.4.0", + "seld/cli-prompt": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.6", + "mockery/mockery": "~0.9", + "mikey179/vfsStream": "~1.4" + }, + "autoload": { + "psr-4": { + "League\\CLImate\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "League\\CLImate\\Tests\\": "tests/" + } + }, + "scripts": { + "test": "phpunit" + } +} diff --git a/php-league-climate-get-source.sh b/php-league-climate-get-source.sh index ba71f5d..4ad1051 100755 --- a/php-league-climate-get-source.sh +++ b/php-league-climate-get-source.sh @@ -43,6 +43,8 @@ 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..." @@ -51,6 +53,7 @@ pushd $TEMP_DIR pushd $GIT_DIR print "Checking out commit..." $GIT checkout $GIT_COMMIT + cp composer.json $CMP_FILE popd TAR_DIR=${GIT_NAME}-${GIT_COMMIT} @@ -58,7 +61,6 @@ pushd $TEMP_DIR mv $GIT_DIR $TAR_DIR - TAR_FILE=`$RPM --eval='%{_sourcedir}'`/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz print "TAR_FILE = $TAR_FILE" [ -e $TAR_FILE ] && rm -f $TAR_FILE diff --git a/php-league-climate.spec b/php-league-climate.spec index 66b58ad..d7059d9 100644 --- a/php-league-climate.spec +++ b/php-league-climate.spec @@ -1,3 +1,4 @@ +# remirepo spec file for php-league-climate, from: # # Fedora spec file for php-league-climate # @@ -50,6 +51,7 @@ URL: http://climate.thephpleague.com/ Source0: %{name}-%{github_version}-%{github_commit}.tar.gz Source1: %{name}-get-source.sh +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests %if %{with_tests} @@ -132,6 +134,8 @@ AUTOLOAD %install +rm -rf %{buildroot} + mkdir -p %{buildroot}%{phpdir}/League/CLImate cp -rp src/* %{buildroot}%{phpdir}/League/CLImate/ @@ -157,12 +161,21 @@ BOOTSTRAP sed '/require.*vendor\/mikey179/d' -i tests/FileTest.php %{_bindir}/phpunit --verbose --bootstrap bootstrap.php + +if which php70; then + php70 %{_bindir}/phpunit --verbose --bootstrap bootstrap.php +fi %else : Tests skipped %endif +%clean +rm -rf %{buildroot} + + %files +%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE.md %doc CHANGELOG.md @@ -173,5 +186,8 @@ sed '/require.*vendor\/mikey179/d' -i tests/FileTest.php %changelog +* Fri Apr 15 2016 Remi Collet - 3.2.1-1 +- backport for remi repository + * Mon Apr 11 2016 Shawn Iwinski - 3.2.1-1 - Initial package -- cgit