summaryrefslogtreecommitdiffstats
path: root/php-phpunit-PHP-TokenStream.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-phpunit-PHP-TokenStream.spec')
-rw-r--r--php-phpunit-PHP-TokenStream.spec63
1 files changed, 24 insertions, 39 deletions
diff --git a/php-phpunit-PHP-TokenStream.spec b/php-phpunit-PHP-TokenStream.spec
index e18ba79..a2c21dd 100644
--- a/php-phpunit-PHP-TokenStream.spec
+++ b/php-phpunit-PHP-TokenStream.spec
@@ -8,7 +8,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit e03f8f67534427a787e21a385a67ec3ca6978ea7
+%global gh_commit ecb0b2cdaa0add708fe6f329ef65ae0c5225130b
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project php-token-stream
@@ -16,13 +16,13 @@
%global pear_name PHP_TokenStream
%global pear_channel pear.phpunit.de
%if %{bootstrap}
-%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
+%global with_tests 0%{?_with_tests:1}
%else
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%global with_tests 0%{!?_without_tests:1}
%endif
Name: php-phpunit-PHP-TokenStream
-Version: 1.4.11
+Version: 2.0.0
Release: 1%{?dist}
Summary: Wrapper around PHP tokenizer extension
@@ -31,26 +31,25 @@ License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: php(language) >= 5.3.3
+BuildRequires: php(language) >= 7.0
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
-BuildRequires: php-pear-PHPUnit >= 3.7.0
+BuildRequires: phpunit6 >= 6.2.4
%endif
# From composer.json
-# "php": ">=5.3.3",
+# "php": "^7.0",
# "ext-tokenizer": "*"
-Requires: php(language) >= 5.3.3
+Requires: php(language) >= 7.0
Requires: php-tokenizer
-# From phpcompatinfo report for version 1.2.2
+# From phpcompatinfo report for version 2.0.0
Requires: php-pcre
Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
-Provides: php-composer(phpunit/php-token-stream) = %{version}
+Provides: php-composer(phpunit/%{gh_project}) = %{version}
# For compatibility with PEAR mode
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
@@ -72,45 +71,27 @@ phpab \
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}
cp -pr src %{buildroot}%{php_home}/PHP
%if %{with_tests}
%check
-: Autoloader already called from PHPUnit main autoloader
-sed -e '/autoload.php/d' \
- -i tests/bootstrap.php
+mkdir vendor
+touch vendor/autoload.php
-cd build
: Run upstream test suite
-# remirepo:13
-run=0
ret=0
-if which php56; then
- php56 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit || ret=1
- run=1
-fi
-if which php71; then
- php71 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/php -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
-%{_bindir}/phpunit --verbose
-# remirepo:2
-fi
+for cmd in php php70 php71 php72; do
+ if which $cmd; then
+ $cmd -d auto_prepend_file=%{buildroot}%{php_home}/PHP/Token/Stream/Autoload.php \
+ %{_bindir}/phpunit6 --verbose || ret=1
+ fi
+done
exit $ret
%endif
-%clean
-rm -rf %{buildroot}
-
-
%post
if [ -x %{_bindir}/pear ]; then
%{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
@@ -119,14 +100,18 @@ fi
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
-%doc README.md composer.json
+%doc *.md
+%doc composer.json
%{php_home}/PHP
%changelog
+* Fri Aug 4 2017 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- Update to 2.0.0
+- raise dependency on PHP 7.0
+
* Mon Feb 27 2017 Remi Collet <remi@fedoraproject.org> - 1.4.11-1
- Update to 1.4.11