%undefine _package_note_flags %ifnarch %{ocaml_native_compiler} %global debug_package %{nil} %endif %global srcname rresult Name: ocaml-%{srcname} Version: 0.7.0 Release: %mkrel 1 Summary: Result value combinators for OCaml Group: Development/OCaml License: ISC URL: https://erratique.ch/software/rresult Source0: %{url}/releases/%{srcname}-%{version}.tbz BuildRequires: ocaml >= 4.08.0 BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamlbuild BuildRequires: ocaml-topkg-devel >= 1.0.3 %description Rresult is an OCaml module for handling computation results and errors in an explicit and declarative manner without resorting to exceptions. It defines combinators to operate on the values of the result type available from OCaml 4.03 in the standard library. OCaml 4.08 provides the Stdlib.Result module which you should prefer to Rresult. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %autosetup -n %{srcname}-%{version} %build ocaml pkg/pkg.ml build --dev-pkg false --tests true %install mkdir -p %{buildroot}%{_libdir}/ocaml/%{srcname} cp -p _build/src/*.{a,cma,cmi,cmt,cmti,cmx,cmxa,cmxs,mli} _build/pkg/META \ _build/opam %{buildroot}%{_libdir}/ocaml/%{srcname} %check ocaml pkg/pkg.ml test %files %doc CHANGES.md README.md %license LICENSE.md %dir %{_libdir}/ocaml/%{srcname}/ %{_libdir}/ocaml/%{srcname}/META %{_libdir}/ocaml/%{srcname}/*.cma %{_libdir}/ocaml/%{srcname}/*.cmi %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/%{srcname}/*.cmxs %endif %files devel %if %{with docs} %doc _build/default/_doc/* %endif %{_libdir}/ocaml/%{srcname}/opam %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/%{srcname}/*.a %{_libdir}/ocaml/%{srcname}/*.cmx %{_libdir}/ocaml/%{srcname}/*.cmxa %endif %{_libdir}/ocaml/%{srcname}/*.cmt %{_libdir}/ocaml/%{srcname}/*.cmti %{_libdir}/ocaml/%{srcname}/*.mli %changelog * Fri May 20 2022 pterjan <pterjan> 0.7.0-1.mga9 + Revision: 1859520 - imported package ocaml-rresult