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.11.6 |
Version: 1.12.7 |
8 |
Release: 1%{?dist}-1 |
Release: 1%{?dist} |
9 |
License: MIT |
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.11.6-prevent-deprecated-messages.patch |
|
14 |
Patch1: php-pear-Log-1.11.6-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 |
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}/%{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 |
62 |
# Empty build section |
# Empty build section |
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} %{name}.xml |
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml |
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 %{name}.xml %{buildroot}%{pear_xmldir} |
|
76 |
|
|
77 |
popd |
popd |
|
# Sort out documentation |
|
|
mv %{buildroot}%{pear_docdir}/%{pear_name}/docs docdir |
|
|
mv %{buildroot}%{pear_docdir}/%{pear_name}/examples docdir/examples |
|
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 (1.11.6) |
|
92 |
# 19 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 |
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 |
118 |
|
|
119 |
|
|
120 |
%changelog |
%changelog |
121 |
* Wed Sep 21 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 1.11.6-1.el5-1 |
* Thu Sep 22 2011 Remi Collet <Fedora@FamilleCollet.com> 1.12.7-1 |
122 |
- Fix deprecated error message for webmail [SME: 6725] |
- 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 |
* Sat Dec 26 2009 Remi Collet <Fedora@FamilleCollet.com> 1.11.6-1 |
126 |
- update to 1.11.6 |
- update to 1.11.6 |