From dcae1200cd071cc21a1a9c7eb8bf81579d5159f8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 29 Nov 2018 13:13:36 +0100 Subject: cleanup --- php-symfony-monolog-bundle.spec | 213 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 php-symfony-monolog-bundle.spec (limited to 'php-symfony-monolog-bundle.spec') diff --git a/php-symfony-monolog-bundle.spec b/php-symfony-monolog-bundle.spec new file mode 100644 index 0000000..30a09bb --- /dev/null +++ b/php-symfony-monolog-bundle.spec @@ -0,0 +1,213 @@ +# remirepo/fedora spec file for php-symfony-monolog-bundle +# +# Copyright (c) 2018 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%global gh_commit 572e143afc03419a75ab002c80a2fd99299195ff +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner symfony +%global gh_project monolog-bundle +# Packagist +%global pk_vendor %{gh_owner} +%global pk_project %{gh_project} +# Namespace +%global ns_vendor Symfony +%global ns_sub Bundle +%global ns_project MonologBundle +%global php_home %{_datadir}/php +# Test +%global with_tests 0%{!?_without_tests:1} + +Name: php-%{pk_vendor}-%{pk_project} +Version: 3.3.1 +Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist} +Summary: Symfony MonologBundle + +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 + +BuildArch: noarch +%if %{with_tests} +# For tests +BuildRequires: php(language) >= 5.6 +BuildRequires: php-json +BuildRequires: php-pcre +BuildRequires: php-spl +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >=8 +BuildRequires: (php-composer(%{pk_vendor}/monolog-bridge) >= 2.7 with php-composer(%{pk_vendor}/monolog-bridge) < 5) +BuildRequires: (php-composer(%{pk_vendor}/dependency-injection) >= 2.7 with php-composer(%{pk_vendor}/dependency-injection) < 5) +BuildRequires: (php-composer(%{pk_vendor}/config) >= 2.7 with php-composer(%{pk_vendor}/config) < 5) +BuildRequires: (php-composer(%{pk_vendor}/http-kernel) >= 2.7 with php-composer(%{pk_vendor}/http-kernel) < 5) +BuildRequires: (php-composer(monolog/monolog) >= 1.22 with php-composer(monolog/monolog) < 2) +# remirepo:7 +%else +BuildRequires: php-symfony3-monolog-bridge >= 3.3 +BuildRequires: php-symfony3-dependency-injection >= 3.3 +BuildRequires: php-symfony3-config >= 3.3 +BuildRequires: php-symfony3-http-kernel >= 3.3 +BuildRequires: php-Monolog >= 1.22 +%endif +# From composer.json, "require-dev": { +# "symfony/yaml": "~2.7|~3.3|~4.0", +# "symfony/console": "~2.7|~3.3|~4.0", +# "symfony/phpunit-bridge": "^3.3|^4.0" +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >=8 +%global phpunit %{_bindir}/phpunit7 +BuildRequires: (php-composer(%{pk_vendor}/yaml) >= 2.7 with php-composer(%{pk_vendor}/yaml) < 5) +BuildRequires: (php-composer(%{pk_vendor}/console) >= 2.7 with php-composer(%{pk_vendor}/console) < 5) +BuildRequires: (php-composer(%{pk_vendor}/phpunit-bridge) >= 2.7 with php-composer(%{pk_vendor}/phpunit-bridge) < 5) +# remirepo:6 +%else +%global phpunit %{_bindir}/phpunit +BuildRequires: php-symfony3-yaml >= 3.3 +BuildRequires: php-symfony3-console >= 3.3 +BuildRequires: php-symfony3-phpunit-bridge >= 3.3 +%endif +BuildRequires: %{phpunit} +# Autoloader +BuildRequires: php-composer(fedora/autoloader) +%endif + +# From composer.json, "require": { +# "php": ">=5.6", +# "symfony/monolog-bridge": "~2.7|~3.3|~4.0", +# "symfony/dependency-injection": "~2.7|~3.4.10|^4.0.10", +# "symfony/config": "~2.7|~3.3|~4.0", +# "symfony/http-kernel": "~2.7|~3.3|~4.0", +# "monolog/monolog": "~1.22" +Requires: php(language) >= 5.6 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >=8 +Requires: (php-composer(%{pk_vendor}/monolog-bridge) >= 2.7 with php-composer(%{pk_vendor}/monolog-bridge) < 5) +Requires: (php-composer(%{pk_vendor}/dependency-injection) >= 2.7 with php-composer(%{pk_vendor}/dependency-injection) < 5) +Requires: (php-composer(%{pk_vendor}/config) >= 2.7 with php-composer(%{pk_vendor}/config) < 5) +Requires: (php-composer(%{pk_vendor}/http-kernel) >= 2.7 with php-composer(%{pk_vendor}/http-kernel) < 5) +Requires: (php-composer(monolog/monolog) >= 1.22 with php-composer(monolog/monolog) < 2) +# remirepo:7 +%else +Requires: php-symfony3-monolog-bridge >= 3.3 +Requires: php-symfony3-dependency-injection >= 3.3 +Requires: php-symfony3-config >= 3.3 +Requires: php-symfony3-http-kernel >= 3.3 +Requires: php-Monolog >= 1.22 +%endif +# From phpcompatinfo report for version 3.3.1 +Requires: php-json +Requires: php-pcre +Requires: php-spl +# Autoloader +Requires: php-composer(fedora/autoloader) + +Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} + + +%description +The MonologBundle provides integration of the Monolog library +into the Symfony framework. + +Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_sub}/%{ns_project}/autoload.php + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + + +%build +: Create autoloader +cat <<'AUTOLOAD' | tee autoload.php + - 3.3.1-1 +- initial package, version 3.3.1 -- cgit