diff options
author | Remi Collet <remi@remirepo.net> | 2020-01-10 14:17:38 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-01-10 14:17:38 +0100 |
commit | ffaaf3bb1fdd2f5fdbd91935b7771cffdc6ea59e (patch) | |
tree | 861a71c1b988c55c6013cdb3a614da8d3ad6a691 | |
parent | d81523791f538cd0edc19036feb9553a1db1b47c (diff) |
-rw-r--r-- | composer.json | 7 | ||||
-rw-r--r-- | php-http-interop-http-middleware.spec | 37 |
2 files changed, 23 insertions, 21 deletions
diff --git a/composer.json b/composer.json index b28542e..7a2d229 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,11 @@ { "name": "http-interop/http-middleware", - "description": "Common interface for HTTP middleware", + "description": "Common interface for HTTP server-side middleware", "keywords": [ "psr", "psr-7", - "psr-17", + "psr-15", "http", - "factory", "middleware", "request", "response" @@ -24,7 +23,7 @@ }, "autoload": { "psr-4": { - "Interop\\Http\\Middleware\\": "src/" + "Interop\\Http\\Server\\": "src/" } }, "extra": { diff --git a/php-http-interop-http-middleware.spec b/php-http-interop-http-middleware.spec index e93af30..64386fb 100644 --- a/php-http-interop-http-middleware.spec +++ b/php-http-interop-http-middleware.spec @@ -1,39 +1,44 @@ # remirepo/fedora spec file for php-http-interop-http-middleware # -# Copyright (c) 2016-2017 Remi Collet +# Copyright (c) 2016-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit ff545c87e97bf4d88f0cb7eb3e89f99aaa53d7a9 +%global gh_commit b49e1f9f6c584e704317b563302e566b8ce11858 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner http-interop %global gh_project http-middleware Name: php-%{gh_owner}-%{gh_project} -Version: 0.2.0 +Version: 0.5.0 Release: 1%{?dist} Summary: Common interface for HTTP middleware -Group: Development/Libraries License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php-cli -BuildRequires: php-composer(psr/http-message) >= 1.0 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(psr/http-message) >= 1.0 with php-composer(psr/http-message) < 2) +%else +BuildRequires: php-psr-http-message +%endif BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { # "php": ">=5.3.0", # "psr/http-message": "^1.0" Requires: php(language) > 5.3 -Requires: php-composer(psr/http-message) >= 1.0 -Requires: php-composer(psr/http-message) < 2 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(psr/http-message) >= 1.0 with php-composer(psr/http-message) < 2) +%else +Requires: php-psr-http-message +%endif # From phpcompatinfo: none # Autoloader Requires: php-composer(fedora/autoloader) @@ -58,7 +63,7 @@ cat << 'AUTOLOAD' | tee src/autoload.php /* Autoloader for %{name} and its dependencies */ require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('Interop\\Http\\Middleware\\', __DIR__); +\Fedora\Autoloader\Autoload::addPsr4('Interop\\Http\\Server\\', __DIR__); \Fedora\Autoloader\Dependencies::required(array( '%{_datadir}/php/Psr/Http/Message/autoload.php', @@ -67,7 +72,6 @@ AUTOLOAD %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/php/Interop/Http cp -pr src %{buildroot}%{_datadir}/php/Interop/Http/Middleware @@ -75,7 +79,7 @@ cp -pr src %{buildroot}%{_datadir}/php/Interop/Http/Middleware %check php -r ' require "%{buildroot}%{_datadir}/php/Interop/Http/Middleware/autoload.php"; -if (interface_exists("Interop\\Http\\Middleware\\ServerMiddlewareInterface")) { +if (interface_exists("Interop\\Http\\Server\\MiddlewareInterface")) { echo "Autoload OK\n"; exit (0); } else { @@ -84,12 +88,8 @@ if (interface_exists("Interop\\Http\\Middleware\\ServerMiddlewareInterface")) { }' -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -100,5 +100,8 @@ rm -rf %{buildroot} %changelog +* Fri Jan 10 2020 Remi Collet <remi@remirepo.net> - 0.5.0-1 +- update to 0.5.0 + * Thu Nov 10 2016 Remi Collet <remi@fedoraproject.org> - 0.2.0-1 - initial package |