Disable the tests on RHEL 7, since they require ocaml-ounit.

This commit is contained in:
Richard W.M. Jones 2012-11-27 13:02:54 +00:00
parent 8e79fbbc18
commit 5fb324e06d
1 changed files with 16 additions and 3 deletions

View File

@ -3,7 +3,7 @@
Name: ocaml-fileutils
Version: 0.4.4
Release: 2%{?dist}
Release: 3%{?dist}
Summary: OCaml library for common file and filename operations
License: LGPLv2 with exceptions
@ -15,7 +15,9 @@ BuildRequires: ocaml
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-camlp4-devel
%if 0%{?fedora} || 0%{?rhel} <= 6
BuildRequires: ocaml-ounit-devel
%endif
%description
@ -41,8 +43,16 @@ developing applications that use %{name}.
%prep
%setup -q
# configure macro doesn't work with this build system.
./configure
# Disable the tests (RHEL 7 only) since they require ocaml-ounit.
%if 0%{?rhel} >= 7
rm test/test.ml
touch test/test.ml
mv setup.ml setup.ml.old
sed '/oUnit/d' < setup.ml.old > setup.ml
%endif
ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT
%build
@ -87,6 +97,9 @@ make test
%changelog
* Tue Nov 27 2012 Richard W.M. Jones <rjones@redhat.com> - 0.4.4-3
- Disable the tests on RHEL 7, since they require ocaml-ounit.
* Fri Oct 19 2012 Richard W.M. Jones <rjones@redhat.com> - 0.4.4-2
- New upstream version 0.4.4.
- Clean up the spec file.