diff options
-rw-r--r-- | php-container-interop.spec | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/php-container-interop.spec b/php-container-interop.spec index 7e8010b..cbe0f85 100644 --- a/php-container-interop.spec +++ b/php-container-interop.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-container-interop # -# Copyright (c) 2016 Shawn Iwinski <shawn@iwin.ski> +# Copyright (c) 2016-2017 Shawn Iwinski <shawn@iwin.ski> # # License: MIT # http://opensource.org/licenses/MIT @@ -18,11 +18,15 @@ %global composer_vendor container-interop %global composer_project container-interop +# "psr/container": "~1.0" +%global psr_container_min_ver 1.0 +%global psr_container_max_ver 2.0 + %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_project} Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 3%{?github_release}%{?dist} Summary: Promoting the interoperability of container objects (DIC, SL, etc.) Group: Development/Libraries @@ -30,24 +34,27 @@ License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch +# Tests BuildRequires: php-cli ## composer.json -BuildRequires: php-composer(psr/container) >= 1.0 +BuildRequires: php-composer(psr/container) < %{psr_container_max_ver} +BuildRequires: php-composer(psr/container) >= %{psr_container_min_ver} +## phpcompatinfo (computed from version 1.2.0) +BuildRequires: php(language) >= 5.3.0 ## Autoloader BuildRequires: php-composer(fedora/autoloader) # composer.json -Requires: php-composer(psr/container) >= 1.0 -Requires: php-composer(psr/container) < 2 +Requires: php-composer(psr/container) < %{psr_container_max_ver} +Requires: php-composer(psr/container) >= %{psr_container_min_ver} # phpcompatinfo (computed from version 1.2.0) Requires: php(language) >= 5.3.0 # Autoloader Requires: php-composer(fedora/autoloader) # php-{COMPOSER_VENDOR}-{COMPOSER_PROJECT} -Provides: php-%{composer_vendor}-%{composer_project} = %{version}-%{release} +Provides: php-%{composer_vendor}-%{composer_project} = %{version}-%{release} # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} @@ -92,9 +99,9 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Interop\\Container\\', __DIR__); -\Fedora\Autoloader\Dependencies::required([ +\Fedora\Autoloader\Dependencies::required(array( '%{phpdir}/Psr/Container/autoload.php', -]); +)); AUTOLOAD @@ -103,7 +110,6 @@ AUTOLOAD %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir} cp -rp src/* %{buildroot}%{phpdir}/ @@ -116,12 +122,7 @@ exit (interface_exists("Interop\\Container\\ContainerInterface") ? 0 : 1); ' -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -132,6 +133,12 @@ rm -rf %{buildroot} %changelog +* Sun Apr 02 2017 Shawn Iwinski <shawn@iwin.ski> - 1.2.0-3 +- Add dependency version macros + +* Sun Apr 02 2017 Shawn Iwinski <shawn@iwin.ski> - 1.2.0-2 +- Update autoloader for PHP < 5.4 (i.e. EPEL 6) + * Thu Mar 2 2017 Remi Collet <remi@remirepo.net> - 1.2.0-1 - update to 1.2.0 - add dependency on psr/container |