Blob Blame History Raw
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}

Name:		php-channel-pdepend
Version:	1.3
Release:	4%{?dist}
Summary:	PHP Depend PEAR channel

Group:		Development/Languages
License:	BSD
URL:		http://www.pdepend.org/
Source0:	http://pear.pdepend.org/channel.xml
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:	noarch
BuildRequires:	php-pear >= 1:1.4.9-1.2
Requires:	php-pear(PEAR)

Requires(post): %{__pear}
Requires(postun): %{__pear}

Provides:	php-channel(pear.pdepend.org) = %{version}

%description
This package adds the PHP Depend PEAR channe which allows
PEAR packages from this channel to be installed.


%prep
%setup -q -c -T


%build
# Empty build section, nothing to build


%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir_p} $RPM_BUILD_ROOT%{pear_xmldir}
%{__install} -pm 644 %{SOURCE0} $RPM_BUILD_ROOT%{pear_xmldir}/%{name}.xml


%clean
%{__rm} -rf $RPM_BUILD_ROOT

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


%postun
if [ $1 -eq 0 ] ; then
	%{__pear} channel-delete pear.pdepend.org > /dev/null || :
fi


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


%changelog
* Sun Jan 24 2010 Christof Damian <christof@damian.net> - 1.3-4
- sync channel.xml with web version

* Sun Jan 24 2010 Christof Damian <christof@damian.net> 1.3-3
- wrong post again

* Sun Jan 24 2010 Christof Damian <christof@damian.net> 1.3-2
- forgot to rename the channel xml in post

* Sun Jan 24 2010 Christof Damian <christof@damian.net> 1.3-1
- removed php-cli requirement, which is covered by php-pear requirement
- changed name of channel xml name
- using rest version as version now

* Fri Jan 1 2010 Christof Damian <christof@damian.net> 1.0.0-1
- initial release