summaryrefslogtreecommitdiffstats
path: root/php-zendframework-zend-permissions-rbac.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-zendframework-zend-permissions-rbac.spec')
-rw-r--r--php-zendframework-zend-permissions-rbac.spec31
1 files changed, 16 insertions, 15 deletions
diff --git a/php-zendframework-zend-permissions-rbac.spec b/php-zendframework-zend-permissions-rbac.spec
index 1478932..5a1119d 100644
--- a/php-zendframework-zend-permissions-rbac.spec
+++ b/php-zendframework-zend-permissions-rbac.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.5.1
-Release: 1%{?dist}
+Release: 5%{?dist}
Summary: Zend Framework Permissions/%{library} component
Group: Development/Libraries
@@ -30,7 +30,8 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Patch0: https://patch-diff.githubusercontent.com/raw/zendframework/zend-permissions-rbac/pull/31.patch
+
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -65,6 +66,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
mv LICENSE.md LICENSE
@@ -74,8 +76,6 @@ mv LICENSE.md LICENSE
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{php_home}/Zend/Permissions
cp -pr src %{buildroot}%{php_home}/Zend/Permissions/%{library}
@@ -90,27 +90,24 @@ Zend\\Loader\\AutoloaderFactory::factory(array(
'Zend\\Loader\\StandardAutoloader' => array(
'namespaces' => array(
'ZendTest\\\\Permissions\\\\%{library}' => dirname(__DIR__).'/test/',
- 'Zend\\\\Permissions\\\\%{library}' => '%{buildroot}%{php_home}/Zend/%{library}'
+ 'Zend\\\\Permissions\\\\%{library}' => '%{buildroot}%{php_home}/Zend/Permissions/%{library}'
))));
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 || 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
@@ -120,5 +117,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Oct 31 2017 Remi Collet <remi@remirepo.net> - 2.5.1-5
+- fix FTBFS from Koschei, add patch for tests with PHP 7.2
+ https://github.com/zendframework/zend-permissions-rbac/pull/31
+
* Tue Aug 4 2015 Remi Collet <remi@fedoraproject.org> - 2.5.1-1
- initial package