summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-test.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-zendframework-zend-test.spec')
-rw-r--r--php-zendframework-zend-test.spec29
1 files changed, 21 insertions, 8 deletions
diff --git a/php-zendframework-zend-test.spec b/php-zendframework-zend-test.spec
index 1727fd5..9d47834 100644
--- a/php-zendframework-zend-test.spec
+++ b/php-zendframework-zend-test.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 9665205827ed6ee69f1ef82990362057c789250c
+%global gh_commit 9976fb519851276d56e201bc6211b3a94e6c3b19
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner zendframework
%global gh_project zend-test
@@ -20,8 +20,8 @@
%endif
Name: php-%{gh_owner}-%{gh_project}
-Version: 3.1.0
-Release: 3%{?dist}
+Version: 3.1.1
+Release: 1%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -30,8 +30,6 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-Patch0: https://patch-diff.githubusercontent.com/raw/zendframework/zend-test/pull/55.patch
-
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -135,7 +133,14 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1
+
+: Create dependency autoloader
+mv autoload/*.php src
+
+cat << 'EOF' | tee autoload.php
+<?php
+require_once __DIR__ . '/%{library}/phpunit-class-aliases.php';
+EOF
mv LICENSE.md LICENSE
@@ -148,12 +153,16 @@ mv LICENSE.md LICENSE
mkdir -p %{buildroot}%{php_home}/Zend/
cp -pr src %{buildroot}%{php_home}/Zend/%{library}
+install -m644 autoload.php %{buildroot}%{php_home}/Zend/%{library}-autoload.php
+
%check
%if %{with_tests}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
+define('RPM_BUILDROOT', '%{buildroot}%{php_home}/Zend');
+
require_once '%{php_home}/Zend/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory(array(
'Zend\Loader\StandardAutoloader' => array(
@@ -162,12 +171,11 @@ Zend\Loader\AutoloaderFactory::factory(array(
'Zend\\%{library}' => '%{buildroot}%{php_home}/Zend/%{library}'
))));
require_once '%{php_home}/Zend/autoload.php';
-require_once 'autoload/phpunit-class-aliases.php';
EOF
# 7.2: https://github.com/zendframework/zend-session/issues/74
ret=0
-for cmd in php php56 php70 php71; do
+for cmd in php php56 php70 php71 php72; do
if which $cmd; then
$cmd %{_bindir}/phpunit --verbose || ret=1
fi
@@ -189,9 +197,14 @@ exit $ret
%doc *.md
%doc composer.json
%{php_home}/Zend/%{library}
+%{php_home}/Zend/%{library}-autoload.php
%changelog
+* Mon Oct 30 2017 Remi Collet <remi@remirepo.net> - 3.1.1-1
+- Update to 3.1.1
+- add autoloader for class aliases
+
* Sun Oct 29 2017 Remi Collet <remi@remirepo.net> - 3.1.0-3
- fix FTBFS from Koschei, add fix for recent PHPUnit from
https://github.com/zendframework/zend-test/pull/55