File php5-pear-log.spec of Package php5-pear-log

#
# spec file for package php5-pear-log (Version 1.9.11)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           php5-pear-log
%define peardir %(pear config-get php_dir 2> /dev/null)
%define xmldir  /var/lib/pear
Summary:        PEAR Logging utilities
Version:        1.9.11
Release:        24
License:        Other uncritical OpenSource License; The PHP License, version 3.0.
Group:          Development/Libraries/PHP
Source0:        http://pear.php.net/get/Log-%{version}.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://pear.php.net/package/Log
BuildRequires:  php5-pear
PreReq:         php5-pear
Provides:       php-pear-log
BuildArch:      noarch

%description
The Log framework for PEAR provides an abstracted logging system. It
supports logging to console, file, syslog, SQL, Sqlite, mail and mcal
targets. It also provides a subject - observer mechanism.



Authors:
--------
    Jon Parise <jon@php.net>

%prep
%setup -c -T
pear -v -c pearrc \
        -d php_dir=%{peardir} \
        -d doc_dir=/docs \
        -d bin_dir=%{_bindir} \
        -d data_dir=%{peardir}/data \
        -d test_dir=%{peardir}/tests \
        -s

%build

%install
export PHP_PEAR_PHP_BIN="/usr/bin/php5 -dmemory_limit=-1"
pear -c pearrc install --offline --nodeps --packagingroot %{buildroot} %{SOURCE0}
# Clean up unnecessary files
%{__rm} pearrc
%{__rm} %{buildroot}/%{peardir}/.filemap
%{__rm} %{buildroot}/%{peardir}/.lock
%{__rm} -rf %{buildroot}/%{peardir}/.registry
%{__rm} -rf %{buildroot}%{peardir}/.channels
%{__rm} %{buildroot}%{peardir}/.depdb
%{__rm} %{buildroot}%{peardir}/.depdblock
mv %{buildroot}/docs .
# Install XML package description
%{__mkdir_p} %{buildroot}%{xmldir}
%{__tar} -xzf %{SOURCE0} package.xml
%{__cp} -p package.xml %{buildroot}%{xmldir}/Log.xml

%clean
%{__rm} -rf %{buildroot}

%post
pear install --offline --nodeps --soft --force --register-only %{xmldir}/Log.xml

%postun
if [ "$1" -eq "0" ]; then
    pear uninstall --offline --nodeps --ignore-errors --register-only pear.php.net/Log
fi

%files
%defattr(-,root,root)
%doc docs/Log/*
%{peardir}/*
%{xmldir}/Log.xml
%changelog
* Fri Oct 12 2007 - crrodriguez@suse.de
- ensure this package does not phone home any longer [#214338]
* Fri Aug 17 2007 - crrodriguez@suse.de
- Add missing Provides php-pear-log
* Tue Aug 07 2007 - crrodriguez@suse.de
- update to version 1.9.11
- Use the new pear package format
* Thu Oct 26 2006 - anosek@suse.cz
- fixed: pear is pulling packages from the network during autobuild
  [#214347]
* Thu Aug 03 2006 - mmarek@suse.cz
- updated to version 1.9.8
  * documentation on logging PHP assertions and exceptions
  * open() and close() imlemented in all handlers (at least a stub
  returning true)
  * lots of bugfixes
- remove more temporary files
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 19 2006 - mmarek@suse.de
- fix filelist, remove temporary files created by pear installer
- unify php5-pear-*.spec files
- increase php's memory_limit during installation (parsing
  xml needs more than default 8M sometimes)
* Mon Dec 19 2005 - mmarek@suse.cz
- fixed nfb
* Thu Dec 15 2005 - mmarek@suse.cz
- created php5-pear-log for horde on php5
  [#138284]