The rpm-build-pear package contains helper macroses for
PEAR module packaging.
Firstly, define pear_name with PEAR package name.
Use %pear_build in build section, %pear_install_std in install section.
%register_pear_module and %unregister_pear_module in post and preun sections respectively.
In files section use %pear_dir, %pear_xmldir, %pear_testdir, %pear_docdir macroses
for pear modules dir.

You can build PEAR rpm package with
pear make-rpm-spec <package> command from pear-PEAR_Command_Packaging package.

See http://www.freesource.info/wiki/Altlinux/Policy/Pear for detailed
ALT Linux PEAR packaging policy.

09.01.2008 Vitaly Lipatov

==== NEWS ====
=====New macroses in 0.3 version======

%register_pear_module/%unregister_pear_module instead %pear_install/%pear_uninstall 
%pear_build instead %pear_prepare_module 
%pear_install_std instead %pear_install_module 


===== Spec example =====
%define pear_name File
Name: pear-%pear_name
Version: 1.3.0
Release: alt1

Summary: Common file and directory routines, also CSV handling
License: PHP
Group: Development/Other
Url: http://pear.php.net/package/%pear_name

Packager: Vitaly Lipatov <lav@altlinux.ru>

Source: http://pear.php.net/get/%pear_name-%version.tar.bz2

BuildArch: noarch
Requires: pear-core
BuildRequires: pear-core rpm-build-pear

%description
Provides easy access to read/write to files along with
some common routines to deal with paths.

Also provides interface for handling CSV files.

%prep
%setup -c -n %pear_name-%version
%pear_prepare_module

%install
cd %pear_name-%version
%pear_install_module

%post
%pear_install

%preun
%pear_uninstall

%files
%doc LICENSE CHANGELOG
%pear_dir/%pear_name.php
%pear_dir/%pear_name/
%pear_xmldir/%pear_name.xml
%pear_testdir/%pear_name/

%changelog
* Fri Jan 04 2008 Vitaly Lipatov <lav@altlinux.ru> 1.3.0-alt1
- Initial build for ALT Linux

