summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-01-07 16:46:55 +0100
committerRemi Collet <fedora@famillecollet.com>2016-01-07 16:46:55 +0100
commitac2555e14d71efda864aae692546c0ad9e6b2aba (patch)
treec1385f1d4a97cbf5a41454947d7b451b2509f2df
parent80c8806f7b5bbe3d4af75c01a14b1535bf6118d2 (diff)
php-di-symfony2-bridge: add backport stuff
-rw-r--r--Makefile4
-rwxr-xr-xphp-di-symfony2-bridge-get-source.sh4
-rw-r--r--php-di-symfony2-bridge.spec16
3 files changed, 23 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-symfony2-bridge-get-source.sh b/php-di-symfony2-bridge-get-source.sh
index ba71f5d..061389a 100755
--- a/php-di-symfony2-bridge-get-source.sh
+++ b/php-di-symfony2-bridge-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
+COMPOSER=$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 $COMPOSER
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-di-symfony2-bridge.spec b/php-di-symfony2-bridge.spec
index e5d100d..50b9275 100644
--- a/php-di-symfony2-bridge.spec
+++ b/php-di-symfony2-bridge.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-di-symfony2-bridge, from:
#
# Fedora spec file for php-di-symfony2-bridge
#
@@ -43,6 +44,7 @@ URL: http://php-di.org/doc/frameworks/symfony2.html
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}
@@ -114,6 +116,8 @@ AUTOLOAD
%install
+rm -rf %{buildroot}
+
mkdir -p %{buildroot}%{phpdir}
cp -rp src/* %{buildroot}%{phpdir}/
@@ -130,12 +134,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
@@ -145,5 +158,8 @@ BOOTSTRAP
%changelog
+* Thu Jan 7 2016 Remi Collet <remi@remirepo.net> - 1.1.0-1
+- backport for #remirepo
+
* Sun Jan 03 2016 Shawn Iwinski <shawn@iwin.ski> - 1.1.0-1
- Initial package