# remirepo/fedora spec file for php-sabre-xml # # Copyright (c) 2016-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global gh_commit a367665f1df614c3b8fefc30a54de7cd295e444e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project xml %global with_tests 0%{!?_without_tests:1} Name: php-sabre-%{gh_project} Summary: XML library that you may not hate Version: 1.5.1 Release: 4%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} License: BSD Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz Source1: %{name}-autoload.php BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.5.5 BuildRequires: php-xmlwriter BuildRequires: php-xmlreader BuildRequires: php-dom # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(sabre/uri) >= 1.0 with php-composer(sabre/uri) < 3) # remirepo:3 %else BuildRequires: php-sabre-uri %endif BuildRequires: php-pcre BuildRequires: php-spl # From composer.json, "require-dev": { # "sabre/cs": "~1.0.0", # "phpunit/phpunit" : "~4.8|~5.7" BuildRequires: php-composer(phpunit/phpunit) # Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require" : { # "php" : ">=5.5.5", # "ext-xmlwriter" : "*", # "ext-xmlreader" : "*",array # "ext-dom" : "*", # "lib-libxml" : ">=2.6.20", # "sabre/uri" : ">=1.0,<3.0.0" Requires: php(language) >= 5.5.5 Requires: php-xmlwriter Requires: php-xmlreader Requires: php-dom # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(sabre/uri) >= 1.0 with php-composer(sabre/uri) < 3) # remirepo:3 %else Requires: php-sabre-uri %endif # From phpcompatinfo report for version 1.4.0 Requires: php-pcre Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) Provides: php-composer(sabre/xml) = %{version} %description The sabre/xml library is a specialized XML reader and writer. Autoloader: %{_datadir}/php/Sabre/Xml/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} cp %{SOURCE1} lib/autoload.php %build # nothing to build %install # Install as a PSR-0 library mkdir -p %{buildroot}%{_datadir}/php/Sabre cp -pr lib %{buildroot}%{_datadir}/php/Sabre/Xml %check %if %{with_tests} mkdir vendor cat << 'EOF' | tee vendor/autoload.php - 1.5.1-4 - fix autoloader sabre/uri v1 and v2 * Mon Jul 1 2019 Remi Collet - 1.5.1-3 - only sabre/uri v1 * Wed Jan 9 2019 Remi Collet - 1.5.1-1 - update to 1.5.1 * Tue Jun 5 2018 Remi Collet - 1.5.0-6 - fix project URL * Sat Oct 29 2016 Remi Collet - 1.5.0-2 - switch from symfony/class-loader to fedora/autoloader * Mon Oct 10 2016 Remi Collet - 1.5.0-1 - update to 1.5.0 - raise dependency on PHP 5.5 * Fri May 20 2016 Remi Collet - 1.4.2-1 - update to 1.4.2 * Tue Mar 29 2016 Remi Collet - 1.4.1-1 - update to 1.4.1 * Fri Mar 11 2016 Remi Collet - 1.4.0-1 - Initial packaging