summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--php-zendframework-zend-ldap.spec21
2 files changed, 16 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/php-zendframework-zend-ldap.spec b/php-zendframework-zend-ldap.spec
index d800f4f..e9ee6e4 100644
--- a/php-zendframework-zend-ldap.spec
+++ b/php-zendframework-zend-ldap.spec
@@ -30,7 +30,6 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -107,8 +106,6 @@ mv LICENSE.md LICENSE
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{php_home}/Zend/
cp -pr src %{buildroot}%{php_home}/Zend/%{library}
@@ -118,6 +115,7 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
+# TODO php-mock found by PSR-0 rules
require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory(array(
'Zend\Loader\StandardAutoloader' => array(
@@ -128,22 +126,19 @@ Zend\Loader\AutoloaderFactory::factory(array(
require_once '%{php_home}/Zend/autoload.php';
EOF
-%{_bindir}/phpunit --include-path=%{buildroot}%{php_home}
-
-if which php70; then
- php70 %{_bindir}/phpunit --include-path=%{buildroot}%{php_home}
-fi
+ret=0
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit --include-path=%{buildroot}%{php_home} || ret=1
+ fi
+done
+exit $ret
%else
: Test suite disabled
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md