3045db4
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
eaad4ec
%global pear_name File_Iterator
eaad4ec
%global channel pear.phpunit.de
3045db4
3045db4
Name:           php-phpunit-File-Iterator
be39918
Version:        1.2.2
1f7b325
Release:        2%{?dist}
3045db4
Summary:        FilterIterator implementation that filters files based on a list of suffixes
3045db4
3045db4
Group:          Development/Libraries
3045db4
License:        BSD
3045db4
URL:            http://github.com/sebastianbergmann/php-file-iterator/
3045db4
Source0:        http://pear.phpunit.de/get/%{pear_name}-%{version}.tgz
3045db4
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
3045db4
3045db4
BuildArch:      noarch
1f7b325
BuildRequires:  php-pear >= 1:1.9.0
3045db4
BuildRequires:  php-channel(%{channel})
3045db4
Requires:       php-channel(%{channel})
eaad4ec
Requires:       php-common >= 5.2.7
3045db4
Requires(post): %{__pear}
3045db4
Requires(postun): %{__pear}
3045db4
3045db4
Provides:       php-pear(%{channel}/%{pear_name}) = %{version}
3045db4
3045db4
3045db4
%description
3045db4
FilterIterator implementation that filters files based on a list of suffixes.
3045db4
3045db4
%prep
3045db4
%setup -q -c
1f7b325
[ -f package2.xml ] || %{__mv} package.xml package2.xml
3045db4
%{__mv} package2.xml %{pear_name}-%{version}/%{name}.xml
1f7b325
cd %{pear_name}-%{version}
1f7b325
%{__sed} -i -e "s@<min>1.9.1</min>@<min>1.9.0</min>@" %{name}.xml
1f7b325
3045db4
3045db4
%build
3045db4
cd %{pear_name}-%{version}
3045db4
# Empty build section, most likely nothing required.
3045db4
3045db4
3045db4
%install
3045db4
cd %{pear_name}-%{version}
1f7b325
%{__rm} -rf $RPM_BUILD_ROOT docdir# package.xml states 1.9.1, but does not use it
1f7b325
3045db4
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
3045db4
3045db4
# Clean up unnecessary files
3045db4
%{__rm} -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
3045db4
3045db4
# Install XML package description
3045db4
%{__mkdir} -p $RPM_BUILD_ROOT%{pear_xmldir}
3045db4
%{__install} -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
3045db4
3045db4
3045db4
%clean
3045db4
%{__rm} -rf $RPM_BUILD_ROOT
3045db4
3045db4
3045db4
%post
3045db4
%{__pear} install --nodeps --soft --force --register-only \
3045db4
  %{pear_xmldir}/%{name}.xml >/dev/null || :
3045db4
3045db4
3045db4
%postun
3045db4
if [ $1 -eq 0 ] ; then
3045db4
  %{__pear} uninstall --nodeps --ignore-errors --register-only \
eaad4ec
    %{channel}/%{pear_name} >/dev/null || :
3045db4
fi
3045db4
3045db4
3045db4
%files
3045db4
%defattr(-,root,root,-)
3045db4
%{pear_xmldir}/%{name}.xml
3045db4
%{pear_phpdir}/File
3045db4
3045db4
%changelog
1f7b325
* Thu Jul 22 2010 Christof Damian <christof@damian.net> - 1.2.2-2
1f7b325
- fix minimum pear requirement
1f7b325
be39918
* Thu Jul 22 2010 Christof Damian <christof@damian.net> - 1.2.2-1
be39918
- upstream 1.2.2, bugfix
aad33b3
815585a
* Sat May  8 2010 Christof Damian <christof@damian.net> - 1.2.1-1
815585a
- upstream 1.2.1
815585a
eaad4ec
* Tue Feb  9 2010 Christof Damian <christof@damian.net> - 1.2.0-1
eaad4ec
- upstream 1.2.0
eaad4ec
- increased php-common requirements to 5.2.7
eaad4ec
- increased php-pear requirement
eaad4ec
- use global instead of define
eaad4ec
- use channel macro in postun
eaad4ec
d10777f
* Thu Dec 17 2009 Christof Damian <christof@damian.net> 1.1.1-2
d10777f
- version 1.1.1 lowered the php requirement
d10777f
d10777f
* Thu Dec 17 2009 Christof Damian <christof@damian.net> 1.1.1-1
d10777f
- upstream 1.1.1
d10777f
3045db4
* Mon Nov 30 2009 Christof Damian <christof@damian.net> 1.1.0-4
3045db4
- own pear directories
3045db4
3045db4
* Sat Nov 28 2009 Christof Damian <christof@damian.net> 1.1.0-3
3045db4
- fixed php-pear buildrequire
3045db4
- just require php-common
3045db4
3045db4
* Thu Nov 26 2009 Christof Damian <christof@damian.net> 1.1.0-2
3045db4
- fix package.xml to work with older pear versions
3045db4
3045db4
* Wed Nov 25 2009 Christof Damian <christof@damian.net> 1.1.0-1
3045db4
- Initial packaging