1 |
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} |
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} |
2 |
%define pear_name Log |
%global pear_name Log |
3 |
|
|
4 |
Summary: Abstracted logging facility for PHP |
Summary: Abstracted logging facility for PHP |
5 |
Summary(fr): Abstraction des outils d'enregistrement de traces pour PHP |
Summary(fr): Abstraction des outils d'enregistrement de traces pour PHP |
6 |
Name: php-pear-Log |
Name: php-pear-Log |
7 |
Version: 1.9.13 |
Version: 1.12.7 |
8 |
Release: 2%{?dist} |
Release: 1%{?dist} |
9 |
License: PHP |
License: MIT |
10 |
Group: Development/Libraries |
Group: Development/Libraries |
11 |
Source: http://pear.php.net/get/Log-%{version}.tgz |
Source: http://pear.php.net/get/Log-%{version}.tgz |
12 |
Source2: xml2changelog |
Source2: xml2changelog |
13 |
Patch0: php-pear-Log-1.9.13-prevent-deprecated-messages.patch |
|
14 |
Patch1: php-pear-Log-1.9.13-update-checksum.patch |
# http://pear.php.net/bugs/18864 |
15 |
|
Patch0: Log-tests.patch |
16 |
|
|
17 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
18 |
URL: http://pear.php.net/package/Log |
URL: http://pear.php.net/package/Log |
19 |
|
|
22 |
Requires: php-pear(PEAR) >= 1.4.9 |
Requires: php-pear(PEAR) >= 1.4.9 |
23 |
Requires: php-pear(DB) >= 1.3 |
Requires: php-pear(DB) >= 1.3 |
24 |
Requires: php-pear(MDB2) >= 2.0.0 |
Requires: php-pear(MDB2) >= 2.0.0 |
25 |
|
Requires: php-pear(Mail) |
26 |
Requires(post): %{__pear} |
Requires(post): %{__pear} |
27 |
Requires(postun): %{__pear} |
Requires(postun): %{__pear} |
28 |
Provides: php-pear(Log) = %{version} |
Provides: php-pear(Log) = %{version} |
38 |
|
|
39 |
|
|
40 |
%description -l fr |
%description -l fr |
41 |
L'extension "log" fournit un sytème d'abstraction des enregistrements |
L'extension "log" fournit un système d'abstraction des enregistrements |
42 |
de traces. Il gère l'affichage sur la console, l'enregistrement dans un |
de traces. Il gère l'affichage sur la console, l'enregistrement dans un |
43 |
fichier, dans le "syslog", dans une base SQL ou Sqlite, l'envoi de mails |
fichier, dans le "syslog", dans une base SQL ou Sqlite, l'envoi de mails |
44 |
ou la création d'évenements à un calendrier "mcal". |
ou la création d'évènements dans un calendrier "mcal". |
45 |
|
|
46 |
php-pear-Log peut optionellement utiliser les extensions |
php-pear-Log peut optionnellement utiliser les extensions |
47 |
"php-pear-DB" (version >= 1.3) et "php-pear-MDB2" (version >= 2.0.0RC1). |
"php-pear-DB" (version >= 1.3) et "php-pear-MDB2" (version >= 2.0.0RC1). |
48 |
|
|
49 |
|
|
50 |
%prep |
%prep |
51 |
%setup -c -q |
%setup -c -q |
52 |
%{_bindir}/php -n %{SOURCE2} package.xml >CHANGELOG |
%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 10 |
53 |
mv package.xml %{pear_name}-%{version}/%{pear_name}.xml |
|
54 |
%patch0 -p1 |
cd %{pear_name}-%{version} |
55 |
%patch1 -p1 |
# package.xml is V2 |
56 |
|
mv ../package.xml %{name}.xml |
57 |
|
|
58 |
|
%patch0 -p1 -b .orig |
59 |
|
|
60 |
|
|
61 |
%build |
%build |
63 |
|
|
64 |
|
|
65 |
%install |
%install |
66 |
rm -rf %{buildroot} docdir |
rm -rf %{buildroot} |
67 |
|
|
68 |
pushd Log-%{version} |
pushd Log-%{version} |
69 |
%{__pear} install --nodeps --packagingroot %{buildroot} %{pear_name}.xml |
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml |
70 |
|
|
71 |
# Clean up unnecessary files |
# Clean up unnecessary files |
72 |
rm -rf %{buildroot}%{pear_phpdir}/.??* |
rm -rf %{buildroot}%{pear_phpdir}/.??* |
73 |
|
|
74 |
# Install XML package description |
# Install XML package description |
75 |
%{__mkdir_p} %{buildroot}%{pear_xmldir} |
install -D -p -m 644 %{name}.xml %{buildroot}%{pear_xmldir}/%{name}.xml |
|
%{__install} -pm 644 Log.xml %{buildroot}%{pear_xmldir} |
|
76 |
|
|
77 |
popd |
popd |
|
# Sort out documentation |
|
|
mv %{buildroot}%{pear_docdir}/%{pear_name}/docs docdir |
|
78 |
|
|
79 |
|
|
80 |
%clean |
%clean |
82 |
|
|
83 |
|
|
84 |
%check |
%check |
85 |
lst=$(find %{buildroot}%{pear_phpdir} -exec grep -q %{buildroot} {} \; -print) |
# under EL-5 run-test -i option doesn't work |
86 |
[ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1; |
# so build a temporay ini to set include_path |
87 |
|
( |
88 |
# For documentation purpose only |
cat /etc/php.ini |
89 |
# After install, as root : |
echo include_path=.:%{buildroot}%{pear_phpdir}:%{pear_phpdir} |
90 |
# pear run-tests -p Log |
) >php.ini |
91 |
# Should return |
|
92 |
# 14 PASSED TESTS |
cd %{pear_name}-%{version} |
93 |
# 2 SKIPPED TESTS |
PHPRC=../php.ini %{__pear} \ |
94 |
|
run-tests \ |
95 |
|
tests | tee ../tests.log |
96 |
|
grep "FAILED TESTS" ../tests.log && exit 1 |
97 |
|
|
98 |
|
|
99 |
%post |
%post |
100 |
%{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/%{pear_name}.xml >/dev/null || : |
%{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/%{name}.xml >/dev/null || : |
101 |
|
|
102 |
|
|
103 |
%postun |
%postun |
108 |
|
|
109 |
%files |
%files |
110 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
111 |
%doc CHANGELOG docdir/* |
%doc CHANGELOG |
112 |
|
%doc %{pear_docdir}/%{pear_name} |
113 |
%{pear_phpdir}/Log |
%{pear_phpdir}/Log |
114 |
%{pear_phpdir}/Log.php |
%{pear_phpdir}/Log.php |
115 |
%{pear_testdir}/Log |
%{pear_testdir}/Log |
116 |
%{pear_datadir}/Log |
%{pear_datadir}/Log |
117 |
%{pear_xmldir}/%{pear_name}.xml |
%{pear_xmldir}/%{name}.xml |
118 |
|
|
119 |
|
|
120 |
%changelog |
%changelog |
121 |
* Mon Sep 19 2011 Jonathan Martens <smeserver-bugzilla@snetram.nl> 1.9.13-2 |
* Thu Sep 22 2011 Remi Collet <Fedora@FamilleCollet.com> 1.12.7-1 |
122 |
- Prevent deprecated messages when using PHP 5.3+ [SME: 6726] |
- Version 1.12.7 (stable) - API 1.0.0 (stable) |
123 |
|
- minor spec cleanups |
124 |
|
|
125 |
|
* Sat Dec 26 2009 Remi Collet <Fedora@FamilleCollet.com> 1.11.6-1 |
126 |
|
- update to 1.11.6 |
127 |
|
|
128 |
|
* Sat Aug 08 2009 Remi Collet <Fedora@FamilleCollet.com> 1.11.5-1 |
129 |
|
- update to 1.11.5 |
130 |
|
- rename Log.xml to php-pear-Log.xml |
131 |
|
|
132 |
|
* Sat Nov 22 2008 Remi Collet <Fedora@FamilleCollet.com> 1.11.3-1 |
133 |
|
- update to 1.11.3 |
134 |
|
|
135 |
|
* Fri Sep 05 2008 Remi Collet <Fedora@FamilleCollet.com> 1.11.2-1 |
136 |
|
- update to 1.11.2 |
137 |
|
|
138 |
|
* Wed Aug 06 2008 Remi Collet <Fedora@FamilleCollet.com> 1.11.1-1 |
139 |
|
- update to 1.11.1 |
140 |
|
|
141 |
|
* Sat Jun 28 2008 Remi Collet <Fedora@FamilleCollet.com> 1.11.0-1 |
142 |
|
- update to 1.11.0 : switch from PHP to MIT license |
143 |
|
|
144 |
|
* Thu May 08 2008 Remi Collet <Fedora@FamilleCollet.com> 1.10.1-1 |
145 |
|
- update to 1.10.1 |
146 |
|
|
147 |
|
* Sat Jan 26 2008 Remi Collet <Fedora@FamilleCollet.com> 1.10.0-1 |
148 |
|
- update to 1.10.0 |
149 |
|
- add Requires php-pear(Mail) (new handler) |
150 |
|
- remove levels.patch (merged upstream) |
151 |
|
|
152 |
|
* Sat Jan 26 2008 Remi Collet <Fedora@FamilleCollet.com> 1.9.16-1 |
153 |
|
- update to 1.9.16 |
154 |
|
- add examples in documentation |
155 |
|
- add levels.patch http://pear.php.net/bugs/bug.php?id=12933 |
156 |
|
|
157 |
|
* Wed Jan 02 2008 Remi Collet <Fedora@FamilleCollet.com> 1.9.14-1 |
158 |
|
- update to 1.9.14 |
159 |
|
|
160 |
* Thu Dec 13 2007 Remi Collet <Fedora@FamilleCollet.com> 1.9.13-1 |
* Thu Dec 13 2007 Remi Collet <Fedora@FamilleCollet.com> 1.9.13-1 |
161 |
- update to 1.9.13 |
- update to 1.9.13 |