Christof Damian b861493
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
Christof Damian b861493
Christof Damian b861493
Name:		php-channel-phpqatools
Christof Damian b861493
# Use REST version (from channel.xml)
Christof Damian b861493
Version:	1.3
Christof Damian b951a5c
Release:	3%{?dist}
Christof Damian b861493
Summary:	Adds phpqatools channel to PEAR
Christof Damian b861493
Christof Damian b861493
Group:		Development/Languages
Christof Damian b861493
License:	Public Domain
Christof Damian b861493
URL:		http://phpqatools.org/
Christof Damian b861493
Source0:	http://pear.phpqatools.org/channel.xml
Christof Damian b861493
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Christof Damian b861493
Christof Damian b861493
BuildArch:	noarch
Christof Damian b861493
BuildRequires:	php-pear >= 1:1.4.9-1.2
Christof Damian b861493
Requires:	php-pear(PEAR)
Christof Damian b861493
Christof Damian b861493
Requires(post): %{__pear}
Christof Damian b861493
Requires(postun): %{__pear}
Christof Damian b861493
Christof Damian b861493
Provides:	php-channel(pear.phpqatools.org)
Christof Damian b861493
Christof Damian b861493
%description
Christof Damian b861493
This package adds the phpqatools channel which allows
Christof Damian b861493
PEAR packages from this channel to be installed.
Christof Damian b861493
Christof Damian b861493
%prep
Christof Damian b861493
%setup -q -c -T
Christof Damian b861493
Christof Damian b861493
Christof Damian b861493
%build
Christof Damian b861493
# Empty build section, nothing to build
Christof Damian b861493
Christof Damian b861493
Christof Damian b861493
%install
Christof Damian b861493
rm -rf $RPM_BUILD_ROOT
Christof Damian b861493
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
Christof Damian b861493
install -pm 644 %{SOURCE0} $RPM_BUILD_ROOT%{pear_xmldir}/pear.phpqatools.org.xml
Christof Damian b861493
Christof Damian b861493
Christof Damian b861493
%clean
Christof Damian b861493
rm -rf $RPM_BUILD_ROOT
Christof Damian b861493
Christof Damian b861493
%post
Christof Damian b861493
if [ $1 -eq  1 ] ; then
Christof Damian b861493
	%{__pear} channel-add %{pear_xmldir}/pear.phpqatools.org.xml > /dev/null || :
Christof Damian b861493
else
Christof Damian b861493
	%{__pear} channel-update %{pear_xmldir}/pear.phpqatools.org.xml > /dev/null ||:
Christof Damian b861493
fi
Christof Damian b861493
Christof Damian b861493
Christof Damian b861493
%postun
Christof Damian b861493
if [ $1 -eq 0 ] ; then
Christof Damian b861493
	%{__pear} channel-delete pear.phpqatools.org > /dev/null || :
Christof Damian b861493
fi
Christof Damian b861493
Christof Damian b861493
Christof Damian b861493
%files
Christof Damian b861493
%defattr(-,root,root,-)
Christof Damian b861493
%{pear_xmldir}/*
Christof Damian b861493
Christof Damian b861493
Christof Damian b861493
%changelog
Christof Damian b951a5c
* Mon May 21 2012 Christof Damian <christof@damian.net> - 1.3-3
Christof Damian b951a5c
- removed php-cli require
Christof Damian b951a5c
Christof Damian b861493
* Sun May 20 2012 Christof Damian <christof@damian.net> - 1.3-2
Christof Damian b861493
- Changed license after talking to Sebastian Bergmann
Christof Damian b861493
- removed some command macros
Christof Damian b861493
Christof Damian b861493
* Tue Apr 24 2012 Christof Damian <christof@damian.net> - 1.3-1
Christof Damian b861493
- Initial RPM release.