Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > by-pkgid > ffe6ac5e8b498a5b8c795ff022d2e853 > files > 3

ocaml-bisect-ppx-2.8.1-4.mga9.src.rpm

%ifnarch %{ocaml_native_compiler}
%global debug_package %{nil}
%endif

%global srcname bisect-ppx
%global upname  bisect_ppx

# Running the tests requires ocaml-ounit, which introduces a circular
# dependency (also involving ocaml-lwt).  By disabling the tests we
# can break this cycle.
%bcond_with tests

# Building the documentation requires ocaml-odoc, which depends transitively
# on this package.
%bcond_with odoc

Name:           ocaml-%{srcname}
Version:        2.8.1
Release:        %mkrel 4
Summary:        Code coverage for OCaml and Reason
Group:          Development/OCaml

License:        MIT
URL:            https://aantron.github.io/bisect_ppx/
Source0:        https://github.com/aantron/%{upname}/archive/%{version}/%{upname}-%{version}.tar.gz
# Adapt to ppxlib 0.26.0
# https://github.com/aantron/bisect_ppx/pull/400
Patch1:         %{name}-ppat-construct.patch
# Adapt to ppxlib 0.28.0
# https://github.com/anmonteiro/bisect_ppx/commit/cc442a0
Patch2:		ppxlib-0.28.patch

BuildRequires:  git-core
BuildRequires:  ocaml >= 4.03.0
BuildRequires:  ocaml-cmdliner-devel >= 1.0.0
BuildRequires:  ocaml-dune >= 2.7.0
BuildRequires:  ocaml-ppxlib-devel >= 0.21.0
%if %{with tests}
BuildRequires:  ocaml-findlib
BuildRequires:  ocaml-ounit-devel
%endif

%description
Bisect_ppx is a code coverage tool for OCaml.  It helps you test
thoroughly by showing which parts of your code are *not* tested.  It is
a small preprocessor that inserts instrumentation at places in your
code, such as if-then-else and match expressions.  After you run tests,
Bisect_ppx gives a nice HTML report showing which places were visited
and which were missed.

Usage is simple - add package bisect_ppx when building tests, run your
tests, then run the Bisect_ppx report tool on the generated visitation
files.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-ppxlib-devel

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

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

%build
dune build %{?_smp_mflags} --release @install

%install
dune install --destdir=%{buildroot}

# Install the man page
mkdir -p %{buildroot}%{_mandir}/man1
_build/install/default/bin/bisect-ppx-report --help groff > \
  %{buildroot}%{_mandir}/man1/bisect-ppx-report.1

# 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

%if %{with tests}
%check
dune runtest -p bisect_ppx --force --no-buffer -j 1
%endif

%files
%doc doc/advanced.md doc/CHANGES README.md
%license LICENSE.md
%{_bindir}/bisect-ppx-report
%{_mandir}/man1/bisect-ppx-report.1*
%dir %{_libdir}/ocaml/%{upname}/
%dir %{_libdir}/ocaml/%{upname}/common/
%dir %{_libdir}/ocaml/%{upname}/runtime/
%{_libdir}/ocaml/%{upname}/META
%{_libdir}/ocaml/%{upname}/ppx.exe
%{_libdir}/ocaml/%{upname}/%{upname}.cma
%{_libdir}/ocaml/%{upname}/%{upname}*.cmi
%{_libdir}/ocaml/%{upname}/common/bisect_common.cma
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmi
%{_libdir}/ocaml/%{upname}/runtime/bisect.cma
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{upname}/%{upname}.cmxs
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmxs
%{_libdir}/ocaml/%{upname}/runtime/bisect.cmxs
%endif

%files devel
%{_libdir}/ocaml/%{upname}/dune-package
%{_libdir}/ocaml/%{upname}/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{upname}/%{upname}.a
%{_libdir}/ocaml/%{upname}/%{upname}*.cmx
%{_libdir}/ocaml/%{upname}/%{upname}.cmxa
%{_libdir}/ocaml/%{upname}/common/bisect_common.a
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmx
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmxa
%{_libdir}/ocaml/%{upname}/runtime/bisect.a
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmx
%{_libdir}/ocaml/%{upname}/runtime/bisect.cmxa
%endif
%{_libdir}/ocaml/%{upname}/%{upname}*.cmt
%{_libdir}/ocaml/%{upname}/%{upname}*.cmti
%{_libdir}/ocaml/%{upname}/*.mli
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmt
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmti
%{_libdir}/ocaml/%{upname}/common/bisect_common.mli
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmt
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmti
%{_libdir}/ocaml/%{upname}/runtime/*.mli



%changelog
* Sun Dec 11 2022 pterjan <pterjan> 2.8.1-4.mga9
+ Revision: 1920655
- Add a fix for ppxlib 0.28
- Rebuild for new ppxlib

* Mon Oct 10 2022 pterjan <pterjan> 2.8.1-3.mga9
+ Revision: 1896143
- Build in release mode to not fail on warnings about new cmdliner

* Thu May 19 2022 pterjan <pterjan> 2.8.1-2.mga9
+ Revision: 1859292
- Rebuild for OCaml 4.14

* Fri May 13 2022 pterjan <pterjan> 2.8.1-1.mga9
+ Revision: 1857976
- Update to 2.8.1

* Tue Apr 05 2022 umeabot <umeabot> 2.6.3-3.mga9
+ Revision: 1844557
- Mageia 9 Mass Rebuild

* Wed Oct 13 2021 tv <tv> 2.6.3-2.mga9
+ Revision: 1751147
- Rebuild for ocaml 4.13.1

* Wed Oct 13 2021 tv <tv> 2.6.3-1.mga9
+ Revision: 1751108
- Version 2.6.3

* Fri Mar 19 2021 tv <tv> 2.6.0-3.mga9
+ Revision: 1704850
- Rebuild dor ocaml-ppxlib
- rebuild for new ocaml-migrate-parsetree

* Sat Mar 06 2021 tv <tv> 2.6.0-1.mga9
+ Revision: 1699968
- 2.6.0

* Sun Jan 10 2021 pterjan <pterjan> 1.4.1-4.mga8
+ Revision: 1670774
- Rebuild to generate ocamlx provides

* Fri Feb 28 2020 umeabot <umeabot> 1.4.1-3.mga8
+ Revision: 1551741
- Rebuild for ocaml 4.10.0 final

* Thu Feb 20 2020 umeabot <umeabot> 1.4.1-2.mga8
+ Revision: 1545733
- Mageia 8 Mass Rebuild

* Wed Jan 29 2020 tv <tv> 1.4.1-1.mga8
+ Revision: 1485138
- imported package ocaml-bisect-ppx