summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-01-07 08:58:52 +0100
committerRemi Collet <fedora@famillecollet.com>2016-01-07 08:58:52 +0100
commit6e3348eb2bbfcaf6e1bcda15399095f0a83126d4 (patch)
tree5eb3774577caee3cf2d3f6c3f7de0c5c2de68ed7
parentc45127306479f8a3605bbc98c30528674d8a0f1b (diff)
php-di: add backport stuff
-rw-r--r--Makefile4
-rwxr-xr-xphp-di-get-source.sh2
-rw-r--r--php-di.spec15
3 files changed, 20 insertions, 1 deletions
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-di-get-source.sh b/php-di-get-source.sh
index ba71f5d..48b8385 100755
--- a/php-di-get-source.sh
+++ b/php-di-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-di.spec b/php-di.spec
index 930f9af..a90b93b 100644
--- a/php-di.spec
+++ b/php-di.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-di, from:
#
# Fedora spec file for php-di
#
@@ -60,6 +61,7 @@ URL: http://php-di.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}
@@ -164,6 +166,7 @@ AUTOLOAD
%install
+rm -rf %{buildroot}
mkdir -p %{buildroot}%{phpdir}
cp -rp src/* %{buildroot}%{phpdir}/
@@ -187,12 +190,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 change-log.md
@@ -202,5 +214,8 @@ BOOTSTRAP
%changelog
+* Thu Jan 7 2016 Remi Collet <remi@remirepo.net> - 5.2.0-1
+- backport for #remirepo
+
* Sun Jan 03 2016 Shawn Iwinski <shawn@iwin.ski> - 5.2.0-1
- Initial package