[php-pear-Structures-DataGrid] cleaning up spec file

Christof Damian cdamian at fedoraproject.org
Thu Aug 19 18:04:10 UTC 2010


commit cee178eb3bd88677f7032975b33dd634d50a7a5f
Author: Christof Damian <christof at damian.net>
Date:   Thu Aug 19 19:57:01 2010 +0200

    cleaning up spec file

 php-pear-Structures-DataGrid.spec |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/php-pear-Structures-DataGrid.spec b/php-pear-Structures-DataGrid.spec
index beb32de..f44425c 100644
--- a/php-pear-Structures-DataGrid.spec
+++ b/php-pear-Structures-DataGrid.spec
@@ -1,18 +1,19 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define pear_name Structures_DataGrid
+%global pear_name Structures_DataGrid
 
 Name:           php-pear-Structures-DataGrid
 Version:        0.9.0
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Tabular structure for converting data
 
 Group:          Development/Libraries
 License:        BSD
-URL:            http://pear.php.net/package/Structures_DataGrid
+URL:            http://pear.php.net/package/%{pear_name}
 Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
+Requires:       php-common >= 4.3
 BuildRequires:  php-pear >= 1:1.6.0
 Requires:       php-pear(PEAR)
 Requires(hint): php-pear(File) >= 1.3.0
@@ -25,7 +26,7 @@ Provides:       php-pear(%{pear_name}) = %{version}
 %description
 This package offers a toolkit to render out a datagrid in HTML format as well
 as many other formats such as an XML Document, an Excel Spreadsheet, an XUL
-Document and more. It also offers paging and sorting functionallity to limit
+Document and more. It also offers paging and sorting functionality to limit
 the data that is presented and processed. This concept is based on the .NET
 Framework DataGrid control and works very well with database and XML result
 sets.
@@ -34,9 +35,12 @@ sets.
 %prep
 %setup -qc
 [ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
+mv package2.xml %{pear_name}-%{version}/%{name}.xml
 cd %{pear_name}-%{version}
 
+# Create a "localized" php.ini to avoid build warning
+cp /etc/php.ini .
+echo "date.timezone=UTC" >>php.ini
 
 %build
 cd %{pear_name}-%{version}
@@ -46,7 +50,7 @@ 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
 
 # Move documentation
 mkdir -p docdir
@@ -57,7 +61,7 @@ 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}
 install -d $RPM_BUILD_ROOT%{pear_phpdir}/Structures/DataGrid/DataSource
 install -d $RPM_BUILD_ROOT%{pear_phpdir}/Structures/DataGrid/Renderer
 
@@ -68,7 +72,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
@@ -80,12 +84,15 @@ fi
 %files
 %defattr(-,root,root,-)
 %doc %{pear_name}-%{version}/docdir/%{pear_name}/docs/examples
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
 %{pear_testdir}/%{pear_name}
 %{pear_phpdir}/Structures/DataGrid*
 
 
 %changelog
+* Thu Aug 19 2010 Christof Damian <christof at damian.net> - 0.9.0-6
+- spec cleaning
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


More information about the scm-commits mailing list