Make the ocaml-odoc dependency conditional.
This commit is contained in:
parent
47767dfb34
commit
fa5e647f68
|
@ -13,6 +13,10 @@
|
|||
%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}
|
||||
|
@ -27,7 +31,9 @@ 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
|
||||
|
@ -48,13 +54,17 @@ 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
|
||||
|
@ -79,7 +89,9 @@ 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}
|
||||
|
@ -92,6 +104,7 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
|
|||
%changelog
|
||||
* 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.
|
||||
|
||||
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 0.14.0-7
|
||||
- Bump and rebuild
|
||||
|
|
Loading…
Reference in New Issue