[php-pear-Log] update to 1.12.2 (bugfix)

Remi Collet remi at fedoraproject.org
Sun Aug 29 07:30:58 UTC 2010


commit 51471c6661bdbec98e916bb59373f0eed3cec3cf
Author: remi <fedora at famillecollet.com>
Date:   Sun Aug 29 09:30:53 2010 +0200

    update to 1.12.2 (bugfix)

 .gitignore        |    2 ++
 php-pear-Log.spec |   30 ++++++++++++++++++++++--------
 sources           |    2 +-
 xml2changelog     |   26 ++++++++++++++++----------
 4 files changed, 41 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dbb97c1..63f690f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 Log-1.12.1.tgz
+/Log-1.12.2.tgz
+package.xml
diff --git a/php-pear-Log.spec b/php-pear-Log.spec
index 3240ff8..a22e31d 100644
--- a/php-pear-Log.spec
+++ b/php-pear-Log.spec
@@ -4,8 +4,8 @@
 Summary:        Abstracted logging facility for PHP
 Summary(fr):    Abstraction des outils d'enregistrement de traces pour PHP
 Name:           php-pear-Log
-Version:        1.12.1
-Release:        1%{?dist}.1
+Version:        1.12.2
+Release:        1%{?dist}
 License:        MIT
 Group:          Development/Libraries
 Source:         http://pear.php.net/get/Log-%{version}.tgz
@@ -46,8 +46,15 @@ php-pear-Log peut optionnellement utiliser les extensions
 
 %prep
 %setup -c -q
-%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 15
-mv package.xml %{pear_name}-%{version}/%{name}.xml
+%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 10
+
+# 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
@@ -58,7 +65,7 @@ mv package.xml %{pear_name}-%{version}/%{name}.xml
 rm -rf %{buildroot} docdir
 
 pushd Log-%{version}
-%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
 
 # Clean up unnecessary files
 rm -rf %{buildroot}%{pear_phpdir}/.??*
@@ -81,11 +88,15 @@ rm -rf %{buildroot}
 lst=$(find %{buildroot}%{pear_phpdir} -exec grep -q %{buildroot} {} \; -print)
 [ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1;
 
+# Can't be used... tests fails because of date.timezone... :(
+# cd %{pear_name}-%{version}
+# PHPRC=../php.ini %{__pear} run-tests -i "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" tests
+
 # For documentation purpose only
 # After install, as root :
-# pear run-tests -p Log
-# Should return (1.12.0)
-# 19 PASSED TESTS
+# LANG=C pear run-tests -i "-d date.timezone=UTC" -p Log
+# Should return (1.12.2)
+# 20 PASSED TESTS
 # 1 SKIPPED TESTS
 
 
@@ -110,6 +121,9 @@ fi
 
 
 %changelog
+* Sun Aug 29 2010 Remi Collet <Fedora at FamilleCollet.com> 1.12.2-1
+- Version 1.12.2 (stable) - API 1.0.0 (stable)
+
 * Sat May 29 2010 Remi Collet <Fedora at FamilleCollet.com> 1.12.1-1
 - bump release (missing sources)
 
diff --git a/sources b/sources
index 033ef9a..21da36a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7e674b7618b125293ffa942991190f6e  Log-1.12.1.tgz
+70ca19417fcaa2e1e58a9a831bc2f53c  Log-1.12.2.tgz
diff --git a/xml2changelog b/xml2changelog
index c114873..eb6bd31 100644
--- a/xml2changelog
+++ b/xml2changelog
@@ -13,16 +13,22 @@ if ($xml['version'] >= "2"){ // Package.xml V 2.0
 		$xml->date, $xml->notes);
 	$new=$xml->version->release;
 
-	if (isset($xml->changelog->release) && count($xml->changelog->release)) 
-	    foreach($xml->changelog->release as $rel) {
-		$old=$rel->version->release;
-		if ("$old" != "$new") {
-		    printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
-			$rel->version->release, $rel->stability->release, 
-			$rel->version->api, $rel->stability->api, 
-			$rel->date, $rel->notes);
-		}
-	    }
+	if (isset($xml->changelog->release) && count($xml->changelog->release)) {
+		$tab = array();
+		foreach($xml->changelog->release as $rel) {
+			$old=$rel->version->release;
+			if ("$old" != "$new") {
+				$tab[''.$rel->date] = $rel;
+			}
+		}	
+		krsort($tab);
+		foreach($tab as $rel) {
+			printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
+				$rel->version->release, $rel->stability->release, 
+				$rel->version->api, $rel->stability->api, 
+				$rel->date, $rel->notes);
+	    	}
+	}
 } else { // Package.xml V 1.0
 	printf("* Version %s (%s) - %s\n\n%s\n\n",
 		$xml->release->version, $xml->release->state, $xml->release->date, $xml->release->notes);


More information about the scm-commits mailing list