Blame ocaml-alcotest.spec

4a5b482
# BOOTSTRAP NOTE: We currently build only the base alcotest package.  We cannot
4a5b482
# yet build the async and lwt subpackages, because of missing dependencies.
4a5b482
# Some of those dependencies require the base alcotest package, either directly
4a5b482
# or indirectly.  Therefore, we will only be able to build the other two in
4a5b482
# non-bootstrap mode.
4a5b482
4a5b482
%ifnarch %{ocaml_native_compiler}
4a5b482
%global debug_package %{nil}
4a5b482
%endif
4a5b482
4a5b482
%global srcname alcotest
4a5b482
4a5b482
Name:           ocaml-%{srcname}
df8e3c2
Version:        1.2.3
df8e3c2
Release:        1%{?dist}
4a5b482
Summary:        Lightweight and colorful test framework for OCaml
4a5b482
4a5b482
License:        ISC
4a5b482
URL:            https://github.com/mirage/alcotest
35b9211
Source0:        %{URL}/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
bf2004c
# We neither need nor want the stdlib-shims package in Fedora.  It is a forward
bf2004c
# compatibility package for older OCaml installations.  Patch it out instead.
bf2004c
# Upstream does not want this patch until stdlib-shims is obsolete.
35b9211
Patch0:         0001-Drop-the-stdlib-shims-subpackage.patch
4a5b482
bf2004c
BuildRequires:  ocaml >= 4.03.0
4a5b482
BuildRequires:  ocaml-astring-devel
4a5b482
BuildRequires:  ocaml-cmdliner-devel
35b9211
BuildRequires:  ocaml-dune >= 2.0
4a5b482
BuildRequires:  ocaml-findlib
f6cae5d
BuildRequires:  ocaml-fmt-devel >= 0.8.7
bf2004c
BuildRequires:  ocaml-re-devel
4a5b482
BuildRequires:  ocaml-uuidm-devel
f6cae5d
BuildRequires:  ocaml-uutf-devel
4a5b482
4a5b482
%description
4a5b482
Alcotest is a lightweight and colorful test framework.
4a5b482
4a5b482
Alcotest exposes a simple interface to perform unit tests, including a
4a5b482
simple `TESTABLE` module type, a `check` function to assert test
4a5b482
predicates, and a `run` function to perform a list of `unit -> unit`
4a5b482
test callbacks.
4a5b482
4a5b482
Alcotest provides quiet and colorful output where only faulty runs are
4a5b482
fully displayed at the end of the run (with the full logs ready to
4a5b482
inspect), with a simple (yet expressive) query language to select the
4a5b482
tests to run.
4a5b482
4a5b482
%package        devel
4a5b482
Summary:        Development files for %{name}
4a5b482
Requires:       %{name}%{?_isa} = %{version}-%{release}
4a5b482
Requires:       ocaml-cmdliner-devel%{?_isa}
4a5b482
Requires:       ocaml-fmt-devel%{?_isa}
bf2004c
Requires:       ocaml-re-devel%{?_isa}
98f8571
Requires:       ocaml-uuidm-devel%{?_isa}
4a5b482
4a5b482
%description    devel
4a5b482
The %{name}-devel package contains libraries and signature files for
4a5b482
developing applications that use %{name}.
4a5b482
4a5b482
%prep
bf2004c
%autosetup -n %{srcname}-%{version} -p1
4a5b482
4a5b482
%build
4a5b482
# For non-bootstrap builds, omit the "-p alcotest", and also run:
bb775f1
#   dune build %{?_smp_mflags} @doc
4a5b482
# to generate the documentation.
bb775f1
dune build %{?_smp_mflags} -p alcotest
4a5b482
4a5b482
%install
4a5b482
# For non-bootstrap builds, omit the "alcotest" on the end.
4a5b482
dune install --destdir=%{buildroot} alcotest
4a5b482
4a5b482
# We install the documentation with the doc macro
4a5b482
rm -fr %{buildroot}%{_prefix}/doc
4a5b482
8953237
# We do not want the ml files
8953237
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
8953237
4a5b482
%ifarch %{ocaml_native_compiler}
4a5b482
# Add missing executable bits
4a5b482
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
4a5b482
%endif
4a5b482
4a5b482
%check
1c7ad92
dune runtest -j 1 -p alcotest
4a5b482
4a5b482
%files
4a5b482
%doc CHANGES.md README.md
4a5b482
%license LICENSE.md
4a5b482
%dir %{_libdir}/ocaml/%{srcname}/
4a5b482
%{_libdir}/ocaml/%{srcname}/META
4a5b482
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cma
4a5b482
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmi
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/%{srcname}_engine*.cma
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/%{srcname}_engine*.cmi
4a5b482
%ifarch %{ocaml_native_compiler}
4a5b482
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/%{srcname}_engine*.cmxs
4a5b482
%endif
4a5b482
4a5b482
%files devel
4a5b482
%{_libdir}/ocaml/%{srcname}/dune-package
4a5b482
%{_libdir}/ocaml/%{srcname}/opam
4a5b482
%ifarch %{ocaml_native_compiler}
4a5b482
%{_libdir}/ocaml/%{srcname}/%{srcname}*.a
4a5b482
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmx
4a5b482
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxa
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/%{srcname}_engine*.a
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/%{srcname}_engine*.cmx
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/%{srcname}_engine*.cmxa
4a5b482
%endif
4a5b482
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt
4a5b482
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti
bf2004c
%{_libdir}/ocaml/%{srcname}/*.mli
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/%{srcname}_engine*.cmt
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/%{srcname}_engine*.cmti
f6cae5d
%{_libdir}/ocaml/%{srcname}/engine/*.mli
4a5b482
4a5b482
%changelog
df8e3c2
* Sun Sep 13 2020 Dan Čermák <dan.cermak@cgc-instruments.com> - 1.2.3-1
df8e3c2
- New upstream release 1.2.3 (rhbz#1876739)
df8e3c2
2ca47cb
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2.2-2
2ca47cb
- OCaml 4.11.1 rebuild
2ca47cb
d53e424
* Wed Aug 26 2020 Dan Čermák <dan.cermak@cgc-instruments.com> - 1.2.2-1
d53e424
- New upstream release 1.2.2 (rhbz#1872839)
d53e424
578fd2f
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.2.1-4
578fd2f
- OCaml 4.11.0 rebuild
578fd2f
5d345e0
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
5d345e0
- Second attempt - Rebuilt for
5d345e0
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5d345e0
10247f0
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-2
10247f0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
10247f0
f6cae5d
* Wed Jul 22 2020 Dan Čermák <dan.cermak@cgc-instruments.com> - 1.2.1-1
f6cae5d
- New upstream release 1.2.1 (rhbz#1856364)
f6cae5d
98f8571
* Fri Jun 19 2020 Jerry James <loganjerry@gmail.com> - 1.1.0-4
98f8571
- Rebuild for ocaml-astring 0.8.4
98f8571
c252511
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 1.1.0-3
c252511
- OCaml 4.11.0+dev2-2020-04-22 rebuild
c252511
a9e5c3c
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.1.0-2
a9e5c3c
- OCaml 4.11.0 pre-release attempt 2
a9e5c3c
35b9211
* Sat Apr  4 2020 Dan Čermák <dan.cermak@cgc-instruments.com> - 1.1.0-1
35b9211
- New upstream release 1.1.0
35b9211
- Rebase ocaml-alcotest-stdlib-shims.patch as 0001-Drop-the-stdlib-shims-subpackage.patch
35b9211
54995cd
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-3
54995cd
- Update all OCaml dependencies for RPM 4.16.
54995cd
c033587
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-2
c033587
- OCaml 4.10.0 final.
c033587
8953237
* Wed Feb 12 2020 Jerry James <loganjerry@gmail.com> - 1.0.1-1
8953237
- Version 1.0.1
8953237
5e72ca5
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
5e72ca5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
5e72ca5
ae58e0e
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.0.0-2
ae58e0e
- OCaml 4.10.0+beta1 rebuild.
ae58e0e
bf2004c
* Tue Jan 14 2020 Jerry James <loganjerry@gmail.com> - 1.0.0-1
bf2004c
- Version 1.0.0
bf2004c
4a5b482
* Thu Jan  9 2020 Jerry James <loganjerry@gmail.com> - 0.8.5-1
4a5b482
- Initial RPM