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