[php-pear-Net-DIME] update to 1.0.2 - QA release

Remi Collet remi at fedoraproject.org
Thu Oct 28 13:02:58 UTC 2010


commit bad591511681089b2904dd75bd08811fe1a74b7f
Author: remi <fedora at famillecollet.com>
Date:   Thu Oct 28 15:02:56 2010 +0200

    update to 1.0.2 - QA release

 .gitignore             |    2 ++
 php-pear-Net-DIME.spec |   23 ++++++++++++++++-------
 sources                |    2 +-
 xml2changelog          |   26 ++++++++++++++++----------
 4 files changed, 35 insertions(+), 18 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index eca2ea0..2fe1b82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 Net_DIME-1.0.1.tgz
+package.xml
+/Net_DIME-1.0.2.tgz
diff --git a/php-pear-Net-DIME.spec b/php-pear-Net-DIME.spec
index 512af89..ae265dc 100644
--- a/php-pear-Net-DIME.spec
+++ b/php-pear-Net-DIME.spec
@@ -4,8 +4,8 @@
 #global beta RC1
 
 Name:           php-pear-Net-DIME
-Version:        1.0.1
-Release:        4%{?dist}
+Version:        1.0.2
+Release:        1%{?dist}
 Summary:        Implements Direct Internet Message Encapsulation (DIME)
 
 Group:          Development/Libraries
@@ -13,10 +13,11 @@ License:        BSD
 URL:            http://pear.php.net/package/Net_DIME
 Source0:        http://pear.php.net/get/%{pear_name}-%{version}%{?beta}.tgz
 Source2:        xml2changelog
-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}
@@ -33,11 +34,15 @@ Optimization Mechanism (MTOM) specification.
 
 %prep
 %setup -q -c
-# package.xml is V2
-%{_bindir}/php -n %{SOURCE2} package.xml >CHANGELOG
-mv package.xml %{pear_name}-%{version}%{?beta}/%{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}%{?beta}
+# Package.xml is V2
+mv ../package.xml %{name}.xml
 
 
 %build
@@ -48,7 +53,7 @@ cd %{pear_name}-%{version}%{?beta}
 %install
 rm -rf $RPM_BUILD_ROOT docdir
 cd %{pear_name}-%{version}%{?beta}
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
 
 # Clean up unnecessary files
 rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
@@ -82,6 +87,10 @@ fi
 
 
 %changelog
+* Thu Oct 28 2010 Remi Collet <Fedora at FamilleCollet.com> 1.0.2-1
+- Version 1.0.2 (stable) - API 1.0.0 (stable) - QA release
+- set timezone during build
+
 * Sat May 22 2010 Remi Collet <Fedora at FamilleCollet.com> 1.0.1-4
 - spec cleanup
 
diff --git a/sources b/sources
index d530dcc..bb1e8a0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e922fd45f2983dd92d682f3c07103e19  Net_DIME-1.0.1.tgz
+530e0b358acb976eabe66d8a8e9b10ba  Net_DIME-1.0.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