Conditionally build docs to avoid circular dependency on odoc.
This commit is contained in:
parent
f6455462ed
commit
7a6699f2ae
@ -2,6 +2,9 @@
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
# Break a circular dependency on ocaml-odoc
|
||||
%bcond_with doc
|
||||
|
||||
%global srcname ppx-hash
|
||||
%global upname ppx_hash
|
||||
|
||||
@ -20,7 +23,10 @@ BuildRequires: ocaml-dune >= 2.0.0
|
||||
BuildRequires: ocaml-ppx-compare-devel >= 0.15
|
||||
BuildRequires: ocaml-ppx-sexp-conv-devel >= 0.15
|
||||
BuildRequires: ocaml-ppxlib-devel >= 0.23.0
|
||||
|
||||
%if %{with doc}
|
||||
BuildRequires: ocaml-odoc
|
||||
%endif
|
||||
|
||||
%description
|
||||
Ppx_hash is a ppx rewriter that generates hash functions from type
|
||||
@ -42,13 +48,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
|
||||
@ -76,7 +86,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}
|
||||
@ -95,6 +107,9 @@ dune runtest --profile release
|
||||
%{_libdir}/ocaml/%{upname}/*/*.mli
|
||||
|
||||
%changelog
|
||||
* Thu Feb 3 2022 Jerry James <loganjerry@gmail.com> - 0.15.0-3
|
||||
- Conditionally build docs to avoid circular dependency on odoc
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user