%define upstream_name Horde_View %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: php-pear-%{upstream_name} Version: 1.0.1 Release: %mkrel 1 Summary: Horde View API License: LGPL-2.1 Group: Networking/Mail Url: http://pear.horde.org/package/%{upstream_name} Source0: Source0: http://pear.horde.org/get/%{upstream_name}-%{version}.tgz BuildArch: noarch Requires: php-pear Requires: php-pear-Horde_Exception <= 2.0.0 Requires: php-pear-Horde_Support <= 2.0.0 Requires: php-pear-Horde_Util <= 2.0.0 Conflicts: php-pear-Horde_Exception = 2.0.0 Conflicts: php-pear-Horde_Support = 2.0.0 Conflicts: php-pear-Horde_Util = 2.0.0 BuildRequires: php-pear BuildRequires: php-pear-channel-horde Provides: php-pear-Horde_View = %{version} %description The Horde_View library provides a simple View pattern implementation. %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 \ -d ext_dir=%{_libdir} \ -s %build %install rm -rf %{buildroot} pear -c pearrc install --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}/Horde_View.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/Horde_View.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only pear.horde.org/Horde_View fi %files %defattr(-,root,root) %doc docs/Horde_View/* %{peardir}/* %{xmldir}/Horde_View.xml %changelog * Mon Nov 28 2011 spuhler <spuhler> 1.0.1-1.mga2 + Revision: 173409 - upgrade to 1.0.1 - changed Provides: php-pear-Horde_View to php-pear-Horde_View = %%{version} - imported package php-pear-Horde_View