[php-pear-Math-Stats/el6/master] clean spec

Remi Collet remi at fedoraproject.org
Sat Aug 28 12:43:16 UTC 2010


commit d4e487f16bb5347d3776f4fab8f6428b28b810e4
Author: remi <fedora at famillecollet.com>
Date:   Sat Aug 28 14:37:51 2010 +0200

    clean spec

 .gitignore               |    1 +
 PHP-LICENSE-3.01         |   68 ----------------------------------------------
 php-pear-Math-Stats.spec |   37 +++++++++++++++---------
 3 files changed, 24 insertions(+), 82 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b9eb44a..4a6fcfa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 Math_Stats-0.9.0beta3.tgz
+package.xml
diff --git a/php-pear-Math-Stats.spec b/php-pear-Math-Stats.spec
index 352c266..8f86880 100644
--- a/php-pear-Math-Stats.spec
+++ b/php-pear-Math-Stats.spec
@@ -1,21 +1,21 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define pear_name Math_Stats
-%define beta beta3
+%global pear_name Math_Stats
+%global beta beta3
 
 Name:           php-pear-Math-Stats
 Version:        0.9.0
-Release:        0.4.%{beta}%{?dist}
+Release:        0.5.%{beta}%{?dist}
 Summary:        Classes to calculate statistical parameters
 
 Group:          Development/Libraries
 License:        PHP
 URL:            http://pear.php.net/package/Math_Stats
 Source0:        http://pear.php.net/get/%{pear_name}-%{version}%{beta}.tgz
-Source1:        PHP-LICENSE-3.01
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  php-pear >= 1:1.4.9-1.2
+
 Requires:       php-pear(PEAR)
 Requires(post): %{__pear}
 Requires(postun): %{__pear}
@@ -24,17 +24,20 @@ Provides:       php-pear(%{pear_name}) = %{version}
 %description
 Package to calculate statistical parameters of numerical arrays
 of data. The data can be in a simple numerical array, or in a
-cummulative numerical array. A cummulative array, has the value
+cumulative numerical array. A cumulative array, has the value
 as the index and the number of repeats as the value for the
 array item, e.g. $data = array(3=>4, 2.3=>5, 1.25=>6, 0.5=>3).
 
 
 %prep
 %setup -q -c
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}%{beta}/%{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}%{beta}
+# package.xml is V1
+PHPRC=../php.ini %{__pear} convert ../package.xml %{name}.xml 
 
 
 %build
@@ -45,7 +48,7 @@ cd %{pear_name}-%{version}%{beta}
 %install
 cd %{pear_name}-%{version}%{beta}
 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
@@ -61,7 +64,7 @@ rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
 
 # Install XML package description
 mkdir -p $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}
 
 
 %clean
@@ -70,7 +73,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
@@ -82,13 +85,19 @@ fi
 %files
 %defattr(-,root,root,-)
 %doc %{pear_name}-%{version}%{beta}/docdir/%{pear_name}/*
-%doc LICENSE
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
 %{pear_testdir}/%{pear_name}
 %{pear_phpdir}/Math
 
 
 %changelog
+* Sat Aug 28 2010 Remi Collet <Fedora at FamilleCollet.com> - 0.9.0-0.5.beta3
+- clean define
+- remove LICENSE (not provided by upstream)
+- rename Math_Stats.xml to php-pear-Math-Stats.xml
+- set date.timezone during build
+- convert package.xml to V2 during prep
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.0-0.4.beta3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


More information about the scm-commits mailing list