3 %bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 Summary: Result value combinators for OCaml
11 Summary(pl.UTF-8): Kombinatory wartości wyników dla OCamla
17 Source0: https://erratique.ch/software/rresult/releases/rresult-%{version}.tbz
18 # Source0-md5: 7f6139c00926e09f6d1aa7efdcf2e703
19 URL: https://erratique.ch/software/rresult
20 BuildRequires: ocaml >= 1:4.08.0
21 BuildRequires: ocaml-findlib
22 BuildRequires: ocaml-ocamlbuild
23 BuildRequires: ocaml-topkg >= 1.0.3
24 %requires_eq ocaml-runtime
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define debug_package %{nil}
30 Rresult is an OCaml module for handling computation results and errors
31 in an explicit and declarative manner, without resorting to
32 exceptions. It defines combinators to operate on the "result" type
33 available from OCaml 4.03 in the standard library.
35 OCaml 4.08 provides the Stdlib.Result module which you should prefer
38 This package contains files needed to run bytecode executables using
41 %description -l pl.UTF-8
42 Rresult to moduł OCamla do obsługi wyników obliczeń i błędów w sposób
43 jawny i deklaratywny, bez uciekania się do wyjątków. Definiuje
44 kombinatory operujące na typie "result" dostępnym w bibliotece
45 standardowej OCamla od wersji 4.03.
47 OCaml 4.08 udostępnia moduł Stdlib.Result, który powinien być
48 preferowany względem Rresult.
50 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
51 używających biblioteki rresult.
54 Summary: Result value combinators for OCaml - development part
55 Summary(pl.UTF-8): Kombinatory wartości wyników dla OCamla - cześć programistyczna
56 Group: Development/Libraries
57 Requires: %{name} = %{version}-%{release}
61 This package contains files needed to develop OCaml programs using
64 %description devel -l pl.UTF-8
65 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
66 używających biblioteki rresult.
69 %setup -q -n rresult-%{version}
72 ocaml pkg/pkg.ml build
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/rresult
78 cp -p _build/pkg/META _build/opam $RPM_BUILD_ROOT%{_libdir}/ocaml/rresult
79 cp -p _build/src/*.{cma,cmi,cmt,cmti,mli} $RPM_BUILD_ROOT%{_libdir}/ocaml/rresult
81 cp -p _build/src/*.{a,cmxs,cmx,cmxa} $RPM_BUILD_ROOT%{_libdir}/ocaml/rresult
85 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %doc CHANGES.md LICENSE.md README.md
90 %dir %{_libdir}/ocaml/rresult
91 %{_libdir}/ocaml/rresult/META
92 %{_libdir}/ocaml/rresult/*.cma
94 %attr(755,root,root) %{_libdir}/ocaml/rresult/*.cmxs
98 %defattr(644,root,root,755)
99 %{_libdir}/ocaml/rresult/*.cmi
100 %{_libdir}/ocaml/rresult/*.cmt
101 %{_libdir}/ocaml/rresult/*.cmti
102 %{_libdir}/ocaml/rresult/*.mli
103 %if %{with ocaml_opt}
104 %{_libdir}/ocaml/rresult/rresult.a
105 %{_libdir}/ocaml/rresult/rresult_top.a
106 %{_libdir}/ocaml/rresult/*.cmx
107 %{_libdir}/ocaml/rresult/*.cmxa
109 %{_libdir}/ocaml/rresult/opam