summaryrefslogtreecommitdiffstats
path: root/php-Monolog.spec
blob: 7970983182609778f9f4a79171f573529386aa62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
%global libname Monolog

Name:      php-%{libname}
Version:   1.2.1
Release:   1%{?dist}
Summary:   Logging for PHP 5.3

Group:     Development/Libraries
License:   MIT
URL:       https://github.com/Seldaek/monolog
Source0:   %{url}/archive/%{version}.tar.gz

BuildArch: noarch

Requires:  php-common >= 5.3.0
Requires:  php-pear(pear.swiftmailer.org/Swift)
# phpci requires
Requires:  php-curl
Requires:  php-date
Requires:  php-json
Requires:  php-libxml
Requires:  php-pcre
Requires:  php-sockets
Requires:  php-spl
# phpci dist specific requires
%{?fedora:Requires: php-filter}

%description
%{summary}.

Optional packages:
* php-%{libname}-amqp
      Allow sending log messages to an AMQP server (1.0+ required)
* php-%{libname}-mongo
      Allow sending log messages to a MongoDB server
* https://github.com/mlehner/gelf-php
      Allow sending log messages to a GrayLog2 server


%package amqp
Summary:  Monolog AMQP handler
Requires: php-%{libname} = %{version}-%{release}
Requires: php-pecl(amqp)

%description amqp
Allow sending log messages to an AMQP server (1.0+ required).


%package mongo
Summary:  Monolog MongoDB handler
Requires: php-%{libname} = %{version}-%{release}
Requires: php-pecl(mongo)

%description mongo
Allow sending log messages to a MongoDB server.


%prep
%setup -q -n monolog-%{version}


%build
# Empty build section, nothing to build


%install
mkdir -p -m 755 %{buildroot}%{_datadir}/php/%{libname}
cp -pr src/%{libname} %{buildroot}%{_datadir}/php/


%files
%doc LICENSE *.mdown doc composer.json
%{_datadir}/php/%{libname}
%exclude %{_datadir}/php/%{libname}/Handler/MongoDBHandler.php
%exclude %{_datadir}/php/%{libname}/Handler/AmqpHandler.php

%files amqp
%{_datadir}/php/%{libname}/Handler/AmqpHandler.php

%files mongo
%{_datadir}/php/%{libname}/Handler/MongoDBHandler.php


%changelog
* Sat Nov 17 2012 Shawn Iwinski <shawn.iwinski@gmail.com> 1.2.1-1
- Updated to upstream version 1.2.1
- Changed %%{libname} from monolog to Monolog
- Fixed license
- GitHub archive source
- Added php-pear(pear.swiftmailer.org/Swift), php-curl, and php-sockets requires
- Added optional packages note in %%{description}
- Simplified %%prep
- Added subpackages for AMQP and MongoDB handlers
- Changed RPM_BUILD_ROOT to %%{buildroot}

* Sun Jul 22 2012 Shawn Iwinski <shawn.iwinski@gmail.com> 1.1.0-1
- Initial package