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