Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe209eaba1 |
3 changed files with 27 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,3 +3,4 @@
|
|||
/php-sabre-xml2-2.2.0-705f5cb.tgz
|
||||
/php-sabre-xml2-2.2.1-41c6ba1.tgz
|
||||
/php-sabre-xml2-2.2.3-c3b959f.tgz
|
||||
/php-sabre-xml2-2.2.5-a6af111.tgz
|
||||
|
|
|
|||
|
|
@ -6,8 +6,11 @@
|
|||
#
|
||||
# Please, preserve the changelog entries
|
||||
#
|
||||
|
||||
%bcond_without tests
|
||||
|
||||
# Github
|
||||
%global gh_commit c3b959f821c19b36952ec4a595edd695c216bfc6
|
||||
%global gh_commit a6af111850e7536d200d9637c34885cd3c77a86c
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_owner sabre-io
|
||||
%global gh_project xml
|
||||
|
|
@ -18,12 +21,11 @@
|
|||
%global ns_vendor Sabre
|
||||
%global ns_project Xml
|
||||
%global major 2
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
|
||||
Name: php-%{pk_vendor}-%{pk_project}%{major}
|
||||
Summary: XML library that you may not hate
|
||||
Version: 2.2.3
|
||||
Release: 2%{?dist}
|
||||
Version: 2.2.5
|
||||
Release: 1%{?dist}
|
||||
|
||||
URL: https://github.com/%{gh_owner}/%{gh_project}
|
||||
License: BSD
|
||||
|
|
@ -32,7 +34,7 @@ Source0: %{name}-%{version}-%{gh_short}.tgz
|
|||
Source1: makesrc.sh
|
||||
|
||||
BuildArch: noarch
|
||||
%if %{with_tests}
|
||||
%if %{with tests}
|
||||
BuildRequires: php(language) >= 7.1
|
||||
BuildRequires: php-xmlwriter
|
||||
BuildRequires: php-xmlreader
|
||||
|
|
@ -42,9 +44,11 @@ BuildRequires: php-libxml
|
|||
BuildRequires: php-pcre
|
||||
BuildRequires: php-spl
|
||||
# From composer.json, "require-dev": {
|
||||
# "friendsofphp/php-cs-fixer": "~2.17.1",
|
||||
# "phpstan/phpstan": "^0.12",
|
||||
# "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
|
||||
BuildRequires: phpunit8 >= 8.5
|
||||
BuildRequires: phpunit9
|
||||
%global phpunit %{_bindir}/phpunit9
|
||||
%endif
|
||||
# Autoloader
|
||||
BuildRequires: php-fedora-autoloader-devel
|
||||
|
|
@ -110,7 +114,14 @@ cp -pr lib %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}
|
|||
|
||||
|
||||
%check
|
||||
%if %{with_tests}
|
||||
: Check version
|
||||
php -r '
|
||||
require "%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php";
|
||||
echo Sabre\Xml\Version::VERSION . "\n";
|
||||
exit (Sabre\Xml\Version::VERSION === "%{version}" ? 0 : 1);
|
||||
'
|
||||
|
||||
%if %{with tests}
|
||||
mkdir vendor
|
||||
cat << 'EOF' | tee vendor/autoload.php
|
||||
<?php
|
||||
|
|
@ -121,9 +132,10 @@ cd tests
|
|||
|
||||
: Run upstream test suite against installed library
|
||||
ret=0
|
||||
for cmd in php php72 php73 php74 php80; do
|
||||
if which $cmd; then
|
||||
$cmd %{_bindir}/phpunit8 || ret=1
|
||||
for cmdarg in "php %{phpunit}" php73 php74 php80 php81; do
|
||||
if which $cmdarg; then
|
||||
set $cmdarg
|
||||
$1 ${2:-%{_bindir}/phpunit9} || ret=1
|
||||
fi
|
||||
done
|
||||
exit $ret
|
||||
|
|
@ -140,6 +152,9 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Nov 4 2021 Remi Collet <remi@remirepo.net> - 2.2.5-1
|
||||
- update to 2.2.5
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (php-sabre-xml2-2.2.3-c3b959f.tgz) = 3eee3540306f6defdbf0f860a7dc7d40964cca56f28d2c73011ba4c8edc43d272182fdbca16f26e9901d81f269b19d7c46a92b2bf32e04fa44fa3bbbccdb6c7b
|
||||
SHA512 (php-sabre-xml2-2.2.5-a6af111.tgz) = 2139d9cbeb29f5d42603aff275cfe627eb9b8a73a8510661750278650a97361a47777b4324223aa3f52e8d5a0eea5843fba24bd0a39a85d85577d89fbe6183f2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue