summaryrefslogtreecommitdiffstats
path: root/php-horde-Horde-Lock.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-03-06 12:59:41 +0100
committerRemi Collet <fedora@famillecollet.com>2013-03-06 12:59:41 +0100
commit95dab1fa9ad62f38fc6cece92bf33d38238b69b7 (patch)
treeb11aaa50aeb57b8d53aea4e9b48f4341340f59e5 /php-horde-Horde-Lock.spec
parent18e84613a3e10d658705748e6b3f0d381374da6c (diff)
php-horde-Horde-Lock: 2.0.2
Diffstat (limited to 'php-horde-Horde-Lock.spec')
-rw-r--r--php-horde-Horde-Lock.spec29
1 files changed, 27 insertions, 2 deletions
diff --git a/php-horde-Horde-Lock.spec b/php-horde-Horde-Lock.spec
index b6ae4c0..d71703b 100644
--- a/php-horde-Horde-Lock.spec
+++ b/php-horde-Horde-Lock.spec
@@ -3,9 +3,12 @@
%global pear_name Horde_Lock
%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-Lock
-Version: 2.0.1
-Release: 3%{?dist}
+Version: 2.0.2
+Release: 1%{?dist}
Summary: Horde Resource Locking System
Group: Development/Libraries
@@ -17,6 +20,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
BuildRequires: php-pear(PEAR) >= 1.7.0
BuildRequires: php-channel(%{pear_channel})
+%if %{with_tests}
+BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0
+BuildRequires: php-pear(%{pear_channel}/Horde_Db) >= 2.0.0
+%endif
Requires(post): %{__pear}
Requires(postun): %{__pear}
@@ -65,6 +72,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
+: Test disabled, missing '--with tests' option.
+%endif
+
+
%post
%{__pear} install --nodeps --soft --force --register-only \
%{pear_xmldir}/%{name}.xml >/dev/null || :
@@ -82,9 +102,14 @@ fi
%{pear_phpdir}/Horde/Lock
%{pear_phpdir}/Horde/Lock.php
%{pear_datadir}/%{pear_name}
+%{pear_testdir}/%{pear_name}
%changelog
+* Wed Mar 06 2013 Remi Collet <remi@fedoraproject.org> - 2.0.2-1
+- Update to 2.0.2
+- run test when build with --with tests options
+
* Wed Feb 6 2013 Nick Bebout <nb@fedoraproject.org> - 2.0.1-3
- Update for review