diff --git a/ocaml-ounit.spec b/ocaml-ounit.spec index cabeacf..1a4d82e 100644 --- a/ocaml-ounit.spec +++ b/ocaml-ounit.spec @@ -4,6 +4,8 @@ %global srcname ounit +%bcond_with lwt + Name: ocaml-%{srcname} Version: 2.2.2 Release: 2%{?dist} @@ -20,7 +22,9 @@ Patch0: %{name}-stdlib-shims.patch BuildRequires: ocaml >= 4.02.3 BuildRequires: ocaml-dune >= 1.11.0 BuildRequires: ocaml-findlib +%if %{with lwt} BuildRequires: ocaml-lwt-devel +%endif BuildRequires: ocaml-mmap-devel BuildRequires: ocaml-ocplib-endian-devel BuildRequires: ocaml-odoc @@ -47,6 +51,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. +%if %{with lwt} %package lwt Summary: Helper functions for building Lwt tests using OUnit Requires: %{name} = %{version}-%{release} @@ -69,6 +74,7 @@ Provides: %{name}2-lwt-devel = %{version}-%{release} %description lwt-devel The %{name}-lwt-devel package contains libraries and signature files for developing applications that use %{name}-lwt. +%endif %package doc @@ -151,6 +157,7 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+ %{_libdir}/ocaml/%{srcname}2/*/*.mli +%if %{with lwt} %files lwt %dir %{_libdir}/ocaml/%{srcname}-lwt/ %dir %{_libdir}/ocaml/%{srcname}2-lwt/ @@ -175,6 +182,7 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+ %endif %{_libdir}/ocaml/%{srcname}2-lwt/oUnitLwt.cmt %{_libdir}/ocaml/%{srcname}2-lwt/oUnitLwt.ml +%endif %files doc @@ -187,6 +195,7 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+ %changelog * Wed Feb 26 2020 Richard W.M. Jones - 2.2.2-2 - OCaml 4.10.0 final. +- Make lwt subpackage conditional. * Fri Feb 7 2020 Jerry James - 2.2.2-1 - New upstream version 2.2.2