diff --git a/ocaml-qcheck.spec b/ocaml-qcheck.spec index 86df8a9..6b2be68 100644 --- a/ocaml-qcheck.spec +++ b/ocaml-qcheck.spec @@ -1,6 +1,6 @@ Name: ocaml-qcheck Version: 0.18 -Release: 3%{?dist} +Release: 4%{?dist} Summary: QuickCheck inspired property-based testing for OCaml License: BSD @@ -8,28 +8,99 @@ URL: https://c-cube.github.io/qcheck/ Source0: https://github.com/c-cube/qcheck/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml >= 4.08.0 -BuildRequires: ocaml-astring-devel BuildRequires: ocaml-dune BuildRequires: ocaml-odoc BuildRequires: ocaml-alcotest-devel BuildRequires: ocaml-ounit-devel -BuildRequires: ocaml-uutf-devel +Requires: %{name}-ounit = %{version}-%{release} -%description -This module allows to check invariants (properties of some types) over -randomly generated instances of the type. It provides combinators for -generating instances and printing them. +%global _desc %{expand: +Qcheck enables checking invariants (properties of a type) over randomly +generated instances of the type. It provides combinators for generating +instances and printing them.} + +%description %_desc + +This package is a compatibility wrapper for qcheck. New code should +use either ocaml-qcheck-alcotest or ocaml-qcheck-ounit. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-ounit-devel%{?_isa} = %{version}-%{release} + + +%description devel %_desc + +The %{name}-devel package contains libraries and signature files +for developing applications that use the qcheck compatibility wrapper. +New code should instead use %{name}-alcotest-devel or +%{name}-ounit-devel. + + +%package core +Summary: QuickCheck inspired property-based testing for OCaml + + +%description core %_desc +This package provides alcotest support for qcheck. + + +%package core-devel +Summary: Development files for %{name}-core +Requires: %{name}-core%{?_isa} = %{version}-%{release} + + +%description core-devel %_desc + +The %{name}-core-devel package contains libraries and signature +files for developing applications that use %{name}-core. + + +%package ounit +Summary: OUnit support for %{name} +Requires: %{name}-core%{?_isa} = %{version}-%{release} + + +%description ounit %_desc + +This package provides ounit support for qcheck. + + +%package ounit-devel +Summary: Development files for %{name}-ounit +Requires: %{name}-ounit%{?_isa} = %{version}-%{release} +Requires: %{name}-core-devel%{?_isa} = %{version}-%{release} + + +%description ounit-devel %_desc + +The %{name}-ounit-devel package contains libraries and signature +files for developing applications that use %{name}-ounit. + + +%package alcotest +Summary: Alcotest support for %{name} +Requires: %{name}-core%{?_isa} = %{version}-%{release} + + +%description alcotest %_desc + +This package provides alcotest support for qcheck. + + +%package alcotest-devel +Summary: Development files for %{name}-alcotest +Requires: %{name}-alcotest%{?_isa} = %{version}-%{release} +Requires: %{name}-core-devel%{?_isa} = %{version}-%{release} -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. +%description alcotest-devel %_desc + +The %{name}-alcotest-devel package contains libraries and signature +files for developing applications that use %{name}-alcotest. %package doc @@ -68,14 +139,11 @@ dune runtest --no-buffer --profile release %doc README.adoc CHANGELOG.md %license LICENSE %dir %{_libdir}/ocaml/qcheck/ -%dir %{_libdir}/ocaml/qcheck-alcotest/ -%dir %{_libdir}/ocaml/qcheck-core/ -%dir %{_libdir}/ocaml/qcheck-ounit/ -%{_libdir}/ocaml/*/META -%{_libdir}/ocaml/*/{,*/}*.cma -%{_libdir}/ocaml/*/{,*/}*.cmi +%{_libdir}/ocaml/qcheck/META +%{_libdir}/ocaml/qcheck/*.cma +%{_libdir}/ocaml/qcheck/*.cmi %ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/*/{,*/}*.cmxs +%{_libdir}/ocaml/qcheck/*.cmxs %endif @@ -83,18 +151,95 @@ dune runtest --no-buffer --profile release %doc README.adoc CHANGELOG.md %license LICENSE %ifarch %{ocaml_native_compiler} -%{_libdir}/ocaml/*/{,*/}*.a -%{_libdir}/ocaml/*/{,*/}*.cmxa -%{_libdir}/ocaml/*/{,*/}*.cmx +%{_libdir}/ocaml/qcheck/*.a +%{_libdir}/ocaml/qcheck/*.cmxa +%{_libdir}/ocaml/qcheck/*.cmx +%endif +%{_libdir}/ocaml/qcheck/*.ml +%{_libdir}/ocaml/qcheck/*.cma +%{_libdir}/ocaml/qcheck/*.cmi +%{_libdir}/ocaml/qcheck/*.cmt +%{_libdir}/ocaml/qcheck/dune-package +%{_libdir}/ocaml/qcheck/opam + + +%files core +%dir %{_libdir}/ocaml/qcheck-core/ +%dir %{_libdir}/ocaml/qcheck-core/runner/ +%{_libdir}/ocaml/qcheck-core/META +%{_libdir}/ocaml/qcheck-core/{*/,}*.cma +%{_libdir}/ocaml/qcheck-core/{*/,}*.cmi +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/qcheck-core/{*/,}*.cmxs +%endif + + +%files core-devel +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/qcheck-core/{*/,}*.a +%{_libdir}/ocaml/qcheck-core/{*/,}*.cmxa +%{_libdir}/ocaml/qcheck-core/{*/,}*.cmx +%endif +%{_libdir}/ocaml/qcheck-core/{*/,}*.ml +%{_libdir}/ocaml/qcheck-core/{*/,}*.mli +%{_libdir}/ocaml/qcheck-core/{*/,}*.cma +%{_libdir}/ocaml/qcheck-core/{*/,}*.cmi +%{_libdir}/ocaml/qcheck-core/{*/,}*.cmt +%{_libdir}/ocaml/qcheck-core/{*/,}*.cmti +%{_libdir}/ocaml/qcheck-core/dune-package +%{_libdir}/ocaml/qcheck-core/opam + + +%files ounit +%dir %{_libdir}/ocaml/qcheck-ounit/ +%{_libdir}/ocaml/qcheck-ounit/META +%{_libdir}/ocaml/qcheck-ounit/*.cma +%{_libdir}/ocaml/qcheck-ounit/*.cmi +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/qcheck-ounit/*.cmxs +%endif + + +%files ounit-devel +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/qcheck-ounit/*.a +%{_libdir}/ocaml/qcheck-ounit/*.cmxa +%{_libdir}/ocaml/qcheck-ounit/*.cmx +%endif +%{_libdir}/ocaml/qcheck-ounit/*.ml +%{_libdir}/ocaml/qcheck-ounit/*.mli +%{_libdir}/ocaml/qcheck-ounit/*.cma +%{_libdir}/ocaml/qcheck-ounit/*.cmi +%{_libdir}/ocaml/qcheck-ounit/*.cmt +%{_libdir}/ocaml/qcheck-ounit/*.cmti +%{_libdir}/ocaml/qcheck-ounit/dune-package +%{_libdir}/ocaml/qcheck-ounit/opam + + +%files alcotest +%dir %{_libdir}/ocaml/qcheck-alcotest/ +%{_libdir}/ocaml/qcheck-alcotest/META +%{_libdir}/ocaml/qcheck-alcotest/*.cma +%{_libdir}/ocaml/qcheck-alcotest/*.cmi +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/qcheck-alcotest/*.cmxs +%endif + + +%files alcotest-devel +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/qcheck-alcotest/*.a +%{_libdir}/ocaml/qcheck-alcotest/*.cmxa +%{_libdir}/ocaml/qcheck-alcotest/*.cmx %endif -%{_libdir}/ocaml/*/{,*/}*.ml -%{_libdir}/ocaml/*/{,*/}*.mli -%{_libdir}/ocaml/*/{,*/}*.cma -%{_libdir}/ocaml/*/{,*/}*.cmi -%{_libdir}/ocaml/*/{,*/}*.cmt -%{_libdir}/ocaml/*/{,*/}*.cmti -%{_libdir}/ocaml/*/dune-package -%{_libdir}/ocaml/*/opam +%{_libdir}/ocaml/qcheck-alcotest/*.ml +%{_libdir}/ocaml/qcheck-alcotest/*.mli +%{_libdir}/ocaml/qcheck-alcotest/*.cma +%{_libdir}/ocaml/qcheck-alcotest/*.cmi +%{_libdir}/ocaml/qcheck-alcotest/*.cmt +%{_libdir}/ocaml/qcheck-alcotest/*.cmti +%{_libdir}/ocaml/qcheck-alcotest/dune-package +%{_libdir}/ocaml/qcheck-alcotest/opam %files doc @@ -105,6 +250,10 @@ dune runtest --no-buffer --profile release %changelog +* Tue Oct 12 2021 Jerry James - 0.18-4 +- Rebuild for alcotest 1.5.0 +- Split into subpackages to manage dependencies + * Tue Oct 05 2021 Richard W.M. Jones - 0.18-3 - OCaml 4.13.1 build