Make the -doc subpackage conditional.
This commit is contained in:
parent
873bc81e8b
commit
f1a8154bae
@ -2,6 +2,10 @@
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
# Documentation adds a circular dependency, so by
|
||||
# default we build without.
|
||||
%bcond_with doc
|
||||
|
||||
%global srcname ppx-tools
|
||||
%global upname ppx_tools
|
||||
|
||||
@ -17,7 +21,9 @@ Source0: %{url}/archive/%{version}/%{upname}-%{version}.tar.gz
|
||||
BuildRequires: ocaml >= 4.08.0
|
||||
BuildRequires: ocaml-cppo
|
||||
BuildRequires: ocaml-dune >= 1.6
|
||||
%if %{with doc}
|
||||
BuildRequires: ocaml-odoc
|
||||
%endif
|
||||
|
||||
%description
|
||||
Tools for authors of syntactic tools (such as ppx rewriters).
|
||||
@ -30,25 +36,31 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
The %{name}-devel package contains libraries and signature files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
%if %{with doc}
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n %{upname}-%{version}
|
||||
|
||||
%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
|
||||
@ -101,15 +113,18 @@ dune runtest
|
||||
%{_libdir}/ocaml/%{upname}/*.mli
|
||||
%{_libdir}/ocaml/%{upname}/*/*.cmt
|
||||
|
||||
%if %{with doc}
|
||||
%files doc
|
||||
%doc _build/default/_doc/_html/
|
||||
%doc _build/default/_doc/_mlds/
|
||||
%doc _build/default/_doc/_odoc/
|
||||
%license LICENSE
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Mar 1 12:17:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 6.3-4
|
||||
- OCaml 4.12.0 build
|
||||
- Make the -doc subpackage conditional.
|
||||
|
||||
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 6.3-3
|
||||
- Bump and rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user