From 4a5b482ac41fff91a1ebc55dedc8be7fd2776633 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 14 Jan 2020 08:03:35 -0700 Subject: [PATCH] Initial import. --- .gitignore | 1 + ocaml-alcotest.spec | 105 ++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 107 insertions(+) create mode 100644 .gitignore create mode 100644 ocaml-alcotest.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0744187 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/alcotest-*.tbz diff --git a/ocaml-alcotest.spec b/ocaml-alcotest.spec new file mode 100644 index 0000000..526d7b3 --- /dev/null +++ b/ocaml-alcotest.spec @@ -0,0 +1,105 @@ +# BOOTSTRAP NOTE: We currently build only the base alcotest package. We cannot +# yet build the async and lwt subpackages, because of missing dependencies. +# Some of those dependencies require the base alcotest package, either directly +# or indirectly. Therefore, we will only be able to build the other two in +# non-bootstrap mode. + +%ifnarch %{ocaml_native_compiler} +%global debug_package %{nil} +%endif + +%global srcname alcotest + +Name: ocaml-%{srcname} +Version: 0.8.5 +Release: 1%{?dist} +Summary: Lightweight and colorful test framework for OCaml + +License: ISC +URL: https://github.com/mirage/alcotest +Source0: %{url}/releases/download/%{version}/%{srcname}-%{version}.tbz + +BuildRequires: ocaml >= 4.02.3 +BuildRequires: ocaml-astring-devel +BuildRequires: ocaml-cmdliner-devel +BuildRequires: ocaml-dune >= 1.1.0 +BuildRequires: ocaml-findlib +BuildRequires: ocaml-fmt-devel >= 0.8.0 +BuildRequires: ocaml-result-devel +BuildRequires: ocaml-uuidm-devel + +%description +Alcotest is a lightweight and colorful test framework. + +Alcotest exposes a simple interface to perform unit tests, including a +simple `TESTABLE` module type, a `check` function to assert test +predicates, and a `run` function to perform a list of `unit -> unit` +test callbacks. + +Alcotest provides quiet and colorful output where only faulty runs are +fully displayed at the end of the run (with the full logs ready to +inspect), with a simple (yet expressive) query language to select the +tests to run. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: ocaml-cmdliner-devel%{?_isa} +Requires: ocaml-fmt-devel%{?_isa} +Requires: ocaml-result-devel%{?_isa} + +%description devel +The %{name}-devel package contains libraries and signature files for +developing applications that use %{name}. + +%prep +%autosetup -n %{srcname}-%{version} + +%build +# For non-bootstrap builds, omit the "-p alcotest", and also run: +# dune build -p alcotest @doc +# to generate the documentation. +dune build -p alcotest + +%install +# For non-bootstrap builds, omit the "alcotest" on the end. +dune install --destdir=%{buildroot} alcotest + +# We install the documentation with the doc macro +rm -fr %{buildroot}%{_prefix}/doc + +%ifarch %{ocaml_native_compiler} +# Add missing executable bits +find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+ +%endif + +%check +dune runtest -p alcotest + +%files +%doc CHANGES.md README.md +%license LICENSE.md +%dir %{_libdir}/ocaml/%{srcname}/ +%{_libdir}/ocaml/%{srcname}/META +%{_libdir}/ocaml/%{srcname}/%{srcname}*.cma +%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmi +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs +%endif + +%files devel +%{_libdir}/ocaml/%{srcname}/dune-package +%{_libdir}/ocaml/%{srcname}/opam +%ifarch %{ocaml_native_compiler} +%{_libdir}/ocaml/%{srcname}/%{srcname}*.a +%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmx +%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxa +%endif +%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt +%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti +%{_libdir}/ocaml/%{srcname}/%{srcname}*.ml +%{_libdir}/ocaml/%{srcname}/%{srcname}*.mli + +%changelog +* Thu Jan 9 2020 Jerry James - 0.8.5-1 +- Initial RPM diff --git a/sources b/sources new file mode 100644 index 0000000..e17a3a1 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (alcotest-0.8.5.tbz) = 2d4aaec0a382fb4a883b3dc127e5a62272ecc721f6a1cc0bfe3aebba8bf76efc4bce2e097b2043a8b4b618323162f18d34b610ea8c12787c15210724a7523fa3