From e0145b99a9bbd0dea63c2de2d63572333ba9be30 Mon Sep 17 00:00:00 2001 From: remi Date: Oct 27 2010 18:15:50 +0000 Subject: update to 0.9.1 - QA release --- diff --git a/.gitignore b/.gitignore index bd00fe8..9046547 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ Net_URL_Mapper-0.9.0.tgz +package.xml +/Net_URL_Mapper-0.9.1.tgz diff --git a/Net_URL_Mapper-tests.patch b/Net_URL_Mapper-tests.patch deleted file mode 100644 index 785eec7..0000000 --- a/Net_URL_Mapper-tests.patch +++ /dev/null @@ -1,102 +0,0 @@ -diff -Nur php-pear-Net-URL-Mapper-0.9.0.orig/Net_URL_Mapper-0.9.0/tests/ExceptionTest.php php-pear-Net-URL-Mapper-0.9.0/Net_URL_Mapper-0.9.0/tests/ExceptionTest.php ---- php-pear-Net-URL-Mapper-0.9.0.orig/Net_URL_Mapper-0.9.0/tests/ExceptionTest.php 2007-03-28 12:58:25.000000000 +0200 -+++ php-pear-Net-URL-Mapper-0.9.0/Net_URL_Mapper-0.9.0/tests/ExceptionTest.php 2008-02-09 15:21:48.000000000 +0100 -@@ -49,12 +49,12 @@ - /** - * PHPUnit2 Test Case - */ --require_once 'PHPUnit2/Extensions/ExceptionTestCase.php'; -+require_once 'PHPUnit/Extensions/ExceptionTestCase.php'; - - /** - * URL recognition tests for Net_URL_Mapper class - */ --class ExceptionTest extends PHPUnit2_Extensions_ExceptionTestCase -+class ExceptionTest extends PHPUnit_Extensions_ExceptionTestCase - { - public function setup() - { -@@ -158,4 +158,4 @@ - $this->assertEquals(null, $m->match('/view/4/honker')); - } - } --?> -\ Pas de fin de ligne à la fin du fichier. -+?> -diff -Nur php-pear-Net-URL-Mapper-0.9.0.orig/Net_URL_Mapper-0.9.0/tests/GenerationTest.php php-pear-Net-URL-Mapper-0.9.0/Net_URL_Mapper-0.9.0/tests/GenerationTest.php ---- php-pear-Net-URL-Mapper-0.9.0.orig/Net_URL_Mapper-0.9.0/tests/GenerationTest.php 2007-03-28 12:58:25.000000000 +0200 -+++ php-pear-Net-URL-Mapper-0.9.0/Net_URL_Mapper-0.9.0/tests/GenerationTest.php 2008-02-09 15:21:48.000000000 +0100 -@@ -49,13 +49,13 @@ - /** - * PHPUnit2 Test Case - */ --require_once 'PHPUnit2/Framework/TestCase.php'; -+require_once 'PHPUnit/Framework/TestCase.php'; - - - /** - * URL generation tests for Net_URL_Mapper class - */ --class GenerationTest extends PHPUnit2_Framework_TestCase -+class GenerationTest extends PHPUnit_Framework_TestCase - { - public function testAllStaticNoReqs() - { -@@ -409,4 +409,4 @@ - - - --?> -\ Pas de fin de ligne à la fin du fichier. -+?> -diff -Nur php-pear-Net-URL-Mapper-0.9.0.orig/Net_URL_Mapper-0.9.0/tests/RecognitionTest.php php-pear-Net-URL-Mapper-0.9.0/Net_URL_Mapper-0.9.0/tests/RecognitionTest.php ---- php-pear-Net-URL-Mapper-0.9.0.orig/Net_URL_Mapper-0.9.0/tests/RecognitionTest.php 2007-03-28 12:58:25.000000000 +0200 -+++ php-pear-Net-URL-Mapper-0.9.0/Net_URL_Mapper-0.9.0/tests/RecognitionTest.php 2008-02-09 15:21:48.000000000 +0100 -@@ -49,13 +49,13 @@ - /** - * PHPUnit2 Test Case - */ --require_once 'PHPUnit2/Framework/TestCase.php'; -+require_once 'PHPUnit/Framework/TestCase.php'; - - - /** - * URL recognition tests for Net_URL_Mapper class - */ --class RecognitionTest extends PHPUnit2_Framework_TestCase -+class RecognitionTest extends PHPUnit_Framework_TestCase - { - public function testAllFixed() - { -@@ -407,4 +407,4 @@ - - - --?> -\ Pas de fin de ligne à la fin du fichier. -+?> -diff -Nur php-pear-Net-URL-Mapper-0.9.0.orig/Net_URL_Mapper-0.9.0/tests/run php-pear-Net-URL-Mapper-0.9.0/Net_URL_Mapper-0.9.0/tests/run ---- php-pear-Net-URL-Mapper-0.9.0.orig/Net_URL_Mapper-0.9.0/tests/run 1970-01-01 01:00:00.000000000 +0100 -+++ php-pear-Net-URL-Mapper-0.9.0/Net_URL_Mapper-0.9.0/tests/run 2008-02-09 15:25:44.000000000 +0100 -@@ -0,0 +1,4 @@ -+php /usr/share/pear/PHPUnit/TextUI/Command.php GenerationTest GenerationTest.php -+php /usr/share/pear/PHPUnit/TextUI/Command.php ExceptionTest ExceptionTest.php -+php /usr/share/pear/PHPUnit/TextUI/Command.php RecognitionTest RecognitionTest.php -+ -diff -Nur php-pear-Net-URL-Mapper-0.9.0.orig/package.xml php-pear-Net-URL-Mapper-0.9.0/package.xml ---- php-pear-Net-URL-Mapper-0.9.0.orig/package.xml 2007-03-28 12:58:25.000000000 +0200 -+++ php-pear-Net-URL-Mapper-0.9.0/package.xml 2008-02-09 15:26:14.000000000 +0100 -@@ -35,9 +35,10 @@ - - - -- -- -- -+ -+ -+ -+ - - - diff --git a/php-pear-Net-URL-Mapper.spec b/php-pear-Net-URL-Mapper.spec index 9f97b96..7e0c75a 100644 --- a/php-pear-Net-URL-Mapper.spec +++ b/php-pear-Net-URL-Mapper.spec @@ -2,27 +2,30 @@ %define pear_name Net_URL_Mapper Name: php-pear-Net-URL-Mapper -Version: 0.9.0 -Release: 4%{?dist} +Version: 0.9.1 +Release: 1%{?dist} Summary: Simple and flexible way to build nice URLs for web applications Group: Development/Languages License: BSD URL: http://pear.php.net/package/Net_URL_Mapper Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -Patch0: Net_URL_Mapper-tests.patch +Source2: xml2changelog +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php-pear >= 1:1.4.9-1.2 -BuildRequires: php-pear-PHPUnit +# for tests +BuildRequires: php-pear(pear.phpunit.de/PHPUnit) +BuildRequires: php-pear(Net_URL) >= 1.0.14 + Requires: php-pear(PEAR) Requires: php-pear(Net_URL) >= 1.0.14 Requires(post): %{__pear} Requires(postun): %{__pear} Provides: php-pear(%{pear_name}) = %{version} + %description Net_URL_Mapper provides a simple and flexible way to build nice URLs for your web applications. @@ -35,7 +38,7 @@ frameworks and therefore can be used with your own router. %prep %setup -qc -%patch0 -p1 +%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 10 [ -f package2.xml ] || mv package.xml package2.xml mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml @@ -76,20 +79,34 @@ fi %check -# check does not work under mock -#cd $RPM_BUILD_ROOT%{pear_testdir}/%{pear_name}/tests -#sh run +cd %{pear_name}-%{version} +phpunit \ + -d date.timezone=UTC \ + -d include_path=%{pear_phpdir}:$RPM_BUILD_ROOT%{pear_phpdir} \ + tests %files %defattr(-,root,root,-) -%{pear_xmldir}/%{pear_name}.xml +%doc CHANGELOG +%{pear_xmldir}/%{name}.xml %{pear_testdir}/%{pear_name} -%dir %{pear_phpdir}/Net/URL -%{pear_phpdir}/Net/URL/Mapper* +%{pear_datadir}/%{pear_name} +# Net_URL own Net but not Net/URL +%{pear_phpdir}/Net/URL +# Packaging stuff +%exclude %{_bindir}/*php %changelog +* Wed Oct 27 2010 Remi Collet - 0.9.1-1 +- Version 0.9.1 (beta) - API 1.0.0 (stable) +- add generated Changelog +- run tests in %%check +- rename Net_URL_Mapper.xml to php-pear-Net-URL-Mapper.xml +- set date.timezone during build +- clean define + * Sun Jul 26 2009 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index d75febc..ab2c71b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -11a4d002f881ac5d957cdbb6b46139f7 Net_URL_Mapper-0.9.0.tgz +0d27b8d5a6a3e38b310807f2fcee996f Net_URL_Mapper-0.9.1.tgz diff --git a/xml2changelog b/xml2changelog new file mode 100644 index 0000000..eb6bd31 --- /dev/null +++ b/xml2changelog @@ -0,0 +1,40 @@ += "2"){ // Package.xml V 2.0 + printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n", + $xml->version->release, $xml->stability->release, + $xml->version->api, $xml->stability->api, + $xml->date, $xml->notes); + $new=$xml->version->release; + + 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); + + foreach($xml->changelog->release as $rel) + printf("* Version %s (%s) - %s\n\n%s\n\n", + $rel->version, $rel->state, $rel->date, $rel->notes); +} +?>