|
|
|
@ -32,7 +32,7 @@
|
|
|
|
|
|
|
|
|
|
Name: php-%{composer_vendor}-%{composer_project}
|
|
|
|
|
Version: %{github_version}
|
|
|
|
|
Release: 4%{?github_release}%{?dist}
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Summary: Fedora Autoloader
|
|
|
|
|
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
@ -46,7 +46,12 @@ BuildArch: noarch
|
|
|
|
|
BuildRequires: php-cli
|
|
|
|
|
## composer.json
|
|
|
|
|
BuildRequires: php(language) >= %{php_min_ver}
|
|
|
|
|
BuildRequires: php-composer(phpunit/phpunit)
|
|
|
|
|
%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8
|
|
|
|
|
%global phpunit %{_bindir}/phpunit6
|
|
|
|
|
%else
|
|
|
|
|
%global phpunit %{_bindir}/phpunit
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: %{phpunit}
|
|
|
|
|
BuildRequires: php-composer(theseer/autoload) >= %{phpab_min_ver}
|
|
|
|
|
BuildRequires: php-pear
|
|
|
|
|
## phpcompatinfo (computed from version 1.0.0)
|
|
|
|
@ -116,16 +121,12 @@ cp -p res/phpab/fedora*.php.tpl %{buildroot}%{phpab_template_dir}/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{with_tests}
|
|
|
|
|
%if 0%{?el6}
|
|
|
|
|
find tests -type f -print0 | xargs -0 sed -i 's/extends TestCase/extends \\PHPUnit_Framework_TestCase/'
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
RETURN_CODE=0
|
|
|
|
|
for PHP_EXEC in php %{?rhel:php54 php55} php56 php70 php71 php72; do
|
|
|
|
|
if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then
|
|
|
|
|
$PHP_EXEC \
|
|
|
|
|
-d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \
|
|
|
|
|
%{_bindir}/phpunit \
|
|
|
|
|
for PHP_EXEC in "php %{phpunit}" %{?rhel:php54 php55 php56} php70 "php71 %{_bindir}/phpunit6" "php72 %{_bindir}/phpunit6" "php73 %{_bindir}/phpunit6"; do
|
|
|
|
|
set $PHP_EXEC
|
|
|
|
|
if [ "php" == "$1" ] || which $PHP_EXEC; then
|
|
|
|
|
$1 -d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \
|
|
|
|
|
${2:-%{_bindir}/phpunit} \
|
|
|
|
|
--bootstrap %{buildroot}%{phpdir}/Fedora/Autoloader/autoload.php \
|
|
|
|
|
--verbose
|
|
|
|
|
fi
|
|
|
|
@ -149,6 +150,9 @@ exit $RETURN_CODE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Dec 4 2018 Remi Collet <remi@remirepo.net> - 1.0.0-5
|
|
|
|
|
- cleanup for EL-8
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|