# remirepo/Fedora spec file for php-aura-di # # Copyright (c) 2015-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %bcond_without tests %global bootstrap 0 %global gh_commit f676b38a0d1c3b0d7897b0a082f4811eb8b08faa %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner auraphp %global gh_project Aura.Di %global pk_owner aura %global pk_project di %global ns_owner Aura %global ns_project Di %global php_home %{_datadir}/php Name: php-%{pk_owner}-%{pk_project} Version: 3.4.0 Release: 9%{?dist} Summary: A serializable dependency injection container Group: Development/Libraries License: MIT 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 # Minimal patch for PHP 8 Patch0: %{name}-php8.patch BuildArch: noarch BuildRequires: php-composer(fedora/autoloader) # Tests %if %{with tests} BuildRequires: php(language) >= 5.5.0 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(container-interop/container-interop) >= 1.0 with php-composer(container-interop/container-interop) < 2) # remirepo:4 %else BuildRequires: php-composer(container-interop/container-interop) < 2 BuildRequires: php-composer(container-interop/container-interop) >= 1.0 %endif BuildRequires: php-reflection BuildRequires: php-spl BuildRequires: php-composer(phpunit/phpunit) # From composer.json, "require-dev": { # "mouf/picotainer": "~1.0", # "acclimate/container": "~1.0", # "phpunit/phpunit": "~5.7 || ~4.8" %endif # From composer, "require": { # "php": ">=5.5.0" # "container-interop/container-interop": "~1.0" Requires: php(language) >= 5.5.0 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(container-interop/container-interop) >= 1.0 with php-composer(container-interop/container-interop) < 2) # remirepo:4 %else Requires: php-composer(container-interop/container-interop) < 2 Requires: php-composer(container-interop/container-interop) >= 1.0 %endif # From phpcompatinfo report for version 3.2.0 Requires: php-reflection Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) Provides: php-composer(%{pk_owner}/%{pk_project}) = %{version} Provides: php-composer(container-interop/container-interop-implementation) = 1.0 %description A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more. Autoloader: %{php_home}/%{ns_owner}/%{ns_project}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 %build cat << 'EOF' | tee -a src/autoload.php - 3.4.0-9 - add minimal fix for PHP 8 - use range dependencies * Tue Aug 8 2017 Remi Collet - 3.4.0-1 - Update to 3.4.0 * Thu Dec 15 2016 Remi Collet - 3.2.0-1 - update to 3.2.0 - License is now MIT - update package Summary and Description - raise dependency on PHP 5.5 - add dependency on container-interop/container-interop - provide container-interop/container-interop-implementation - switch to fedora/autoloader * Fri Jul 1 2016 Remi Collet - 2.2.4-1 - initial package