2fd457
#
2fd457
# Define full path to pear/pecl commands to be used in scriptlets:
2fd457
#
2fd457
%__pear %{_bindir}/pear
2fd457
%__pecl %{_bindir}/pecl
2fd457
2fd457
#
2fd457
# Define PEAR directories used in php-pear-* spec files
2fd457
#
2fd457
%pear_phpdir  %(%{__pear} config-get php_dir  2> /dev/null || echo undefined)
2fd457
%pear_docdir  %(%{__pear} config-get doc_dir  2> /dev/null || echo undefined)
2fd457
%pear_testdir %(%{__pear} config-get test_dir 2> /dev/null || echo undefined)
2fd457
%pear_datadir %(%{__pear} config-get data_dir 2> /dev/null || echo undefined)
2fd457
%pear_cfgdir  %(%{__pear} config-get cfg_dir  2> /dev/null || echo undefined)
2fd457
%pear_wwwdir  %(%{__pear} config-get www_dir  2> /dev/null || echo undefined)
2fd457
%pear_metadir %(%{__pear} config-get metadata_dir 2> /dev/null || echo undefined)
2fd457
2fd457
#
2fd457
# Define PECL directories used in php-pecl-* spec files:
2fd457
#
2fd457
%pecl_phpdir  %(%{__pecl} config-get php_dir  2> /dev/null || echo undefined)
2fd457
%pecl_docdir  %(%{__pecl} config-get doc_dir  2> /dev/null || echo undefined)
2fd457
%pecl_testdir %(%{__pecl} config-get test_dir 2> /dev/null || echo undefined)
2fd457
%pecl_datadir %(%{__pecl} config-get data_dir 2> /dev/null || echo undefined)
2fd457
2fd457
#
2fd457
# Define XML directories to store package registration information:
2fd457
#
2fd457
%pear_xmldir %{_localstatedir}/lib/pear/pkgxml
2fd457
%pecl_xmldir %{_localstatedir}/lib/pear/pkgxml
2fd457
2fd457
#
2fd457
# Define macros to be used in scriplets for php-pecl-* spec files:
2fd457
#
2fd457
%pecl_install %{__pecl} install --nodeps --soft --force --register-only --nobuild
2fd457
%pecl_uninstall %{__pecl} uninstall --nodeps --ignore-errors --register-only