From febe682c1abb0099dc07458d77c2cdf519196f3f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 31 Jan 2016 18:39:01 +0100 Subject: php-guzzlehttp-guzzle6: backport for #remirepo --- Makefile | 4 ++++ php-guzzlehttp-guzzle6-get-source.sh | 4 +++- php-guzzlehttp-guzzle6.spec | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Makefile 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/php-guzzlehttp-guzzle6-get-source.sh b/php-guzzlehttp-guzzle6-get-source.sh index ba71f5d..2397e9b 100755 --- a/php-guzzlehttp-guzzle6-get-source.sh +++ b/php-guzzlehttp-guzzle6-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-${VERSION}.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-guzzlehttp-guzzle6.spec b/php-guzzlehttp-guzzle6.spec index 0865b89..f8e9de4 100644 --- a/php-guzzlehttp-guzzle6.spec +++ b/php-guzzlehttp-guzzle6.spec @@ -1,3 +1,4 @@ +# remirepo spec file for php-guzzlehttp-guzzle6, from: # # Fedora spec file for php-guzzlehttp-guzzle6 # @@ -50,6 +51,7 @@ URL: http://guzzlephp.org 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} @@ -152,6 +154,7 @@ AUTOLOAD %install +rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir}/GuzzleHttp6 cp -pr src/* %{buildroot}%{phpdir}/GuzzleHttp6/ @@ -167,12 +170,21 @@ $fedoraPsr4ClassLoader->addPrefix('GuzzleHttp\\Tests\\', __DIR__.'/tests'); AUTOLOAD %{_bindir}/phpunit --verbose + +if which php70; then + php70 %{_bindir}/phpunit --verbose +fi %else : Tests skipped %endif +%clean +rm -rf %{buildroot} + + %files +%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -181,6 +193,9 @@ AUTOLOAD %changelog +* Sun Jan 31 2016 Remi Collet - 6.1.1-2 +- backport for remi repository + * Thu Jan 28 2016 Shawn Iwinski - 6.1.1-2 - Added min version of autoloader dependency - Fix directory ownership -- cgit