]>
Commit | Line | Data |
---|---|---|
4c7affa9 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) | |
4 | ||
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 | |
8 | %endif | |
9 | ||
10 | Summary: Result value combinators for OCaml | |
11 | Summary(pl.UTF-8): Kombinatory wartości wyników dla OCamla | |
12 | Name: ocaml-rresult | |
13 | Version: 0.7.0 | |
14 | Release: 1 | |
15 | License: ISC | |
16 | Group: Libraries | |
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) | |
26 | ||
27 | %define debug_package %{nil} | |
28 | ||
29 | %description | |
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. | |
34 | ||
35 | OCaml 4.08 provides the Stdlib.Result module which you should prefer | |
36 | to Rresult. | |
37 | ||
38 | This package contains files needed to run bytecode executables using | |
39 | rresult library. | |
40 | ||
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. | |
46 | ||
47 | OCaml 4.08 udostępnia moduł Stdlib.Result, który powinien być | |
48 | preferowany względem Rresult. | |
49 | ||
50 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
51 | używających biblioteki rresult. | |
52 | ||
53 | %package devel | |
54 | Summary: Result value combinators for OCaml - development part | |
b4d8a428 | 55 | Summary(pl.UTF-8): Kombinatory wartości wyników dla OCamla - część programistyczna |
4c7affa9 JB |
56 | Group: Development/Libraries |
57 | Requires: %{name} = %{version}-%{release} | |
58 | %requires_eq ocaml | |
59 | ||
60 | %description devel | |
61 | This package contains files needed to develop OCaml programs using | |
62 | rresult library. | |
63 | ||
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. | |
67 | ||
68 | %prep | |
69 | %setup -q -n rresult-%{version} | |
70 | ||
71 | %build | |
72 | ocaml pkg/pkg.ml build | |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/rresult | |
77 | ||
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 | |
80 | %if %{with ocaml_opt} | |
81 | cp -p _build/src/*.{a,cmxs,cmx,cmxa} $RPM_BUILD_ROOT%{_libdir}/ocaml/rresult | |
82 | %endif | |
83 | ||
84 | %clean | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %files | |
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 | |
93 | %if %{with ocaml_opt} | |
94 | %attr(755,root,root) %{_libdir}/ocaml/rresult/*.cmxs | |
95 | %endif | |
96 | ||
97 | %files devel | |
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 | |
108 | %endif | |
109 | %{_libdir}/ocaml/rresult/opam |