From e0bfa8f79d6359c1f4b5c6daccbc7cca7eaa9518 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 1 Mar 2021 17:56:23 +0000 Subject: [PATCH] Make the ocaml-odoc dependency conditional. --- ocaml-ppx-here.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ocaml-ppx-here.spec b/ocaml-ppx-here.spec index fb1fedc..aa7c46e 100644 --- a/ocaml-ppx-here.spec +++ b/ocaml-ppx-here.spec @@ -2,6 +2,10 @@ %global debug_package %{nil} %endif +# Documentation adds a circular dependency, so by +# default we build without. +%bcond_with doc + %global srcname ppx-here %global upname ppx_here @@ -17,7 +21,9 @@ Source0: %{url}/archive/v%{version}/%{upname}-%{version}.tar.gz BuildRequires: ocaml >= 4.04.2 BuildRequires: ocaml-base-devel >= 0.14 BuildRequires: ocaml-dune >= 2.0.0 +%if %{with doc} BuildRequires: ocaml-odoc +%endif BuildRequires: ocaml-ppxlib-devel >= 0.11.0 %description @@ -38,13 +44,17 @@ files for developing applications that use %{name}. %build dune build %{?_smp_mflags} +%if %{with doc} dune build %{?_smp_mflags} @doc +%endif %install dune install --destdir=%{buildroot} +%if %{with doc} # We do not want the dune markers find _build/default/_doc/_html -name .dune-keep -delete +%endif # We do not want the ml files find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete @@ -84,7 +94,9 @@ dune runtest %endif %files devel +%if %{with doc} %doc _build/default/_doc/_html/* +%endif %{_libdir}/ocaml/%{upname}/dune-package %{_libdir}/ocaml/%{upname}/opam %ifarch %{ocaml_native_compiler} @@ -105,6 +117,7 @@ dune runtest %changelog * Mon Mar 1 17:37:09 GMT 2021 Richard W.M. Jones - 0.14.0-8 - OCaml 4.12.0 build +- Make the ocaml-odoc dependency conditional. * Sat Feb 20 2021 Jerry James - 0.14.0-7 - Rebuild for ocaml-base 0.14.1