From 5fb324e06df070cd5834b01060ce2cdce58b728a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 27 Nov 2012 13:02:54 +0000 Subject: [PATCH] Disable the tests on RHEL 7, since they require ocaml-ounit. --- ocaml-fileutils.spec | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/ocaml-fileutils.spec b/ocaml-fileutils.spec index 3cac7d3..e888a74 100644 --- a/ocaml-fileutils.spec +++ b/ocaml-fileutils.spec @@ -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 - 0.4.4-3 +- Disable the tests on RHEL 7, since they require ocaml-ounit. + * Fri Oct 19 2012 Richard W.M. Jones - 0.4.4-2 - New upstream version 0.4.4. - Clean up the spec file.