Make -docs subpackage conditional.
This commit is contained in:
parent
59583ef063
commit
f824bd9143
|
@ -2,6 +2,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 mew-vi
|
%global srcname mew-vi
|
||||||
%global upname mew_vi
|
%global upname mew_vi
|
||||||
|
|
||||||
|
@ -17,7 +21,9 @@ Source0: %{url}/archive/%{version}/%{upname}-%{version}.tar.gz
|
||||||
BuildRequires: ocaml >= 4.02.3
|
BuildRequires: ocaml >= 4.02.3
|
||||||
BuildRequires: ocaml-dune >= 1.1.0
|
BuildRequires: ocaml-dune >= 1.1.0
|
||||||
BuildRequires: ocaml-mew-devel >= 0.1.0
|
BuildRequires: ocaml-mew-devel >= 0.1.0
|
||||||
|
%if %{with doc}
|
||||||
BuildRequires: ocaml-odoc
|
BuildRequires: ocaml-odoc
|
||||||
|
%endif
|
||||||
BuildRequires: ocaml-react-devel
|
BuildRequires: ocaml-react-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
@ -36,25 +42,31 @@ Requires: ocaml-react-devel%{?_isa}
|
||||||
The %{name}-devel package contains libraries and signature
|
The %{name}-devel package contains libraries and signature
|
||||||
files for developing applications that use %{name}.
|
files for developing applications that use %{name}.
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
%package docs
|
%package docs
|
||||||
Summary: Documentation for %{name}
|
Summary: Documentation for %{name}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description docs
|
%description docs
|
||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{upname}-%{version}
|
%autosetup -n %{upname}-%{version}
|
||||||
|
|
||||||
%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
|
||||||
|
@ -93,13 +105,16 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
|
||||||
%endif
|
%endif
|
||||||
%{_libdir}/ocaml/%{upname}/%{upname}*.cmt
|
%{_libdir}/ocaml/%{upname}/%{upname}*.cmt
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
%files docs
|
%files docs
|
||||||
%doc _build/default/_doc/*
|
%doc _build/default/_doc/*
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Mar 1 16:58:00 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-8
|
* Mon Mar 1 16:58:00 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-8
|
||||||
- OCaml 4.12.0 build
|
- OCaml 4.12.0 build
|
||||||
|
- Make -docs subpackage conditional.
|
||||||
|
|
||||||
* Tue Feb 2 2021 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-7
|
* Tue Feb 2 2021 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-7
|
||||||
- Bump and rebuild for updated ocaml-camomile dep (RHBZ#1923853).
|
- Bump and rebuild for updated ocaml-camomile dep (RHBZ#1923853).
|
||||||
|
|
Loading…
Reference in New Issue