|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
# spec file for php-pear-PHP-CodeSniffer
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2013-2017 Remi Collet
|
|
|
|
|
# Copyright (c) 2013-2018 Remi Collet
|
|
|
|
|
# Copyright (c) 2009-2013 Christof Damian
|
|
|
|
|
# Copyright (c) 2006-2009 Konstantin Ryabitsev
|
|
|
|
|
#
|
|
|
|
@ -13,11 +13,10 @@
|
|
|
|
|
%global pear_name PHP_CodeSniffer
|
|
|
|
|
|
|
|
|
|
Name: php-pear-PHP-CodeSniffer
|
|
|
|
|
Version: 3.2.2
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Version: 3.2.3
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: PHP coding standards enforcement tool
|
|
|
|
|
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://pear.php.net/package/PHP_CodeSniffer
|
|
|
|
|
Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz
|
|
|
|
@ -26,10 +25,10 @@ BuildArch: noarch
|
|
|
|
|
BuildRequires: php(language) >= 5.4
|
|
|
|
|
BuildRequires: php-pear
|
|
|
|
|
# to run test suite
|
|
|
|
|
%if 0%{?fedora} >= 26
|
|
|
|
|
%global phpunit %{_bindir}/phpunit6
|
|
|
|
|
%if 0%{?fedora} >= 28
|
|
|
|
|
%global phpunit %{_bindir}/phpunit7
|
|
|
|
|
%else
|
|
|
|
|
%global phpunit %{_bindir}/phpunit
|
|
|
|
|
%global phpunit %{_bindir}/phpunit6
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: %{phpunit}
|
|
|
|
|
|
|
|
|
@ -91,12 +90,12 @@ install -pm 644 %{pear_name}.xml %{buildroot}%{pear_xmldir}
|
|
|
|
|
%check
|
|
|
|
|
cd %{pear_name}-%{version}
|
|
|
|
|
|
|
|
|
|
# Version 3.1.0: Tests: 242, Assertions: 88, Skipped: 3.
|
|
|
|
|
# Version 3.2.3: Tests: 294, Assertions: 320, Skipped: 3.
|
|
|
|
|
ret=0
|
|
|
|
|
for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do
|
|
|
|
|
for cmdarg in "php %{phpunit}" "php70 %{_bindir}/phpunit6" php71 php72; do
|
|
|
|
|
if which $cmdarg; then
|
|
|
|
|
set $cmdarg
|
|
|
|
|
$1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1
|
|
|
|
|
$1 -d memory_limit=1G ${2:-%{_bindir}/phpunit7} --verbose || ret=1
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
exit $ret
|
|
|
|
@ -124,6 +123,10 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Feb 21 2018 Remi Collet <remi@remirepo.net> - 3.2.3-1
|
|
|
|
|
- Update to 3.2.3
|
|
|
|
|
- use phpunit7 on F28+
|
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|