There is no circular dependency, so always builds docs.

This commit is contained in:
Jerry James 2021-07-19 14:44:25 -06:00
parent fa5e647f68
commit 6f684f3b76
1 changed files with 3 additions and 15 deletions

View File

@ -13,10 +13,6 @@
%global debug_package %{nil}
%endif
# Documentation adds a circular dependency, so by
# default we build without.
%bcond_with doc
%global srcname fieldslib
Name: ocaml-%{srcname}
@ -31,9 +27,7 @@ Source0: %{url}/archive/v%{version}/%{srcname}-%{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
%description
This package contains an OCaml syntax extension to define first class
@ -54,9 +48,7 @@ developing applications that use %{name}.
%build
dune build %{?_smp_mflags}
%if %{with doc}
dune build %{?_smp_mflags} @doc
%endif
%install
dune install --destdir=%{buildroot}
@ -72,11 +64,6 @@ find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc
%ifarch %{ocaml_native_compiler}
# Add missing executable bits
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
%endif
%files
%doc CHANGES.md
%license LICENSE.md
@ -89,9 +76,7 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
%endif
%files devel
%if %{with doc}
%doc _build/default/_doc/_html/*
%endif
%{_libdir}/ocaml/%{srcname}/dune-package
%{_libdir}/ocaml/%{srcname}/opam
%ifarch %{ocaml_native_compiler}
@ -102,6 +87,9 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
%{_libdir}/ocaml/%{srcname}/*.cmt
%changelog
* Mon Jul 19 2021 Jerry James <loganjerry@gmail.com> - 0.14.0-8
- There is no circular dependency, so always builds docs
* Mon Mar 1 17:38:49 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.14.0-8
- OCaml 4.12.0 build
- Make the ocaml-odoc dependency conditional.