ocaml-benchmark/ocaml-benchmark.spec

93 lines
2.4 KiB
RPMSpec

Name: ocaml-benchmark
Version: 1.5
Release: 1%{?dist}
Summary: Benchmarking module for OCaml
License: LGPLv3+ with exceptions
URL: http://ocaml-benchmark.forge.ocamlcore.org/
Source0: https://github.com/Chris00/ocaml-benchmark/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: ocaml
BuildRequires: ocaml-findlib
BuildRequires: jbuilder
BuildRequires: opam-installer
%description
Benchmark provides functions to measure and compare the run-time of functions.
It is inspired by the Perl module of the same name.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%setup -q -n %{name}-%{version}
%build
jbuilder build @install
%install
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
jbuilder install --destdir="$DESTDIR" --libdir="$OCAMLFIND_DESTDIR" --verbose
# These files will be installed using the doc and license directives
rm $DESTDIR/doc/benchmark/{CHANGES.md,LICENSE.md,README.md}
# Makes *.cmxs executable such that they will be stripped.
find %{buildroot} -name '*.cmxs' -exec chmod 0755 {} \;
%check
jbuilder runtest
%files
%doc README.md CHANGES.md
%license LICENSE.md
%{_libdir}/ocaml/benchmark
%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/benchmark/*.a
%exclude %{_libdir}/ocaml/benchmark/*.cmxa
%exclude %{_libdir}/ocaml/benchmark/*.cmx
%endif
%exclude %{_libdir}/ocaml/benchmark/*.mli
%files devel
%doc README.md CHANGES.md
%license LICENSE.md
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/benchmark/*.a
%{_libdir}/ocaml/benchmark/*.cmxa
%{_libdir}/ocaml/benchmark/*.cmx
%endif
%{_libdir}/ocaml/benchmark/*.mli
%changelog
* Fri May 18 2018 Andy Li <andy@onthewings.net> - 1.5-1
- New upstream release (RHBZ#1579582).
- Update build commands to use jbuilder.
- Enable debug package.
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Dec 02 2017 Richard W.M. Jones <rjones@redhat.com> - 1.4-2
- OCaml 4.06.0 rebuild.
* Mon Nov 20 2017 Andy Li <andy@onthewings.net> - 1.4-1
- Initial RPM release.