[php-horde-Horde-Date] update to 2.0.3

Remi Collet remi at fedoraproject.org
Wed Jan 30 06:47:50 UTC 2013


commit 90d5c4395d0ff227b07334471facae426174ff7f
Author: Remi Collet <remi at fedoraproject.org>
Date:   Wed Jan 30 07:47:43 2013 +0100

    update to 2.0.3

 .gitignore                |    1 +
 php-horde-Horde-Date.spec |   40 ++++++++++++++++++++++++++++++++--------
 sources                   |    2 +-
 3 files changed, 34 insertions(+), 9 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 01cac35..666c0ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 /Horde_Date-1.0.11.tgz
 /Horde_Date-2.0.1.tgz
 /Horde_Date-2.0.2.tgz
+/Horde_Date-2.0.3.tgz
diff --git a/php-horde-Horde-Date.spec b/php-horde-Horde-Date.spec
index 2480b5b..c1b0508 100644
--- a/php-horde-Horde-Date.spec
+++ b/php-horde-Horde-Date.spec
@@ -1,24 +1,30 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
 %{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
-%global pear_name Horde_Date
+%global pear_name    Horde_Date
 %global pear_channel pear.horde.org
 
+# Can run test because of circular dependency with Horde_Test
+%global with_tests   %{?_with_tests:1}%{!?_with_tests:0}
+
 Name:           php-horde-Horde-Date
-Version:        2.0.2
+Version:        2.0.3
 Release:        1%{?dist}
 Summary:        Horde Date package
 
 Group:          Development/Libraries
 License:        LGPLv2+
-URL:            http://pear.horde.org
-Source0:        http://pear.horde.org/get/%{pear_name}-%{version}.tgz
-Patch0:         package.xml.patch
+URL:            http://%{pear_channel}
+Source0:        http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
 
 BuildArch:      noarch
 
 BuildRequires:  php-pear(PEAR) >= 1.7.0
 BuildRequires:  php-channel(%{pear_channel})
 BuildRequires:  gettext
+%if %{with_tests}
+# To run unit tests
+BuildRequires:  php-pear(%{pear_channel}/Horde_Test) >= 2.1.0
+%endif
 
 Requires(post): %{__pear}
 Requires(postun): %{__pear}
@@ -36,8 +42,6 @@ Package for creating and manipulating dates.
 %prep
 %setup -q -c
 
-%patch0 -p0
-
 cd %{pear_name}-%{version}
 
 # Don't install .po and .pot files
@@ -72,9 +76,24 @@ install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
 for loc in locale/{??,??_??}
 do
     lang=$(basename $loc)
-    test -d $loc && echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc"
+    test -d $RPM_BUILD_ROOT%{pear_datadir}/%{pear_name}/$loc \
+         && echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc"
 done | tee ../%{pear_name}.lang
 
+
+%check
+%if %{with_tests}
+cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
+# See http://bugs.horde.org/ticket/11941
+phpunit\
+    -d include_path=%{buildroot}%{pear_phpdir}:.:%{pear_phpdir} \
+    -d date.timezone=UTC \
+    .
+%else
+: Test disabled, missing '--with tests' option.
+%endif
+
+
 %post
 %{__pear} install --nodeps --soft --force --register-only \
     %{pear_xmldir}/%{name}.xml >/dev/null || :
@@ -95,6 +114,11 @@ fi
 %dir %{pear_datadir}/%{pear_name}/locale
 
 %changelog
+* Wed Jan 30 2013 Remi Collet <remi at fedoraproject.org> - 2.0.3-1
+- Update to 2.0.3
+- add option to run tests
+- install only locales from upstream list
+
 * Fri Jan 11 2013 Nick Bebout <nb at fedoraproject.org> - 2.0.2-1
 - Update to 2.0.2
 
diff --git a/sources b/sources
index 9149caa..fdf4f00 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-cec194b85a6998d745c3809a98582089  Horde_Date-2.0.2.tgz
+ae17cc5281f73ee234155390341b8eff  Horde_Date-2.0.3.tgz


More information about the scm-commits mailing list