initial import (#1515071)

This commit is contained in:
Andy Li 2017-11-21 13:56:35 +08:00
parent 5368c896bf
commit ad69565cad
4 changed files with 82 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/ocaml-benchmark-1.4.tar.gz

View File

@ -1,3 +0,0 @@
# ocaml-benchmark
The ocaml-benchmark package

80
ocaml-benchmark.spec Normal file
View File

@ -0,0 +1,80 @@
%global debug_package %{nil}
Name: ocaml-benchmark
Version: 1.4
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-oasis-devel
BuildRequires: ocaml-ocamlbuild
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamldoc
%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
make setup.ml
ocaml setup.ml -configure --destdir $RPM_BUILD_ROOT --prefix %{_prefix}
ocaml setup.ml -build
%install
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
ocaml setup.ml -install
%check
ocaml setup.ml -test
%files
%doc README.md
%license LICENSE.txt
%{_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
%license LICENSE.txt
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/benchmark/*.a
%{_libdir}/ocaml/benchmark/*.cmxa
%{_libdir}/ocaml/benchmark/*.cmx
%endif
%{_libdir}/ocaml/benchmark/*.mli
%changelog
* Mon Nov 20 2017 Andy Li <andy@onthewings.net> - 1.4-1
- Initial RPM release.

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (ocaml-benchmark-1.4.tar.gz) = e6b7d64482ff3c9957c9711875d28374b4ab96ebfea078622f250ab8e17f39d20c60358456d7218571cdeaa9f53c3afbd5fee3bea7da2943bc0375be9296bdf6