Blame ocaml-bisect-ppx.spec

7b2e5ac
%ifnarch %{ocaml_native_compiler}
7b2e5ac
%global debug_package %{nil}
7b2e5ac
%endif
7b2e5ac
7b2e5ac
%global srcname bisect-ppx
7b2e5ac
%global upname  bisect_ppx
7b2e5ac
26dc712
# Running the tests requires ocaml-ounit, which introduces a circular
26dc712
# dependency (also involving ocaml-lwt).  By disabling the tests we
26dc712
# can break this cycle.
26dc712
%bcond_with tests
26dc712
a179f11
# Building the documentation requires ocaml-odoc, which depends transitively
a179f11
# on this package.
a179f11
%bcond_with odoc
a179f11
7b2e5ac
Name:           ocaml-%{srcname}
2a2c715
Version:        2.5.0
9356f3c
Release:        2%{?dist}
7b2e5ac
Summary:        Code coverage for OCaml and Reason
7b2e5ac
7b2e5ac
License:        MIT
28e0b8c
URL:            https://aantron.github.io/bisect_ppx/
a179f11
Source0:        https://github.com/aantron/%{upname}/archive/%{version}/%{upname}-%{version}.tar.gz
7b2e5ac
7b2e5ac
BuildRequires:  git-core
7b2e5ac
BuildRequires:  ocaml >= 4.02.0
7b2e5ac
BuildRequires:  ocaml-cmdliner-devel >= 1.0.0
2a2c715
BuildRequires:  ocaml-dune >= 2.7.0
28e0b8c
BuildRequires:  ocaml-migrate-parsetree-devel >= 1.7.0
a179f11
%if %{with odoc}
a179f11
BuildRequires:  ocaml-odoc
a179f11
%endif
26dc712
%if %{with tests}
2a2c715
BuildRequires:  ocaml-findlib
7b2e5ac
BuildRequires:  ocaml-ounit-devel
26dc712
%endif
28e0b8c
BuildRequires:  ocaml-ppx-tools-versioned-devel >= 5.4.0
7b2e5ac
2a2c715
%if %{without doc}
2a2c715
Obsoletes:      %{name}-doc < 2.5.0-1
2a2c715
Provides:       %{name}-doc = %{version}-%{release}
2a2c715
%endif
2a2c715
7b2e5ac
%description
7b2e5ac
Bisect_ppx is a code coverage tool for OCaml.  It helps you test
7b2e5ac
thoroughly by showing which parts of your code are *not* tested.  It is
7b2e5ac
a small preprocessor that inserts instrumentation at places in your
7b2e5ac
code, such as if-then-else and match expressions.  After you run tests,
7b2e5ac
Bisect_ppx gives a nice HTML report showing which places were visited
7b2e5ac
and which were missed.
7b2e5ac
7b2e5ac
Usage is simple - add package bisect_ppx when building tests, run your
7b2e5ac
tests, then run the Bisect_ppx report tool on the generated visitation
7b2e5ac
files.
7b2e5ac
7b2e5ac
%package        devel
7b2e5ac
Summary:        Development files for %{name}
7b2e5ac
Requires:       %{name}%{?_isa} = %{version}-%{release}
7b2e5ac
Requires:       ocaml-ppx-tools-versioned-devel%{?_isa}
7b2e5ac
7b2e5ac
%description    devel
7b2e5ac
The %{name}-devel package contains libraries and signature files for
7b2e5ac
developing applications that use %{name}.
7b2e5ac
2a2c715
%if %{with odoc}
a179f11
%package        doc
a179f11
Summary:        Documentation for %{name}
a179f11
BuildArch:      noarch
a179f11
a179f11
%description    doc
a179f11
Documentation for %{name}.
2a2c715
%endif
a179f11
7b2e5ac
%prep
a179f11
%autosetup -n %{upname}-%{version}
7b2e5ac
7b2e5ac
%build
2a2c715
dune build %{?_smp_mflags} @install
7b2e5ac
a179f11
%if %{with odoc}
a179f11
dune build %{?_smp_mflags} @doc
a179f11
%endif
7b2e5ac
7b2e5ac
%install
7b2e5ac
dune install --destdir=%{buildroot}
7b2e5ac
7b2e5ac
# Install the man page
7b2e5ac
mkdir -p %{buildroot}%{_mandir}/man1
7b2e5ac
_build/install/default/bin/bisect-ppx-report --help groff > \
7b2e5ac
  %{buildroot}%{_mandir}/man1/bisect-ppx-report.1
