Make the ocaml-odoc dependency conditional.
This commit is contained in:
parent
47767dfb34
commit
fa5e647f68
|
@ -13,6 +13,10 @@
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Documentation adds a circular dependency, so by
|
||||||
|
# default we build without.
|
||||||
|
%bcond_with doc
|
||||||
|
|
||||||
%global srcname fieldslib
|
%global srcname fieldslib
|
||||||
|
|
||||||
Name: ocaml-%{srcname}
|
Name: ocaml-%{srcname}
|
||||||
|
@ -27,7 +31,9 @@ Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
|
||||||
BuildRequires: ocaml >= 4.04.2
|
BuildRequires: ocaml >= 4.04.2
|
||||||
BuildRequires: ocaml-base-devel >= 0.14
|
BuildRequires: ocaml-base-devel >= 0.14
|
||||||
BuildRequires: ocaml-dune >= 2.0.0
|
BuildRequires: ocaml-dune >= 2.0.0
|
||||||
|
%if %{with doc}
|
||||||
BuildRequires: ocaml-odoc
|
BuildRequires: ocaml-odoc
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains an OCaml syntax extension to define first class
|
This package contains an OCaml syntax extension to define first class
|
||||||
|
@ -48,13 +54,17 @@ developing applications that use %{name}.
|
||||||
|
|
||||||
%build
|
%build
|
||||||
dune build %{?_smp_mflags}
|
dune build %{?_smp_mflags}
|
||||||
|
%if %{with doc}
|
||||||
dune build %{?_smp_mflags} @doc
|
dune build %{?_smp_mflags} @doc
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
dune install --destdir=%{buildroot}
|
dune install --destdir=%{buildroot}
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
# We do not want the dune markers
|
# We do not want the dune markers
|
||||||
find _build/default/_doc/_html -name .dune-keep -delete
|
find _build/default/_doc/_html -name .dune-keep -delete
|
||||||
|
%endif
|
||||||
|
|
||||||
# We do not want the ml files
|
# We do not want the ml files
|
||||||
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
|
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
|
||||||
|
@ -79,7 +89,9 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
%if %{with doc}
|
||||||
%doc _build/default/_doc/_html/*
|
%doc _build/default/_doc/_html/*
|
||||||
|
%endif
|
||||||
%{_libdir}/ocaml/%{srcname}/dune-package
|
%{_libdir}/ocaml/%{srcname}/dune-package
|
||||||
%{_libdir}/ocaml/%{srcname}/opam
|
%{_libdir}/ocaml/%{srcname}/opam
|
||||||
%ifarch %{ocaml_native_compiler}
|
%ifarch %{ocaml_native_compiler}
|
||||||
|
@ -92,6 +104,7 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Mar 1 17:38:49 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.14.0-8
|
* Mon Mar 1 17:38:49 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.14.0-8
|
||||||
- OCaml 4.12.0 build
|
- OCaml 4.12.0 build
|
||||||
|
- Make the ocaml-odoc dependency conditional.
|
||||||
|
|
||||||
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 0.14.0-7
|
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 0.14.0-7
|
||||||
- Bump and rebuild
|
- Bump and rebuild
|
||||||
|
|
Loading…
Reference in New Issue