File php5-pear-channel-phing.spec of Package php5-pear-channel-phing

%define peardir %(pear config-get php_dir 2> /dev/null)
%define pear_xmldir  /var/lib/pear

Name:           php5-pear-channel-phing
Version:        1.0
Release:        1
Summary:        Adds pear.phing.de channel to PEAR
Group:          Development/Languages
License:        MIT
URL:            http://pear.phing.info/
Source0:        http://pear.phing.info/channel.xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  php5-pear
PreReq:         php5 php5-pear

%description
This package adds the pear.phing.de channel which allows PEAR packages
from this channel to be installed.


%prep
%setup -q -c -T


%build
# Empty build section, nothing to build


%install

%{__mkdir_p} %{buildroot}%{pear_xmldir}

%{__install} -pm 644 %{SOURCE0} %{buildroot}%{pear_xmldir}/pear.phing.info.xml


%clean

%{__rm} -rf %{buildroot}


%post
if [ $1 -eq  1 ] ; then
   pear channel-add %{pear_xmldir}/pear.phing.info.xml > /dev/null || :
else
   pear channel-update %{pear_xmldir}/pear.phing.info.xml > /dev/null ||:
fi


%postun

if [ $1 -eq 0 ] ; then
   pear channel-delete pear.phing.info > /dev/null || :
fi


%files
%defattr(-,root,root,-)
%{pear_xmldir}/*

%changelog
* Fri Dec 12 2008 - gerrit.beine@gmx.de
- package created
openSUSE Build Service is sponsored by