summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-02-11 11:22:24 +0100
committerRemi Collet <fedora@famillecollet.com>2014-02-11 11:22:24 +0100
commit0411dc7e9f2b184eda7555b35a6a1624f7e04130 (patch)
treee78a74aa7707f3a37117fbd87efdda5fadf4b580
parenta6998ad9b6090d826092a3a8bdff6bbdace4f772 (diff)
php-horde-Horde-Stream-Wrapper: 2.1.0
-rw-r--r--php-horde-Horde-Stream-Wrapper.spec39
1 files changed, 36 insertions, 3 deletions
diff --git a/php-horde-Horde-Stream-Wrapper.spec b/php-horde-Horde-Stream-Wrapper.spec
index 6b6ba86..52e23d6 100644
--- a/php-horde-Horde-Stream-Wrapper.spec
+++ b/php-horde-Horde-Stream-Wrapper.spec
@@ -1,10 +1,20 @@
-%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
-%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+# spec file for php-horde-Horde-Stream-Wrapper
+#
+# Copyright (c) 2012-2014 Nick Bebout, Remi Collet
+#
+# License: MIT
+# https://fedoraproject.org/wiki/Licensing:MIT#Modern_Style_with_sublicense
+#
+# Please, preserve the changelog entries
+#
+%{!?__pear: %global __pear %{_bindir}/pear}
%global pear_name Horde_Stream_Wrapper
%global pear_channel pear.horde.org
+# Disable because of circular dependency with Horde_Test
+%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
Name: php-horde-Horde-Stream-Wrapper
-Version: 2.0.1
+Version: 2.1.0
Release: 1%{?dist}
Summary: Horde Stream wrappers
@@ -15,8 +25,13 @@ Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
+BuildRequires: php(language) >= 5.3.0
BuildRequires: php-pear(PEAR) >= 1.7.0
BuildRequires: php-channel(%{pear_channel})
+%if %{with_tests}
+# To run unit tests
+BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0
+%endif
Requires(post): %{__pear}
Requires(postun): %{__pear}
@@ -55,6 +70,19 @@ mkdir -p %{buildroot}%{pear_xmldir}
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
+%check
+%if %{with_tests}
+src=$(pwd)/%{pear_name}-%{version}
+cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
+phpunit \
+ -d include_path=$src/lib:.:%{pear_phpdir} \
+ -d date.timezone=UTC \
+ .
+%else
+: Tests disabled, use --with tests to enable them
+%endif
+
+
%post
%{__pear} install --nodeps --soft --force --register-only \
%{pear_xmldir}/%{name}.xml >/dev/null || :
@@ -71,9 +99,14 @@ fi
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/Horde
%doc %{pear_docdir}/%{pear_name}
+%{pear_testdir}/%{pear_name}
%changelog
+* Tue Feb 11 2014 Remi Collet <remi@fedoraproject.org> - 2.1.0-1
+- Update to 2.1.0
+- add tests, only run when build --with tests
+
* Thu Nov 22 2012 Remi Collet <RPMS@FamilleCollet.com> - 2.0.1-1
- Update to 2.0.1 for remi repo (no change)