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

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

Name:           php5-pear-channel-doctrine
Version:        1.1
Release:        1
Summary:        Adds pear.doctrine-project.org channel to PEAR
Group: Development/Libraries/PHP
License:        MIT
URL:            http://pear.doctrine-project.org/
Source0:        http://pear.doctrine-project.org/channel.xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  php5-pear
PreReq:         php5 php5-pear

%description
This package adds the pear.doctrine-project.org 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.doctrine-project.org.xml


%clean

%{__rm} -rf %{buildroot}


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


%postun

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


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

%changelog
* Sat Sep 10 2011 - gerrit.beine@gmx.de
- Updated channel URL
* Fri Dec 12 2008 - gerrit.beine@gmx.de
- package created
openSUSE Build Service is sponsored by