+# original macros.php macros
+%define __php_provides /usr/lib/rpm/php.prov
+%define __php_requires /usr/lib/rpm/php.req
+
+# pear install macros written by glen@pld-linux.org.
+# All rights reserved. Permission to copy is hereby granted.. yada, yada, yada
+#
+# Usage:
+# %%pear_package_setup [-a #] [-n FMT]
+#
+# -a # - unpack SOURCE# instead of SOURCE0
+# -n FMT - create builddir with FMT, instead of default %%{_pearname}-%%{version}
+# -z - unpack pear package and let pear use package.xml (not tarball) for install. use this for buggy packages.
+# -f - force pear install. use with care.
+#
+# unpack PEAR package to %%{_builddir}/FMT. package is extracted with already
+# destination hierarchy. you should copy the tree to buildroot after
+# patching/reorganizing with %%pear_package_install.
+#
+# additionally BUILDROOT is stripped from files and files are converted to UNIX
+# line endings.
+#
+# the pear install process output is recorded to install.log, you should put it
+# to %%doc for latter debug or just information.
+#
+# additionally additional-packages.txt is produced if it was detected that the
+# package has optional dependencies. the file format is suitable of displaying
+# in %%post of a package. you should put this file to %%doc. noautocompressdoc is
+# automatically added for this file.
+#
+%define pear_package_setup(a:n:zf) \
+%setup -q -c -T -n %{-n*}%{!-n:%{_pearname}-%{version}}\
+D=%{_builddir}/%{-n*}%{!-n:%{_pearname}-%{version}} \
+%{-z:tar zxf %{S:%{-a*}%{!-a:0}}; P=%{_pearname}-%{version}/package.xml; [ -f $P ] || P=package.xml} \