Blob Blame History Raw
%global debug_package %{nil}

Name:           ocaml-qcheck
Version:        0.7
Release:        1%{?dist}
Summary:        QuickCheck inspired property-based testing for OCaml

License:        BSD
URL:            https://github.com/c-cube/qcheck
Source0:        https://github.com/c-cube/qcheck/archive/%{version}/%{name}-%{version}.tar.gz

BuildRequires:  ocaml
BuildRequires:  ocaml-ocamlbuild
BuildRequires:  ocaml-findlib
BuildRequires:  ocaml-ocamldoc
BuildRequires:  ocaml-ounit-devel


%description
This module allows to check invariants (properties of some types) over
randomly generated instances of the type. It provides combinators for
generating instances and printing them.


%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 qcheck-%{version}


%build
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.adoc CHANGELOG.md
%license LICENSE
%{_libdir}/ocaml/qcheck
%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/qcheck/*.a
%exclude %{_libdir}/ocaml/qcheck/*.cmxa
%exclude %{_libdir}/ocaml/qcheck/*.cmx
%endif
%exclude %{_libdir}/ocaml/qcheck/*.mli


%files devel
%doc README.adoc CHANGELOG.md
%license LICENSE
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/qcheck/*.a
%{_libdir}/ocaml/qcheck/*.cmxa
%{_libdir}/ocaml/qcheck/*.cmx
%endif
%{_libdir}/ocaml/qcheck/*.mli


%changelog
* Mon Nov 20 2017 Andy Li <andy@onthewings.net> - 0.7-1
- Initial RPM release.