[php-pear-File-Find] update to 1.3.1 (QA release)
Remi Collet
remi at fedoraproject.org
Tue Oct 5 18:09:14 UTC 2010
commit d9a294b3b86c71c095c72fb9e825d03f3918d593
Author: remi <fedora at famillecollet.com>
Date: Tue Oct 5 20:09:14 2010 +0200
update to 1.3.1 (QA release)
.gitignore | 2 ++
php-pear-File-Find.spec | 41 ++++++++++++++++++++++++++---------------
sources | 2 +-
xml2changelog | 26 ++++++++++++++++----------
4 files changed, 45 insertions(+), 26 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 911d3f4..9a40004 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
File_Find-1.3.0.tgz
+/File_Find-1.3.1.tgz
+package.xml
diff --git a/php-pear-File-Find.spec b/php-pear-File-Find.spec
index cff3a07..c7344c2 100644
--- a/php-pear-File-Find.spec
+++ b/php-pear-File-Find.spec
@@ -4,15 +4,16 @@
Summary: Class which facilitates the search of filesystems
Summary(fr): Classe facilitant la recherche dans le système de fichiers
Name: php-pear-File-Find
-Version: 1.3.0
-Release: 4%{?dist}
+Version: 1.3.1
+Release: 1%{?dist}
License: PHP
Group: Development/Libraries
+
+URL: http://pear.php.net/package/File_Find
Source: http://pear.php.net/get/%{pear_name}-%{version}.tgz
Source2: xml2changelog
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-URL: http://pear.php.net/package/File_Find
BuildArch: noarch
BuildRequires: php-pear >= 1:1.4.9-1.2
@@ -36,11 +37,15 @@ sympathiques.
%prep
%setup -c -q
-# still a 1.0 package.xml
-%{__pear} convert package.xml package2.xml
+%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 5
-%{_bindir}/php -n %{SOURCE2} package2.xml >CHANGELOG
-mv package2.xml %{pear_name}-%{version}/%{name}.xml
+# 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
@@ -51,7 +56,7 @@ mv package2.xml %{pear_name}-%{version}/%{name}.xml
rm -rf %{buildroot} docdir
pushd %{pear_name}-%{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}/.??*
@@ -61,9 +66,6 @@ rm -rf %{buildroot}%{pear_phpdir}/.??*
%{__install} -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
popd
-# Sort out documentation
-#mv %{buildroot}%{pear_docdir}/%{pear_name}/docs docdir
-#mv %{buildroot}%{pear_docdir}/%{pear_name}/examples docdir/examples
%clean
@@ -74,11 +76,14 @@ 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 File_Find
-# Actually all tests "could" failed because of return order... :(
+cd %{pear_name}-%{version}
+PHPRC=../php.ini %{__pear} \
+ run-tests \
+ -i "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \
+ tests | tee ../tests.log
+# run-tests doesn't set a return value
+grep -q "7 PASSED TESTS" ../tests.log
%post
%{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/%{name}.xml >/dev/null || :
@@ -100,6 +105,12 @@ fi
%changelog
+* Tue Oct 05 2020 Remi Collet <Fedora at FamilleCollet.com> 1.3.1-1
+- upstream Version 1.3.1 (stable) - API 1.3.0 (stable)
+- package.xml is now V2
+- set timezone during build
+- run tests in %%check
+
* Sat May 22 2020 Remi Collet <Fedora at FamilleCollet.com> 1.3.0-4
- spec cleanup
- rename File_Find.xml to php-pear-File-Find.xml
diff --git a/sources b/sources
index 54873df..204a96c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f3745971cd0d7442160a050255d5e17f File_Find-1.3.0.tgz
+02df98fab80257d2840c0567382685a3 File_Find-1.3.1.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