update to 2.0.1
sources from git snapshot run upstream test suite
This commit is contained in:
parent
5485662d25
commit
09366ae32a
4 changed files with 66 additions and 9 deletions
|
|
@ -6,7 +6,8 @@
|
|||
#
|
||||
# Please, preserve the changelog entries
|
||||
#
|
||||
%global gh_commit 526dc996cc0ebdfa428cd2dfccd79b7b53fee346
|
||||
%global bootstrap 0
|
||||
%global gh_commit 0c69cbf965d5317ba33f24a352539f354a25db09
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_owner sebastianbergmann
|
||||
%global gh_project php-text-template
|
||||
|
|
@ -19,19 +20,31 @@
|
|||
%global php_home %{_datadir}/php
|
||||
%global ver_major 2
|
||||
|
||||
%if %{bootstrap}
|
||||
%global with_tests 0%{?_with_tests:1}
|
||||
%else
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
%endif
|
||||
|
||||
Name: php-%{pk_vendor}-%{pk_project}%{ver_major}
|
||||
Version: 2.0.0
|
||||
Version: 2.0.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Simple template engine
|
||||
|
||||
License: BSD
|
||||
URL: https://github.com/%{gh_owner}/%{gh_project}
|
||||
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
|
||||
Source0: %{name}-%{version}-%{gh_short}.tgz
|
||||
Source1: makesrc.sh
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: php(language) >= 7.3
|
||||
BuildRequires: php-cli
|
||||
BuildRequires: php-fedora-autoloader-devel
|
||||
%if %{with_tests}
|
||||
# From composer.json, require-dev
|
||||
# "phpunit/phpunit": "^9.0"
|
||||
BuildRequires: phpunit9
|
||||
%endif
|
||||
|
||||
# From composer.json
|
||||
# "php": "^7.3"
|
||||
|
|
@ -60,12 +73,22 @@ mkdir -p %{buildroot}%{php_home}/%{ns_vendor}
|
|||
cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}
|
||||
|
||||
|
||||
%if %{with_tests}
|
||||
%check
|
||||
: check autoloader
|
||||
php -r '
|
||||
require "%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}/autoload.php";
|
||||
exit (class_exists("%{ns_vendor}\\%{ns_project}\\Template") ? 0 : 1);
|
||||
'
|
||||
: Generate tests autoloader
|
||||
mkdir vendor
|
||||
%{_bindir}/phpab --output vendor/autoload.php tests
|
||||
|
||||
: Run upstream test suite
|
||||
ret=0
|
||||
for cmd in php php73 php74 php80; do
|
||||
if which $cmd; then
|
||||
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}/autoload.php \
|
||||
%{_bindir}/phpunit9 --verbose || ret=1
|
||||
fi
|
||||
done
|
||||
exit $ret
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
|
|
@ -77,6 +100,11 @@ exit (class_exists("%{ns_vendor}\\%{ns_project}\\Template") ? 0 : 1);
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Jun 16 2020 Remi Collet <remi@remirepo.net> - 2.0.1-1
|
||||
- update to 2.0.1
|
||||
- sources from git snapshot
|
||||
- run upstream test suite
|
||||
|
||||
* Fri Feb 7 2020 Remi Collet <remi@remirepo.net> - 2.0.0-1
|
||||
- update to 2.0.0
|
||||
- raise dependency on PHP 7.3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue