Sophie

Sophie

distrib > Mageia > 9 > armv7hl > by-pkgid > d508c0d83b7daeb161b7d6a3394af29c > files > 3

ocaml-alcotest-1.6.0-1.mga9.src.rpm

# 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.

%global srcname alcotest

Name:           ocaml-%{srcname}
Version:        1.6.0
Release:        %mkrel 1
Summary:        Lightweight and colorful test framework for OCaml
Group:          Development/OCaml

License:        ISC
URL:            https://github.com/mirage/alcotest
Source0:        %{URL}/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
# We neither need nor want the stdlib-shims or ocaml-syntax-shims packages in
# Fedora.  They are forward compatibility packages for older OCaml
# installations.  Patch them out instead.  Upstream does not want this patch
# until stdlib-shims and ocaml-syntax-shims are obsolete.
Patch0:         0001-Drop-the-stdlib-shims-subpackage.patch

BuildRequires:  ocaml >= 4.03.0
BuildRequires:  ocaml-astring-devel
BuildRequires:  ocaml-cmdliner-devel >= 1.0.0
BuildRequires:  ocaml-dune >= 2.8
BuildRequires:  ocaml-findlib
BuildRequires:  ocaml-fmt-devel >= 0.8.7
BuildRequires:  ocaml-re-devel
BuildRequires:  ocaml-uuidm-devel
BuildRequires:  ocaml-uutf-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-astring-devel%{?_isa}
Requires:       ocaml-cmdliner-devel%{?_isa}
Requires:       ocaml-fmt-devel%{?_isa}
Requires:       ocaml-re-devel%{?_isa}
Requires:       ocaml-uutf-devel%{?_isa}

%description    devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.

%prep
%autosetup -n %{srcname}-%{version} -p1

%build
# For non-bootstrap builds, omit the "-p alcotest", and also run:
#   dune build %{?_smp_mflags} @doc
# to generate the documentation.
dune build %{?_smp_mflags} -p alcotest

# Relink the stublibs with $RPM_LD_FLAGS.
cd _build/default/src
ocamlmklib -g -ldopt '%{build_ldflags}' -o alcotest_stubs \
  $(ar t libalcotest_stubs.a)
cd -

%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

# We do not want the ml files
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete

%check
dune runtest -j 1 -p alcotest

%files
%doc CHANGES.md README.md alcotest-help.txt
%license LICENSE.md
%dir %{_libdir}/ocaml/%{srcname}/
%dir %{_libdir}/ocaml/%{srcname}/engine/
%dir %{_libdir}/ocaml/%{srcname}/stdlib_ext/
%{_libdir}/ocaml/%{srcname}/META
%{_libdir}/ocaml/%{srcname}/runtime.js
%{_libdir}/ocaml/%{srcname}/{*/,}*.cma
%{_libdir}/ocaml/%{srcname}/{*/,}*.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/{*/,}*.cmxs
%endif
%{_libdir}/ocaml/stublibs/dllalcotest_stubs.so

%files devel
%{_libdir}/ocaml/%{srcname}/dune-package
%{_libdir}/ocaml/%{srcname}/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/{*/,}*.a
%{_libdir}/ocaml/%{srcname}/{*/,}*.cmx
%{_libdir}/ocaml/%{srcname}/{*/,}*.cmxa
%endif
%{_libdir}/ocaml/%{srcname}/{*/,}*.cmt
%{_libdir}/ocaml/%{srcname}/{*/,}*.cmti
%{_libdir}/ocaml/%{srcname}/{*/,}*.mli



%changelog
* Sat Oct 08 2022 pterjan <pterjan> 1.6.0-1.mga9
+ Revision: 1895583
- Update to 1.6.0

* Thu May 19 2022 pterjan <pterjan> 1.5.0-3.mga9
+ Revision: 1859202
- Rebuild for OCaml 4.14

* Wed May 18 2022 pterjan <pterjan> 1.5.0-2.mga9
+ Revision: 1858602
- Rebuild for new ocaml-uutf

* Wed Oct 13 2021 tv <tv> 1.5.0-1.mga9
+ Revision: 1751105
- Version 1.5.0
- OCaml 4.13.1 build

* Sat Mar 06 2021 tv <tv> 1.3.0-3.mga9
+ Revision: 1699927
- 1.3.0
- rebuild for ocaml-4.2-12

* Sun Jan 10 2021 pterjan <pterjan> 1.0.1-2.mga8
+ Revision: 1670767
- Rebuild to generate ocamlx provides

* Sun Apr 05 2020 tv <tv> 1.0.1-1.mga8
+ Revision: 1564926
- 1.0.1

* Fri Feb 28 2020 umeabot <umeabot> 1.0.0-4.mga8
+ Revision: 1551802
- Rebuild for ocaml 4.10.0 final

* Thu Feb 20 2020 umeabot <umeabot> 1.0.0-3.mga8
+ Revision: 1545757
- Mageia 8 Mass Rebuild

* Wed Jan 29 2020 tv <tv> 1.0.0-2.mga8
+ Revision: 1485163
- imported package ocaml-alcotest