Initial import.
This commit is contained in:
parent
1d62328fa1
commit
7b2e5acd3f
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/bisect_ppx-*.tar.gz
|
5
ocaml-bisect-ppx.rpmlintrc
Normal file
5
ocaml-bisect-ppx.rpmlintrc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
|
||||||
|
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
|
||||||
|
|
||||||
|
# OCaml does this to us. We have no control over it.
|
||||||
|
addFilter(r'ocaml-bisect-ppx[^:]+: E: missing-call-to-chdir-with-chroot')
|
147
ocaml-bisect-ppx.spec
Normal file
147
ocaml-bisect-ppx.spec
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
# The latest release, 1.4.1, is incompatible with ocaml 4.09 and the latest
|
||||||
|
# version of ocaml-migrate-parsetree. Furthermore, the license has changed in
|
||||||
|
# git. Until the next release, we check out from git.
|
||||||
|
%global gittag b2661bf40d9c53f5adef382423faa00c3d59cf65
|
||||||
|
%global shorttag %(cut -b -7 <<< %{gittag})
|
||||||
|
%global gitdate 20200106
|
||||||
|
|
||||||
|
%ifnarch %{ocaml_native_compiler}
|
||||||
|
%global debug_package %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%global srcname bisect-ppx
|
||||||
|
%global upname bisect_ppx
|
||||||
|
|
||||||
|
Name: ocaml-%{srcname}
|
||||||
|
Version: 1.4.1
|
||||||
|
Release: 1.%{gitdate}.%{shorttag}%{?dist}
|
||||||
|
Summary: Code coverage for OCaml and Reason
|
||||||
|
|
||||||
|
License: MIT
|
||||||
|
URL: http://aantron.github.io/bisect_ppx/
|
||||||
|
Source0: https://github.com/aantron/%{upname}/archive/%{gittag}/%{upname}-%{shorttag}.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: git-core
|
||||||
|
BuildRequires: ocaml >= 4.02.0
|
||||||
|
BuildRequires: ocaml-cmdliner-devel >= 1.0.0
|
||||||
|
BuildRequires: ocaml-dune
|
||||||
|
BuildRequires: ocaml-findlib
|
||||||
|
BuildRequires: ocaml-migrate-parsetree-devel >= 1.4.0
|
||||||
|
BuildRequires: ocaml-ocamldoc
|
||||||
|
BuildRequires: ocaml-ounit-devel
|
||||||
|
BuildRequires: ocaml-ppx-derivers-devel
|
||||||
|
BuildRequires: ocaml-ppx-tools-versioned-devel >= 5.2.3
|
||||||
|
BuildRequires: ocaml-result-devel
|
||||||
|
|
||||||
|
%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-migrate-parsetree-devel%{?_isa}
|
||||||
|
Requires: ocaml-ppx-derivers-devel%{?_isa}
|
||||||
|
Requires: ocaml-ppx-tools-versioned-devel%{?_isa}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and signature files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{upname}-%{gittag}
|
||||||
|
|
||||||
|
%build
|
||||||
|
dune build
|
||||||
|
|
||||||
|
# The dune rule for building documentation requires odoc. However, odoc
|
||||||
|
# transitively depends on this package, so we build documentation manually.
|
||||||
|
mkdir html
|
||||||
|
ocamldoc -html -d html \
|
||||||
|
-I _build/default/src/report/.report.eobjs/byte \
|
||||||
|
-I +ppx_tools_versioned \
|
||||||
|
_build/default/src/common/*.mli \
|
||||||
|
_build/default/src/runtime/native/*.mli \
|
||||||
|
_build/default/src/ppx/{exclude,exclusions,instrument}.mli \
|
||||||
|
_build/default/src/report/*.mli
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
||||||
|
%ifarch %{ocaml_native_compiler}
|
||||||
|
# Add missing executable bits
|
||||||
|
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod 0755 {} \+
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%check
|
||||||
|
make test
|
||||||
|
|
||||||
|
%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
|
||||||
|
%doc html
|
||||||
|
%{_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}/*.ml
|
||||||
|
%{_libdir}/ocaml/%{upname}/*.mli
|
||||||
|
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmt
|
||||||
|
%{_libdir}/ocaml/%{upname}/common/bisect_common.cmti
|
||||||
|
%{_libdir}/ocaml/%{upname}/common/bisect_common.ml
|
||||||
|
%{_libdir}/ocaml/%{upname}/common/bisect_common.mli
|
||||||
|
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmt
|
||||||
|
%{_libdir}/ocaml/%{upname}/runtime/bisect*.cmti
|
||||||
|
%{_libdir}/ocaml/%{upname}/runtime/*.ml
|
||||||
|
%{_libdir}/ocaml/%{upname}/runtime/*.mli
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jan 8 2020 Jerry James <loganjerry@gmail.com> - 1.4.1-1.20200106.b2661bf
|
||||||
|
- Initial RPM
|
Loading…
Reference in New Issue
Block a user