From 0d8d159ba9b0ea8fdd327614f57209cb5252b1d5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 5 Jan 2016 07:32:05 +0100 Subject: php-mnapoli-phpunit-easymock: add backport stuff --- Makefile | 4 ++++ php-mnapoli-phpunit-easymock-get-source.sh | 2 +- php-mnapoli-phpunit-easymock.spec | 15 +++++++++++++++ 3 files changed, 20 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-mnapoli-phpunit-easymock-get-source.sh b/php-mnapoli-phpunit-easymock-get-source.sh index ba71f5d..48b8385 100755 --- a/php-mnapoli-phpunit-easymock-get-source.sh +++ b/php-mnapoli-phpunit-easymock-get-source.sh @@ -43,6 +43,7 @@ print "GIT_REPO = $GIT_REPO" print "GIT_DIR = $GIT_DIR" TEMP_DIR=$(mktemp --dir) +TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz pushd $TEMP_DIR print "Cloning git repo..." @@ -58,7 +59,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-mnapoli-phpunit-easymock.spec b/php-mnapoli-phpunit-easymock.spec index a697689..ed82e12 100644 --- a/php-mnapoli-phpunit-easymock.spec +++ b/php-mnapoli-phpunit-easymock.spec @@ -1,3 +1,4 @@ +# remirepo spec file for php-mnapoli-phpunit-easymock, from: # # Fedora spec file for php-mnapoli-phpunit-easymock # @@ -42,6 +43,7 @@ URL: https://github.com/%{github_owner}/%{github_name} 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} @@ -109,6 +111,7 @@ AUTOLOAD %install +rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir}/EasyMock cp -rp src/* %{buildroot}%{phpdir}/EasyMock/ @@ -128,12 +131,21 @@ BOOTSTRAP : Run tests %{_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 %doc *.md @@ -142,6 +154,9 @@ BOOTSTRAP %changelog +* Tue Jan 5 2016 Remi Collet - 0.2.1-1 +- backport for #remirepo + * Mon Jan 04 2016 Shawn Iwinski - 0.2.1-1 - Updated to 0.2.1 - Fixed directory ownership in %%files -- cgit