6501f8b
Name:           php-channel-horde
6501f8b
Version:        1.0
6501f8b
Release:        1%{?dist}
6501f8b
Summary:        Adds pear.horde.org channel to PEAR
6501f8b
6501f8b
Group:          Development/Languages
6501f8b
License:        Public Domain
6501f8b
URL:            http://pear.horde.org/
6501f8b
Source0:        http://pear.horde.org/channel.xml
6501f8b
6501f8b
BuildArch:      noarch
6501f8b
BuildRequires:  php-pear >= 1:1.4.9-1.2
6501f8b
Requires:       php-pear(PEAR)
d91974d
Requires(post): /usr/bin/pear
d91974d
Requires(postun): /usr/bin/pear
6501f8b
Provides:       php-channel(pear.horde.org)
6501f8b
6501f8b
%description
6501f8b
This package adds the pear.horde.org channel which allows PEAR packages
6501f8b
from this channel to be installed.
6501f8b
6501f8b
6501f8b
%prep
6501f8b
%setup -q -c -T
6501f8b
6501f8b
6501f8b
%build
6501f8b
# Empty build section, nothing to build
6501f8b
6501f8b
6501f8b
%install
6501f8b
rm -rf $RPM_BUILD_ROOT
6501f8b
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
6501f8b
install -pm 644 %{SOURCE0} $RPM_BUILD_ROOT%{pear_xmldir}/pear.horde.org.xml
6501f8b
6501f8b
6501f8b
%clean
6501f8b
rm -rf $RPM_BUILD_ROOT
6501f8b
6501f8b
6501f8b
%post
6501f8b
if [ $1 -eq  1 ] ; then
6501f8b
   %{__pear} channel-add %{pear_xmldir}/pear.horde.org.xml > /dev/null || :
6501f8b
else
6501f8b
   %{__pear} channel-update %{pear_xmldir}/pear.horde.org.xml > /dev/null ||:
6501f8b
fi
6501f8b
6501f8b
6501f8b
%postun
6501f8b
if [ $1 -eq 0 ] ; then
6501f8b
   %{__pear} channel-delete pear.horde.org > /dev/null || :
6501f8b
fi
6501f8b
6501f8b
6501f8b
%files
6501f8b
%{pear_xmldir}/pear.horde.org.xml
6501f8b
6501f8b
%changelog
6501f8b
* Sat Jan 28 2012 Nick Bebout <nb@fedoraproject.org> - 1.0-1
6501f8b
- Initial package