[php-pear-File] - clean spec - rename File.xml to php-pear-File.xml - add %%check for documentation

Remi Collet remi at fedoraproject.org
Sun Aug 15 15:41:11 UTC 2010


commit b9b580598d2196df13251b9cf400ff18e46c5929
Author: remi <fedora at famillecollet.com>
Date:   Sun Aug 15 17:41:00 2010 +0200

    - clean spec
    - rename File.xml to php-pear-File.xml
    - add %%check for documentation

 .gitignore         |    1 +
 php-pear-File.spec |   43 ++++++++++++++++++++++++++++++-------------
 2 files changed, 31 insertions(+), 13 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 072e2be..fd962c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 File-1.3.0.tgz
+package.xml
diff --git a/php-pear-File.spec b/php-pear-File.spec
index eb51a8d..085fb81 100644
--- a/php-pear-File.spec
+++ b/php-pear-File.spec
@@ -1,21 +1,21 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define pear_name File
+%global pear_name File
 
 Name:           php-pear-File
 Version:        1.3.0
-Release:        3%{?dist}
+Release:        4%{?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/%{pear_name}-%{version}.tgz
-Source1:        PHP-LICENSE-3.01
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
-BuildRequires:  php-pear >= 1:1.4.9-1.2
-Requires:       php-pear(PEAR)
+BuildRequires:  php-pear(PEAR) >= 1.5.3
+Requires:       php-pear(PEAR) >= 1.5.3
 Requires(post): %{__pear}
 Requires(postun): %{__pear}
 Provides:       php-pear(%{pear_name}) = %{version}
@@ -27,10 +27,14 @@ to deal with paths. Also provides interface for handling CSV files.
 
 %prep
 %setup -qc
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
-install -pm 644 -c %{SOURCE1} LICENSE
+
+# 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
 
 
 %build
@@ -41,14 +45,23 @@ cd %{pear_name}-%{version}
 %install
 cd %{pear_name}-%{version}
 rm -rf $RPM_BUILD_ROOT docdir
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
 
 # Clean up unnecessary files
 rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
 
 # Install XML package description
 install -d $RPM_BUILD_ROOT%{pear_xmldir}
-install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+
+
+%check
+# For documentation purpose
+# After install, run (as root)
+# pear run-tests -p File
+# Shoud return
+# 36 PASSED TESTS
+# 0 SKIPPED TESTS
 
 
 %clean
@@ -57,7 +70,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 %{__pear} install --nodeps --soft --force --register-only \
-    %{pear_xmldir}/%{pear_name}.xml >/dev/null || :
+    %{pear_xmldir}/%{name}.xml >/dev/null || :
 
 %postun
 if [ $1 -eq 0 ] ; then
@@ -68,13 +81,17 @@ fi
 
 %files
 %defattr(-,root,root,-)
-%doc LICENSE
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
 %{pear_testdir}/%{pear_name}
 %{pear_phpdir}/%{pear_name}*
 
 
 %changelog
+* Sun Aug 15 2010 Remi Collet <Fedora at 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 at lists.fedoraproject.org> - 1.3.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


More information about the scm-commits mailing list