diff --git a/.gitignore b/.gitignore index fd962c4..9325398 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -File-1.3.0.tgz -package.xml +*spec~ +package-*.xml +/File-1.4.0.tgz diff --git a/php-pear-File.spec b/php-pear-File.spec index 8a138d3..d613e8b 100644 --- a/php-pear-File.spec +++ b/php-pear-File.spec @@ -2,8 +2,8 @@ %global pear_name File Name: php-pear-File -Version: 1.3.0 -Release: 6%{?dist} +Version: 1.4.0 +Release: 1%{?dist} Summary: Common file and directory routines Group: Development/Languages @@ -12,26 +12,25 @@ URL: http://pear.php.net/package/File Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - BuildArch: noarch -BuildRequires: php-pear(PEAR) >= 1.5.3 -Requires: php-pear(PEAR) >= 1.5.3 +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. Also provides interface for handling CSV files. +to deal with paths. %prep %setup -qc -# Create a "localized" php.ini to avoid build warning -cp /etc/php.ini . -echo "date.timezone=UTC" >>php.ini - cd %{pear_name}-%{version} # Package is V2 mv ../package.xml %{name}.xml @@ -43,29 +42,30 @@ cd %{pear_name}-%{version} %install +rm -rf %{buildroot} cd %{pear_name}-%{version} -rm -rf $RPM_BUILD_ROOT docdir -PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml +%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml # Clean up unnecessary files -rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??* +rm -rf %{buildroot}%{pear_phpdir}/.??* # Install XML package description -install -d $RPM_BUILD_ROOT%{pear_xmldir} -install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir} +install -d %{buildroot}%{pear_xmldir} +install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} %check -# For documentation purpose -# After install, run (as root) -# pear run-tests -p File -# Shoud return -# 36 PASSED TESTS -# 0 SKIPPED TESTS +cd %{pear_name}-%{version} +%{__pear} \ + run-tests \ + --recur \ + --ini "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \ + tests | tee ../tests.log +grep "FAILED TESTS" ../tests.log && exit 1 %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post @@ -87,6 +87,11 @@ fi %changelog +* Sun Apr 01 2012 Remi Collet - 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 - 1.3.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index 9ef67e2..1bb1130 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9d806e98095f2b10373ac521a098d9ed File-1.3.0.tgz +a14a44b2492deecc09dff0fef69c796a File-1.4.0.tgz