diff options
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | php-phpseclib.spec | 41 |
2 files changed, 30 insertions, 13 deletions
diff --git a/composer.json b/composer.json index 4b84b11..b4e8a1c 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ }, "require-dev": { "phing/phing": "~2.7", - "phpunit/phpunit": "~4.0", + "phpunit/phpunit": "^4.8.35|^5.7|^6.0", "sami/sami": "~2.0", "squizlabs/php_codesniffer": "~2.0" }, diff --git a/php-phpseclib.spec b/php-phpseclib.spec index fcf9da8..cfeece7 100644 --- a/php-phpseclib.spec +++ b/php-phpseclib.spec @@ -3,28 +3,36 @@ %global github_owner phpseclib %global github_name phpseclib -%global github_commit c9a3fe35e20eb6eeaca716d6a23cde03f52d1558 +%global github_commit d305b780829ea4252ed9400b3f5937c2c99b51d4 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %global with_tests 0%{!?_without_tests:1} Name: php-%{composer_vendor} -Version: 2.0.9 +Version: 2.0.10 Release: 1%{?dist} Summary: PHP Secure Communications Library - -Group: System Environment/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} + Source0: %{name}-%{version}-%{github_short}.tgz Source1: %{name}-autoload.php # Generate a full archive from git snapshot, with tests Source2: makesrc.sh +# remirepo:3 +# For test build on all available arch +#global debug_package %%{nil} +#global __debug_install_post /bin/true BuildArch: noarch %if %{with_tests} BuildRequires: php-composer(fedora/autoloader) -BuildRequires: %{_bindir}/phpunit +%if 0%{?fedora} >= 26 +%global phpunit %{_bindir}/phpunit6 +%else +%global phpunit %{_bindir}/phpunit +%endif +BuildRequires: %{phpunit} BuildRequires: %{_bindir}/phpab # Optional at runtime, to avoid too muck skipped tests BuildRequires: php-bcmath @@ -75,13 +83,18 @@ date_default_timezone_set('UTC'); EOF -ret=0 -for cmd in php php70 php71 php72; do - if which $cmd; then - $cmd %{_bindir}/phpunit || ret=1 - fi -done -exit $ret +if php %{phpunit} --atleast-version 4.8.35; then + ret=0 + for cmd in "php %{phpunit}" php70 php71 php72; do + if which $cmd; then + set $cmd + $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} --verbose || ret=1 + fi + done + exit $ret +else + : Skip test as PHPUnit is too old +fi %endif @@ -93,6 +106,10 @@ exit $ret %changelog +* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 2.0.10-1 +- Update to 2.0.10 +- skip tests with PHPUnit < 4.8.35 (EPEL-6) + * Wed Nov 29 2017 Remi Collet <remi@remirepo.net> - 2.0.9-1 - Update to 2.0.9 |