7b2e5ac
7b2e5ac
# We install the documentation with the doc macro
7b2e5ac
rm -fr %{buildroot}%{_prefix}/doc
7b2e5ac
a179f11
# We do not want the ml files
a179f11
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
a179f11
7b2e5ac
%ifarch %{ocaml_native_compiler}
7b2e5ac
# Add missing executable bits
7b2e5ac
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod 0755 {} \+
7b2e5ac
%endif
7b2e5ac
26dc712
%if %{with tests}
7b2e5ac
%check
938d28e
dune runtest -p bisect_ppx --force --no-buffer -j 1
26dc712
%endif
7b2e5ac
7b2e5ac
%files
7b2e5ac
%doc doc/advanced.md doc/CHANGES README.md
7b2e5ac
%license LICENSE.md
7b2e5ac
%{_bindir}/bisect-ppx-report
7b2e5ac
%{_mandir}/man1/bisect-ppx-report.1*
7b2e5ac
%dir %{_libdir}/ocaml/%{upname}/
7b2e5ac
%dir %{_libdir}/ocaml/%{upname}/common/
7b2e5ac
%dir %{_libdir}/ocaml/%{upname}/runtime/
7b2e5ac
%{_libdir}/ocaml/%{upname}/META
7b2e5ac
%{_libdir}/ocaml/%{upname}/ppx.exe
7b2e5ac
%{_libdir}/ocaml/%{upname}/%{upname}.cma
7b2e5ac
%{_libdir}/ocaml/%{upname}/%{upname}*.cmi
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.cma
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmi
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/bisect.cma
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmi
7b2e5ac
%ifarch %{ocaml_native_compiler}
7b2e5ac
%{_libdir}/ocaml/%{upname}/%{upname}.cmxs
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmxs
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/bisect.cmxs
7b2e5ac
%endif
7b2e5ac
7b2e5ac
%files devel
7b2e5ac
%{_libdir}/ocaml/%{upname}/dune-package
7b2e5ac
%{_libdir}/ocaml/%{upname}/opam
7b2e5ac
%ifarch %{ocaml_native_compiler}
7b2e5ac
%{_libdir}/ocaml/%{upname}/%{upname}.a
7b2e5ac
%{_libdir}/ocaml/%{upname}/%{upname}*.cmx
7b2e5ac
%{_libdir}/ocaml/%{upname}/%{upname}.cmxa
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.a
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmx
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmxa
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/bisect.a
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmx
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/bisect.cmxa
7b2e5ac
%endif
7b2e5ac
%{_libdir}/ocaml/%{upname}/%{upname}*.cmt
7b2e5ac
%{_libdir}/ocaml/%{upname}/%{upname}*.cmti
7b2e5ac
%{_libdir}/ocaml/%{upname}/*.mli
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmt
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmti
7b2e5ac
%{_libdir}/ocaml/%{upname}/common/bisect_common.mli
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmt
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmti
7b2e5ac
%{_libdir}/ocaml/%{upname}/runtime/*.mli
7b2e5ac
2a2c715
%if %{with odoc}
a179f11
%files doc
a179f11
%if %{with odoc}
a179f11
%doc _build/default/_doc/_html/
a179f11
%doc _build/default/_doc/_mlds/
a179f11
%doc _build/default/_doc/_odoc/
a179f11
%else
a179f11
%doc html
a179f11
%endif
a179f11
%license LICENSE.md
2a2c715
%endif
a179f11
7b2e5ac
%changelog
9356f3c
* Mon Dec  7 2020 Jerry James <loganjerry@gmail.com> - 2.5.0-2
9356f3c
- Rebuild for ocaml-migrate-parsetree 1.8.0
9356f3c
2a2c715
* Fri Oct 23 2020 Jerry James <loganjerry@gmail.com> - 2.5.0-1
2a2c715
- Version 2.5.0
2a2c715
- Building documentation with ocamldoc no longer works
2a2c715
816a45c
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-6
816a45c
- OCaml 4.11.1 rebuild
816a45c
dd2d8d0
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-5
dd2d8d0
- OCaml 4.11.0 rebuild
dd2d8d0
9826e5a
* Mon Aug 03 2020 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-4
9826e5a
- Bump and rebuild to fix Location dependency.
9826e5a
fe08535
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-3
fe08535
- Second attempt - Rebuilt for
fe08535
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
fe08535
d49cd28
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
d49cd28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
d49cd28
28e0b8c
* Thu Jun 25 2020 Dan Čermák <dan.cermak@cgc-instruments.com> - 2.4.1-1
28e0b8c
- New upstream release 2.4.1
28e0b8c
a482b58
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 2.3.2-3
a482b58
- OCaml 4.11.0+dev2-2020-04-22 rebuild
a482b58
66f142e
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 2.3.2-2
66f142e
- OCaml 4.11.0 pre-release attempt 2
66f142e
02f3899
* Sun Apr 19 2020 Jerry James <loganjerry@gmail.com> - 2.3.2-1
02f3899
- Version 2.3.2
02f3899
a179f11
* Thu Apr 16 2020 Jerry James <loganjerry@gmail.com> - 2.3.1-1
a179f11
- Version 2.3.1
a179f11
- Add conditional for building documentation with odoc
a179f11
10f3bd4
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 1.4.1-5.20200106.b2661bf
10f3bd4
- Update all OCaml dependencies for RPM 4.16.
10f3bd4
a80b62e
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 1.4.1-4.20200106.b2661bf
a80b62e
- OCaml 4.10.0 final.
26dc712
- Disable the tests to avoid circular dependency.
a80b62e
25609a2
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-3.20200106.b2661bf
25609a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
25609a2
3c72cee
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.4.1-2.20200106.b2661bf
3c72cee
- OCaml 4.10.0+beta1 rebuild.
3c72cee
7b2e5ac
* Wed Jan  8 2020 Jerry James <loganjerry@gmail.com> - 1.4.1-1.20200106.b2661bf
7b2e5ac
- Initial RPM