diff options
author | Remi Collet <fedora@famillecollet.com> | 2013-12-30 10:16:59 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2013-12-30 10:16:59 +0100 |
commit | 5a1ae5217c2ddbc0a8e25d8768363e13c2f5863d (patch) | |
tree | c43a2f6979653f090f7f8eab29b296ce5bc9cf22 | |
parent | 147f1b46a244d948f65c97eee7ebcbc7a9fcb8fc (diff) |
php-Monolog: 1.7.0 (backport)
-rw-r--r-- | php-Monolog.spec | 138 |
1 files changed, 101 insertions, 37 deletions
diff --git a/php-Monolog.spec b/php-Monolog.spec index 92bf592..255279a 100644 --- a/php-Monolog.spec +++ b/php-Monolog.spec @@ -1,15 +1,21 @@ -%global github_owner Seldaek -%global github_name monolog -%global github_version 1.6.0 -%global github_commit f72392d0e6eb855118f5a84e89ac2d257c704abd - -%global lib_name Monolog - -%global php_min_ver 5.3.0 -%global psrlog_min_ver 1.0 -%global psrlog_max_ver 2.0 -%global raven_min_ver 0.5.0 -#%%global raven_max_ver 0.6.0 +%global github_owner Seldaek +%global github_name monolog +%global github_version 1.7.0 +%global github_commit 6225b22de9dcf36546be3a0b2fa8e3d986153f57 + +%global lib_name Monolog + +# "php": ">=5.3.0" +%global php_min_ver 5.3.0 +# "phpunit/phpunit": "~3.7.0" +%global phpunit_min_ver 3.7.0 +%global phpunit_max_ver 3.8.0 +# "psr/log": "~1.0" +%global psrlog_min_ver 1.0 +%global psrlog_max_ver 2.0 +# "raven/raven": "0.5.*" +%global raven_min_ver 0.5.0 +#%%global raven_max_ver 0.6.0 Name: php-%{lib_name} Version: %{github_version} @@ -25,10 +31,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # For tests BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-pear(pear.phpunit.de/PHPUnit) -BuildRequires: php-PsrLog >= %{psrlog_min_ver} -BuildRequires: php-PsrLog < %{psrlog_max_ver} -# For tests: phpcompatinfo +BuildRequires: php-PsrLog >= %{psrlog_min_ver} +BuildRequires: php-PsrLog < %{psrlog_max_ver} +BuildRequires: php-pear(pear.phpunit.de/PHPUnit) >= %{phpunit_min_ver} +BuildRequires: php-pear(pear.phpunit.de/PHPUnit) < %{phpunit_max_ver} +# For tests: phpcompatinfo (computed from 1.7.0) BuildRequires: php-curl BuildRequires: php-date BuildRequires: php-filter @@ -44,7 +51,7 @@ Requires: php(language) >= %{php_min_ver} Requires: php-PsrLog >= %{psrlog_min_ver} Requires: php-PsrLog < %{psrlog_max_ver} Requires: php-pear(pear.swiftmailer.org/Swift) -# phpcompatinfo +# phpcompatinfo (computed from 1.7.0) Requires: php-curl Requires: php-date Requires: php-filter @@ -64,9 +71,11 @@ in your own libraries to keep a maximum of interoperability. You can also use it in your applications to make sure you can always use another compatible logger at a later time. -Optional packages: +Optional handlers: * %{name}-amqp Allow sending log messages to an AMQP server (1.0+ required) +* %{name}-dynamo + Allow sending log messages to AWS DynamoDB * %{name}-mongo Allow sending log messages to a MongoDB server * %{name}-raven @@ -75,56 +84,77 @@ Optional packages: Allow sending log messages to a CouchDB server * https://github.com/mlehner/gelf-php Allow sending log messages to a GrayLog2 server +* https://github.com/ruflin/Elastica + Allow sending log messages to an Elastic Search server +* https://docs.newrelic.com/docs/php/new-relic-for-php + Allow sending log messages to a New Relic application [1] https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md +# ------------------------------------------------------------------------------ %package amqp + Summary: Monolog AMQP handler Group: Development/Libraries + Requires: php-%{lib_name} = %{version}-%{release} Requires: php-pecl(amqp) %description amqp Allow sending log messages to an AMQP server (1.0+ required). +# ------------------------------------------------------------------------------ + +%package dynamo + +Summary: Monolog DynamoDB handler +Group: Development/Libraries + +Requires: php-%{lib_name} = %{version}-%{release} +Requires: php-aws-sdk + +Provides: %{name}-dynamodb = %{version}-%{release} + +%description dynamo +Allow sending log messages to AWS services' DynamoDB. + +# ------------------------------------------------------------------------------ %package mongo + Summary: Monolog MongoDB handler Group: Development/Libraries + Requires: php-%{lib_name} = %{version}-%{release} Requires: php-pecl(mongo) +Provides: %{name}-mongodb = %{version}-%{release} + %description mongo Allow sending log messages to a MongoDB server. +# ------------------------------------------------------------------------------ + %package raven + Summary: Monolog Sentry handler Group: Development/Libraries + Requires: php-%{lib_name} = %{version}-%{release} Requires: php-Raven >= %{raven_min_ver} %{?raven_max_ver:Requires: php-Raven < %{raven_max_ver}} -Provides: %{name}-Raven = %{version}-%{release} %description raven Allow sending log messages to a Sentry server. -%prep -%setup -q -n %{github_name}-%{github_commit} +# ############################################################################## -# Rewrite tests' bootstrap -( cat <<'AUTOLOAD' -<?php -set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__); -spl_autoload_register(function ($class) { - $src = str_replace(array('\\', '_'), '/', $class).'.php'; - @include_once $src; -}); -AUTOLOAD -) > ./tests/bootstrap.php +%prep +%setup -q -n %{github_name}-%{github_commit} %build @@ -132,18 +162,28 @@ AUTOLOAD %install -mkdir -p -m 755 %{buildroot}%{_datadir}/php/%{lib_name} -cp -pr ./src/%{lib_name} %{buildroot}%{_datadir}/php/ +mkdir -p -m 755 %{buildroot}%{_datadir}/php +cp -pr ./src/* %{buildroot}%{_datadir}/php/ %check +# Rewrite tests' bootstrap +( cat <<'BOOTSTRAP' +<?php +spl_autoload_register(function ($class) { + $src = str_replace(array('\\', '_'), '/', $class).'.php'; + @include_once $src; +}); +BOOTSTRAP +) > ./tests/bootstrap.php + # Remove MongoDBHandlerTest because it requires a running MongoDB server rm -f tests/Monolog/Handler/MongoDBHandlerTest.php -%{_bindir}/phpunit \ - -d include_path="./src:./tests:.:%{_datadir}/php:%{pear_phpdir}" \ - -d date.timezone="UTC" \ - -c ./phpunit.xml.dist +%{_bindir}/phpunit --include-path="./src:./tests" -d date.timezone="UTC" + + +# ############################################################################## %files @@ -151,23 +191,47 @@ rm -f tests/Monolog/Handler/MongoDBHandlerTest.php %doc LICENSE *.mdown doc composer.json %{_datadir}/php/%{lib_name} %exclude %{_datadir}/php/%{lib_name}/Handler/AmqpHandler.php +%exclude %{_datadir}/php/%{lib_name}/Handler/DynamoDbHandler.php %exclude %{_datadir}/php/%{lib_name}/Handler/MongoDBHandler.php %exclude %{_datadir}/php/%{lib_name}/Handler/RavenHandler.php +# ------------------------------------------------------------------------------ + %files amqp %defattr(-,root,root,-) %{_datadir}/php/%{lib_name}/Handler/AmqpHandler.php +# ------------------------------------------------------------------------------ + +%files dynamo +%defattr(-,root,root,-) +%{_datadir}/php/%{lib_name}/Handler/DynamoDbHandler.php + +# ------------------------------------------------------------------------------ + %files mongo %defattr(-,root,root,-) %{_datadir}/php/%{lib_name}/Handler/MongoDBHandler.php +# ------------------------------------------------------------------------------ + %files raven %defattr(-,root,root,-) %{_datadir}/php/%{lib_name}/Handler/RavenHandler.php +# ############################################################################## + + %changelog +* Mon Dec 30 2013 Remi Collet <RPMS@famillecollet.com> 1.7.0-1 +- backport 1.7.0 for remi repo + +* Mon Dec 30 2013 Shawn Iwinski <shawn.iwinski@gmail.com> 1.7.0-1 +- Updated to 1.7.0 (BZ #1030923) +- Added dynamo sub-package +- Spec cleanup + * Tue Aug 20 2013 Remi Collet <RPMS@famillecollet.com> 1.6.0-1 - backport 1.6.0 for remi repo |