[php-pear-Log/f14/master] update to 1.12.3, run tests during %%check

Remi Collet remi at fedoraproject.org
Tue Sep 28 15:45:17 UTC 2010


commit 23aff265ad657387f16ad0002a7fc268dee67971
Author: remi <fedora at famillecollet.com>
Date:   Tue Sep 28 17:44:43 2010 +0200

    update to 1.12.3, run tests during %%check

 php-pear-Log.spec |   32 +++++++++++++++++++++-----------
 sources           |    2 +-
 xml2changelog     |   26 ++++++++++++++++----------
 3 files changed, 38 insertions(+), 22 deletions(-)
---
diff --git a/php-pear-Log.spec b/php-pear-Log.spec
index 3240ff8..f28dfd4 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.3
+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,12 +88,11 @@ rm -rf %{buildroot}
 lst=$(find %{buildroot}%{pear_phpdir} -exec grep -q %{buildroot} {} \; -print)
 [ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1;
 
-# For documentation purpose only
-# After install, as root :
-# pear run-tests -p Log
-# Should return (1.12.0)
-# 19 PASSED TESTS
-# 1 SKIPPED TESTS
+cd %{pear_name}-%{version}
+PHPRC=../php.ini %{__pear} \
+   run-tests \
+   -i "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \
+   tests
 
 
 %post
@@ -110,6 +116,10 @@ fi
 
 
 %changelog
+* Tue Sep 28 2010 Remi Collet <Fedora at FamilleCollet.com> 1.12.3-1
+- Version 1.12.3 (stable) - API 1.0.0 (stable)
+- run tests during %%check
+
 * 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..acf3f21 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7e674b7618b125293ffa942991190f6e  Log-1.12.1.tgz
+9930cb6d52b3af2ca6a24db267e237f0  Log-1.12.3.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