summaryrefslogtreecommitdiffstats
path: root/php-theseer-autoload.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-06-26 08:48:21 +0200
committerRemi Collet <remi@remirepo.net>2017-06-26 08:48:21 +0200
commit61e142e10af7bcfc69139e0d3b49125c549ec302 (patch)
tree41a4bfaebd7ef7c5cd48a3beeee194e223871c4d /php-theseer-autoload.spec
parentcb9e67d227f1bfeeb62f0613bed344264e657d5f (diff)
v1.24.0
Diffstat (limited to 'php-theseer-autoload.spec')
-rw-r--r--php-theseer-autoload.spec46
1 files changed, 19 insertions, 27 deletions
diff --git a/php-theseer-autoload.spec b/php-theseer-autoload.spec
index 5471816..75145ff 100644
--- a/php-theseer-autoload.spec
+++ b/php-theseer-autoload.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 4466c1d32c2dadb40cbe598b656a485e6175a00d
+%global gh_commit c764a62ac6e558cb22e7a1ce09f4f9554b385937
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner theseer
%global gh_project Autoload
@@ -15,7 +15,7 @@
%global pear_channel pear.netpirates.net
Name: php-theseer-autoload
-Version: 1.23.0
+Version: 1.24.0
Release: 1%{?dist}
Summary: A tool and library to generate autoload code
@@ -27,16 +27,21 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
# Autoloader path
Patch0: %{gh_project}-rpm.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 5.3.1
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "~4.0|~5.0",
+# "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
# "squizlabs/php_codesniffer": "~1.5"
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(theseer/directoryscanner) >= 1.3
BuildRequires: php-composer(theseer/directoryscanner) < 2
BuildRequires: php-composer(zetacomponents/console-tools) >= 1.7
+%if 0%{?fedora} >= 26
+%global phpunit %{_bindir}/phpunit6
+%else
+%global phpunit %{_bindir}/phpunit
+%endif
+BuildRequires: %{phpunit}
# From composer.json, "require": {
# "theseer/directoryscanner": "~1.3",
@@ -91,7 +96,6 @@ sed -e 's/@VERSION@/%{version}/' -i phpab.php
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}
cp -pr src %{buildroot}%{php_home}/%{gh_project}
@@ -105,31 +109,16 @@ cat <<EOF | tee tests/init.php
require '%{buildroot}%{_datadir}/php/TheSeer/Autoload/autoload.php';
EOF
-# remirepo:13
-run=0
ret=0
-if which php56; then
- : Run upstream test suite with PHP 5
- php56 %{_bindir}/phpunit || ret=1
- run=1
-fi
-if which php71; then
- : Run upstream test suite with PHP 7
- php71 %{_bindir}/phpunit || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-: Run upstream test suite
-%{_bindir}/phpunit --verbose
-# remirepo:2
-fi
+for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do
+ if which $cmd; then
+ set $cmd
+ $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1
+ fi
+done
exit $ret
-%clean
-rm -rf %{buildroot}
-
-
%pre
if [ -x %{_bindir}/pear ]; then
%{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
@@ -138,7 +127,6 @@ fi
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README.md composer.json
@@ -147,6 +135,10 @@ fi
%changelog
+* Mon Jun 26 2017 Remi Collet <remi@remirepo.net> - 1.24.0-1
+- Update to 1.24.0
+- use phpunit6 on F26+
+
* Wed Dec 21 2016 Remi Collet <remi@fedoraproject.org> - 1.23.0-1
- update to 1.23.0