diff --git a/.gitignore b/.gitignore index cf7640b..b78259f 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/php-sabre-xml2.spec b/php-sabre-xml2.spec index 8d4c32d..00a4d1d 100644 --- a/php-sabre-xml2.spec +++ b/php-sabre-xml2.spec @@ -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 - 2.2.5-1 +- update to 2.2.5 + * Wed Jan 27 2021 Fedora Release Engineering - 2.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 7198854..49718ef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-sabre-xml2-2.2.3-c3b959f.tgz) = 3eee3540306f6defdbf0f860a7dc7d40964cca56f28d2c73011ba4c8edc43d272182fdbca16f26e9901d81f269b19d7c46a92b2bf32e04fa44fa3bbbccdb6c7b +SHA512 (php-sabre-xml2-2.2.5-a6af111.tgz) = 2139d9cbeb29f5d42603aff275cfe627eb9b8a73a8510661750278650a97361a47777b4324223aa3f52e8d5a0eea5843fba24bd0a39a85d85577d89fbe6183f2