summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-11-02 20:10:39 +0100
committerRemi Collet <fedora@famillecollet.com>2012-11-02 20:10:39 +0100
commit19e34138721b2f565a1585694d64b43852bd46a2 (patch)
tree18bf3a12ed990a6db05c885ed95feef51a47a2f0
parenta387d2c7c7b699905808f6ce72b6d51c3d070391 (diff)
php-horde-Horde-Mail: make test optionnal (circular dependency with Horde_Mime)
-rw-r--r--php-horde-Horde-Mail.spec15
1 files changed, 12 insertions, 3 deletions
diff --git a/php-horde-Horde-Mail.spec b/php-horde-Horde-Mail.spec
index 5a4a914..e1c26bc 100644
--- a/php-horde-Horde-Mail.spec
+++ b/php-horde-Horde-Mail.spec
@@ -3,6 +3,9 @@
%global pear_name Horde_Mail
%global pear_channel pear.horde.org
+# Can run test because of circular dependency with Horde_Mime
+%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
+
Name: php-horde-Horde-Mail
Version: 2.0.0
Release: 1%{?dist}
@@ -12,13 +15,17 @@ Group: Development/Libraries
License: BSD
URL: http://pear.horde.org
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+# /usr/lib/rpm/find-lang.sh from fedora 16
+Source1: find-lang.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
BuildRequires: php-pear
BuildRequires: php-channel(%{pear_channel})
+%if %{with_tests}
# To run unit tests
BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.0.0
+%endif
Requires(post): %{__pear}
Requires(postun): %{__pear}
@@ -75,9 +82,12 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
%check
+%if %{with_tests}
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
-# Ignore test results for now ( > vs /> )
-phpunit AllTests.php || exit 0
+phpunit AllTests.php
+%else
+: Test disabled, missing '--with tests' option.
+%endif
%post
@@ -96,7 +106,6 @@ fi
%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/Horde/Mail
-%{pear_phpdir}/Horde/Mail.php
%{pear_testdir}/%{pear_name}