From 45898c463e64bf1ae76f7993b06cc64b14af93c7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 10 Jan 2020 13:30:53 +0100 Subject: new package --- php-webimpress-http-middleware-compatibility.spec | 133 ++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 php-webimpress-http-middleware-compatibility.spec (limited to 'php-webimpress-http-middleware-compatibility.spec') diff --git a/php-webimpress-http-middleware-compatibility.spec b/php-webimpress-http-middleware-compatibility.spec new file mode 100644 index 0000000..19bd1d9 --- /dev/null +++ b/php-webimpress-http-middleware-compatibility.spec @@ -0,0 +1,133 @@ +# remirepo/fedora spec file for php-webimpress-http-middleware-compatibility +# +# Copyright (c) 2020 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# + +%global with_tests 0%{!?_without_tests:1} +# Github +%global gh_commit 8ed1c2c7523dce0035b98bc4f3a73ca9cd1d3717 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner webimpress +%global gh_project http-middleware-compatibility +# Packagist +%global pk_vendor %{gh_owner} +%global pk_project %{gh_project} +%global major %nil + +Name: php-%{pk_vendor}-%{pk_project}%{major} +Version: 0.1.4 +Release: 1%{?dist} +Summary: Compatibility library for Draft PSR-15 HTTP Middleware + +License: BSD +URL: https://github.com/%{gh_owner}/%{gh_project} +Source0: %{name}-%{version}-%{?gh_short}.tgz +Source1: makesrc.sh + +BuildArch: noarch +%if %{with_tests} +BuildRequires: php(language) >= 5.4 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(http-interop/http-middleware) > 0.1.1 with php-composer(http-interop/http-middleware) < 0.6) +# For tests, from composer.json "require-dev": { +# "phpunit/phpunit": "^5.7.23 || ^6.4.3" +BuildRequires: phpunit6 > 6.4.3 +%global phpunit %{_bindir}/phpunit6 +# remirepo:5 +%else +BuildRequires: php-composer(http-interop/http-middleware) +BuildRequires: php-composer(phpunit/phpunit) >= 5.7.23 +%global phpunit %{_bindir}/phpunit +%endif +%endif + +# From composer.json, "require": { +# "php": "^5.6 || ^7.0", +# "http-interop/http-middleware": "^0.1.1 || ^0.2 || ^0.3 || ^0.4.1 || ^0.5", +# "webimpress/composer-extra-dependency": "^0.2.2" +Requires: php(language) >= 5.6 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(http-interop/http-middleware) > 0.1.1 with php-composer(http-interop/http-middleware) < 0.6) +# remirepo:3 +%else +Requires: php-composer(http-interop/http-middleware) +%endif +# From phpcompatinfo report for 0.1.4 +# Only core + +# Composer +Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} + + +%description +The purpose of the library is to deliver consistent interface for +different versions of http-interop/http-middleware which implements +Draft of PSR-15 HTTP Middleware. + +Many projects currently use different version of library +http-interop/http-middleware and updating to newest version requires +usually major release. The library lets consumers of your component +decide what version of http-interop/http-middleware they want to use +and allow them to migrate to the latest version at any time. + +Autoloader: %{_datadir}/php/%{pk_vendor}/%{pk_project}%{major}/autoload.php + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + +mv LICENSE.md LICENSE + + +%build +cat << 'EOF' | tee autoload/autoload.php + - 0.1.4-1 +- initial package -- cgit