[php-pear-Validate] clean spec and update to 0.8.3

Remi Collet remi at fedoraproject.org
Mon Aug 23 18:08:07 UTC 2010


commit 5abe4e614da66fda354f852e190eec81212df9e3
Author: remi <fedora at famillecollet.com>
Date:   Mon Aug 23 20:08:00 2010 +0200

    clean spec and update to 0.8.3

 .gitignore             |    2 ++
 php-pear-Validate.spec |   47 +++++++++++++++++++++++++++++------------------
 sources                |    2 +-
 3 files changed, 32 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a8f69ce..9b1395a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 Validate-0.8.2.tgz
+package.xml
+/Validate-0.8.3.tgz
diff --git a/php-pear-Validate.spec b/php-pear-Validate.spec
index d765a05..35250ff 100644
--- a/php-pear-Validate.spec
+++ b/php-pear-Validate.spec
@@ -1,30 +1,31 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define ClassName Validate
+%global pear_name Validate
 
 Name:           php-pear-Validate
-Version:        0.8.2
+Version:        0.8.3
 Release:        1%{?dist}
 Summary:        Validation Class for Various Data Types
 
 Group:          Development/Libraries
 License:        BSD
 URL:            http://pear.php.net/package/Validate
-Source0:        http://pear.php.net/get/%{ClassName}-%{version}.tgz
+Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
 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(hint): php-pear(Date)
+Requires:       php-pear(Date)
+# Not yet available Requires: php-pear(Net_IDNA)
 Requires(post): %{__pear}
 Requires(postun): %{__pear}
-Provides:       php-pear(%{ClassName}) = %{version}
+Provides:       php-pear(%{pear_name}) = %{version}
 
 %description
 Package to validate various data. It includes :
 - numbers (min/max, decimal or not)
 - email (syntax, domain check, rfc822)
-- string (predifined type alpha upper and/or lowercase, numeric,...)
+- string (predefined type alpha upper and/or lowercase, numeric,...)
 - date (min, max)
 - uri (RFC2396)
 - possibility valid multiple data with a single method call (::multiple)
@@ -32,20 +33,24 @@ Package to validate various data. It includes :
 
 %prep
 %setup -qc
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{ClassName}-%{version}/%{ClassName}.xml
-cd %{ClassName}-%{version}
+# Create a "localized" php.ini to avoid build warning
+cp /etc/php.ini .
+echo "date.timezone=UTC" >>php.ini
+
+cd %{pear_name}-%{version}
+# package.xml is V2
+mv ../package.xml %{name}.xml
 
 
 %build
-cd %{ClassName}-%{version}
+cd %{pear_name}-%{version}
 # Empty build section, most likely nothing required.
 
 
 %install
-cd %{ClassName}-%{version}
+cd %{pear_name}-%{version}
 rm -rf $RPM_BUILD_ROOT docdir
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{ClassName}.xml
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
 
 # Move documentation
 mkdir -p docdir
@@ -56,7 +61,7 @@ rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
 
 # Install XML package description
 install -d $RPM_BUILD_ROOT%{pear_xmldir}
-install -pm 644 %{ClassName}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
 
 
 %clean
@@ -65,24 +70,30 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 %{__pear} install --nodeps --soft --force --register-only \
-    %{pear_xmldir}/%{ClassName}.xml >/dev/null ||:
+    %{pear_xmldir}/%{name}.xml >/dev/null ||:
 
 %postun
 if [ "$1" -eq "0" ]; then
     %{__pear} uninstall --nodeps --ignore-errors --register-only \
-        %{ClassName} >/dev/null ||:
+        %{pear_name} >/dev/null ||:
 fi
 
 
 %files
 %defattr(-,root,root,-)
-%doc %{ClassName}-%{version}/docdir/%{ClassName}/*
-%{pear_xmldir}/%{ClassName}.xml
-%{pear_testdir}/%{ClassName}
+%doc %{pear_name}-%{version}/docdir/%{pear_name}/*
+%{pear_xmldir}/%{name}.xml
+%{pear_testdir}/%{pear_name}
 %{pear_phpdir}/Validate.php
 
 
 %changelog
+* Mon Aug 23 2010 Remi Collet <Fedora at FamilleCollet.com> - 0.8.3-1
+- update to 0.8.3
+- clean define
+- rename Validate.xml to php-pear-Validate.xml
+- set date.timezone during build
+
 * Mon Sep 14 2009 Christopher Stone <chris.stone at gmail.com> 0.8.2-1
 - Upstream sync
 
diff --git a/sources b/sources
index f046fb1..c6177f9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-769dfcc329ae7f42f9d874fc7baec4a1  Validate-0.8.2.tgz
+b9e8a25b5ec2daba9f6e51d81e8d1d52  Validate-0.8.3.tgz


More information about the scm-commits mailing list