From b0a526fb77414e05ce96c7ad2bebf4600d452f00 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 3 Feb 2022 11:16:02 -0700 Subject: [PATCH] Conditionally build docs to avoid circular dependency on odoc. --- ocaml-ppx-sexp-conv.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ocaml-ppx-sexp-conv.spec b/ocaml-ppx-sexp-conv.spec index 9ca6325..a931306 100644 --- a/ocaml-ppx-sexp-conv.spec +++ b/ocaml-ppx-sexp-conv.spec @@ -2,6 +2,9 @@ %global debug_package %{nil} %endif +# Break a circular dependency on ocaml-odoc +%bcond_with doc + # This package is now a transitive dependency of ocaml-ppx-inline-test, so using # it to test this package creates a circular dependency. %bcond_with tests @@ -21,9 +24,12 @@ BuildRequires: ocaml >= 4.08.0 BuildRequires: ocaml-base-devel >= 0.15 BuildRequires: ocaml-dune >= 2.0.0 BuildRequires: ocaml-ppxlib-devel >= 0.23.0 -BuildRequires: ocaml-odoc BuildRequires: ocaml-sexplib0-devel >= 0.15 +%if %{with doc} +BuildRequires: ocaml-odoc +%endif + %if %{with tests} BuildRequires: ocaml-ppx-inline-test-devel %endif @@ -49,13 +55,17 @@ files for developing applications that use %{name}. %build dune build %{?_smp_mflags} --verbose --profile release +%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 @@ -85,7 +95,9 @@ dune runtest --profile release %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} @@ -104,6 +116,9 @@ dune runtest --profile release %{_libdir}/ocaml/%{upname}/*/*.mli %changelog +* Thu Feb 3 2022 Jerry James - 0.15.0-3 +- Conditionally build docs to avoid circular dependency on odoc + * Thu Jan 20 2022 Fedora Release Engineering - 0.15.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild