Remi Collet 0340b90
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
xulchris 875447e
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
b9b5805
%global pear_name File
xulchris 875447e
xulchris 875447e
Name:           php-pear-File
5bfa080
Version:        1.4.1
Remi Collet 0340b90
Release:        5%{?dist}
xulchris 875447e
Summary:        Common file and directory routines
xulchris 875447e
xulchris 875447e
Group:          Development/Languages
xulchris aeff3c7
License:        PHP
xulchris 875447e
URL:            http://pear.php.net/package/File
xulchris 875447e
Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
b9b5805
xulchris 875447e
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
xulchris 875447e
BuildArch:      noarch
c49a0c4
BuildRequires:  php-pear(PEAR) >= 1.6.0
c49a0c4
c49a0c4
Requires:       php-pear(PEAR) >= 1.6.0
c49a0c4
# Yes, this are circular dependencies, from upstream
c49a0c4
Requires:       php-pear(File_CSV)
c49a0c4
Requires:       php-pear(File_Util)
xulchris 875447e
Requires(post): %{__pear}
xulchris 875447e
Requires(postun): %{__pear}
xulchris 875447e
Provides:       php-pear(%{pear_name}) = %{version}
xulchris 875447e
xulchris 875447e
%description
xulchris 875447e
Provides easy access to read/write to files along with some common routines
c49a0c4
to deal with paths.
xulchris 875447e
xulchris 875447e
xulchris 875447e
%prep
xulchris aeff3c7
%setup -qc
b9b5805
xulchris 875447e
cd %{pear_name}-%{version}
b9b5805
# Package is V2
b9b5805
mv ../package.xml %{name}.xml
xulchris 875447e
xulchris 875447e
xulchris 875447e
%build
xulchris 875447e
cd %{pear_name}-%{version}
xulchris 875447e
# Empty build section, most likely nothing required.
xulchris 875447e
xulchris 875447e
xulchris 875447e
%install
c49a0c4
rm -rf %{buildroot}
xulchris 875447e
cd %{pear_name}-%{version}
c49a0c4
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
xulchris 875447e
xulchris 875447e
# Clean up unnecessary files
Remi Collet 0340b90
rm -rf %{buildroot}%{pear_metadir}/.??*
xulchris 875447e
xulchris 875447e
# Install XML package description
c49a0c4
install -d %{buildroot}%{pear_xmldir}
c49a0c4
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
b9b5805
b9b5805
b9b5805
%check
c49a0c4
cd %{pear_name}-%{version}
c49a0c4
%{__pear} \
c49a0c4
   run-tests \
c49a0c4
   --recur \
c49a0c4
   --ini "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \
c49a0c4
   tests | tee ../tests.log
c49a0c4
grep "FAILED TESTS" ../tests.log && exit 1
xulchris 875447e
xulchris 875447e
xulchris 875447e
%clean
c49a0c4
rm -rf %{buildroot}
xulchris 875447e
xulchris 875447e
xulchris 875447e
%post
xulchris 875447e
%{__pear} install --nodeps --soft --force --register-only \
b9b5805
    %{pear_xmldir}/%{name}.xml >/dev/null || :
xulchris 875447e
xulchris 875447e
%postun
xulchris 875447e
if [ $1 -eq 0 ] ; then
xulchris 875447e
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
xulchris 875447e
        %{pear_name} >/dev/null || :
xulchris 875447e
fi
xulchris 875447e
xulchris 875447e
xulchris 875447e
%files
xulchris 875447e
%defattr(-,root,root,-)
b9b5805
%{pear_xmldir}/%{name}.xml
xulchris 875447e
%{pear_testdir}/%{pear_name}
xulchris 875447e
%{pear_phpdir}/%{pear_name}*
xulchris 875447e
xulchris 875447e
xulchris 875447e
%changelog
Remi Collet 0340b90
* Tue Feb 19 2013 Remi Collet <remi@fedoraproject.org> - 1.4.1-5
Remi Collet 0340b90
- fix metadata location
Remi Collet 0340b90
77f4b5b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-4
77f4b5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
77f4b5b
d8da817
* Tue Aug 14 2012 Remi Collet <remi@fedoraproject.org> - 1.4.1-3
d8da817
- rebuilt for new pear_testdir
d8da817
e63e914
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-2
e63e914
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e63e914
5bfa080
* Wed Apr 11 2012 Remi Collet <remi@fedoraproject.org> - 1.4.1-1
5bfa080
- update to 1.4.1
5bfa080
c49a0c4
* Sun Apr 01 2012 Remi Collet <remi@fedoraproject.org> - 1.4.0-1
c49a0c4
- update to 1.4.0
c49a0c4
- run test suite during %%check
c49a0c4
- splited in File, File_CSV and File_Util
c49a0c4
3667dcd
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-6
3667dcd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3667dcd
e2d91d9
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-5
e2d91d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e2d91d9
b9b5805
* Sun Aug 15 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.3.0-4
b9b5805
- clean spec
b9b5805
- rename File.xml to php-pear-File.xml
b9b5805
- add %%check for documentation
b9b5805
20835d7
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
20835d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
20835d7
6f94cd0
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-2
6f94cd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6f94cd0
xulchris aeff3c7
* Sat Sep 08 2007 Christopher Stone <chris.stone@gmail.com> 1.3.0-1
xulchris aeff3c7
- Upstream sync
xulchris aeff3c7
xulchris 875447e
* Wed Dec 13 2006 Christopher Stone <chris.stone@gmail.com> 1.2.2-1
xulchris 875447e
- Initial Release