From caac86460c145e43d8f04dcda9b6d2b15ebf5be1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 20 Dec 2017 08:19:51 +0100 Subject: Update to 1.6.2 (no change) use phpunit6 on Fedora --- php-jsonlint.spec | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/php-jsonlint.spec b/php-jsonlint.spec index 61fb288..f7feecf 100644 --- a/php-jsonlint.spec +++ b/php-jsonlint.spec @@ -13,8 +13,8 @@ %global github_owner Seldaek %global github_name jsonlint -%global github_version 1.6.1 -%global github_commit 50d63f2858d87c4738d5b76a7dcbb99fa8cf7c77 +%global github_version 1.6.2 +%global github_commit 7a30649c67ee0d19faacfd9fa2cfb6cc032d9b19 # "php": "^5.3 || ^7.0" %global php_min_ver 5.3 @@ -39,7 +39,14 @@ BuildArch: noarch %if %{with_tests} # For tests: composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) >= 4.5 +# See https://github.com/Seldaek/jsonlint/pull/46 +%if 0%{?fedora} >= 26 +%global phpunit %{_bindir}/phpunit6 +BuildRequires: phpunit6 +%else +%global phpunit %{_bindir}/phpunit +BuildRequires: php-phpunit-PHPUnit >= 4.8.35 +%endif # For tests: phpcompatinfo (computed from version 1.6.0) BuildRequires: php-json BuildRequires: php-pcre @@ -101,9 +108,12 @@ install -pm 0755 bin/jsonlint %{buildroot}%{_bindir}/jsonlint-php %if %{with_tests} ret=0 -for cmd in php php56 php70 php71 php72; do +for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do if which $cmd; then - $cmd %{_bindir}/phpunit --bootstrap %{buildroot}%{_datadir}/php/Seld/JsonLint/autoload.php \ + set $cmd + $1 ${2:-%{_bindir}/phpunit6} \ + --bootstrap %{buildroot}%{_datadir}/php/Seld/JsonLint/autoload.php \ + --no-coverage \ --verbose || ret=1 fi done @@ -116,7 +126,7 @@ exit $ret %files %{!?_licensedir:%global license %%doc} %license LICENSE -%doc *.mdown *md +%doc *md %doc composer.json %dir %{_datadir}/php/Seld %{_datadir}/php/Seld/JsonLint @@ -124,6 +134,10 @@ exit $ret %changelog +* Wed Dec 20 2017 Remi Collet - 1.6.2-1 +- Update to 1.6.2 (no change) +- use phpunit6 on Fedora + * Mon Jun 19 2017 Remi Collet - 1.6.1-1 - Update to 1.6.1 -- cgit