]>
Commit | Line | Data |
---|---|---|
8237ce22 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: Full standard library replacement for OCaml | |
11 | Summary(pl.UTF-8): Pełny zamiennik biblioteki standardowej dla OCamla | |
12 | Name: ocaml-base | |
3efac241 | 13 | Version: 0.14.2 |
8237ce22 JB |
14 | Release: 1 |
15 | License: MIT | |
16 | Group: Libraries | |
17 | #Source0Download: https://github.com/janestreet/base/releases | |
18 | Source0: https://github.com/janestreet/base/archive/v%{version}/base-%{version}.tar.gz | |
3efac241 | 19 | # Source0-md5: 0d1a2d0322b8c446e5dda20290112e5c |
8237ce22 JB |
20 | URL: https://opensource.janestreet.com/base/ |
21 | BuildRequires: ocaml >= 1:4.07.0 | |
22 | BuildRequires: ocaml-dune-devel >= 2.0.0 | |
23 | BuildRequires: ocaml-sexplib0-devel >= 0.14 | |
24 | BuildRequires: ocaml-sexplib0-devel < 0.15 | |
25 | %requires_eq ocaml-runtime | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %if %{without ocaml_opt} | |
29 | %define no_install_post_strip 1 | |
30 | # no opt means no native binary, stripping bytecode breaks such programs | |
31 | %define _enable_debug_packages 0 | |
32 | %endif | |
33 | ||
34 | %description | |
35 | Base is a complete and portable alternative to the OCaml standard | |
36 | library. It provides all standard functionalities one would expect | |
37 | from a language standard library. It uses consistent conventions | |
38 | across all of its module. | |
39 | ||
40 | Base aims to be usable in any context. As a result system dependent | |
41 | features such as I/O are not offered by Base. They are instead | |
42 | provided by companion libraries such as stdio. | |
43 | ||
44 | This package contains files needed to run bytecode executables using | |
45 | base library. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Base to kompletna i przenośna alternatywa dla biblioteki standardowej | |
49 | OCamla. Zapewnia całą standardową funkcjonalność, której należałoby | |
50 | oczekiwać od biblioteki standardowej języka programowania. | |
51 | Wykorzystuje spójne konwencje w całym module. | |
52 | ||
53 | Biblioteka base ma być użyteczna w dowolnym kontekście - w efekcie | |
54 | funkcje zależne od systemu, takie jak wejście/wyjście, nie są w niej | |
55 | oferowane - są udostępniane przez biblioteki towarzyszące, takie jak | |
56 | stdio. | |
57 | ||
58 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
59 | używających biblioteki base. | |
60 | ||
61 | %package devel | |
62 | Summary: Full standard library replacement for OCaml - development part | |
63 | Summary(pl.UTF-8): Pełny zamiennik biblioteki standardowej dla OCamla - cześć programistyczna | |
64 | Group: Development/Libraries | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | Requires: ocaml-dune-devel >= 2.0.0 | |
67 | Requires: ocaml-sexplib0-devel >= 0.14 | |
68 | %requires_eq ocaml | |
69 | ||
70 | %description devel | |
71 | This package contains files needed to develop OCaml programs using | |
72 | base library. | |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu | |
76 | używających biblioteki base. | |
77 | ||
78 | %prep | |
79 | %setup -q -n base-%{version} | |
80 | ||
81 | %build | |
82 | dune build --verbose | |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | dune install --destdir=$RPM_BUILD_ROOT | |
88 | ||
89 | # sources | |
90 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/base/*.ml | |
91 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/base/*/*.ml | |
92 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/base/base_internalhash_types/*.h | |
93 | # packaged as %doc | |
94 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/base | |
95 | ||
96 | %clean | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc CHANGES.md LICENSE.md README.org ROADMAP.md | |
102 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllbase_stubs.so | |
103 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllbase_internalhash_types_stubs.so | |
104 | %dir %{_libdir}/ocaml/base | |
105 | %{_libdir}/ocaml/base/META | |
106 | %{_libdir}/ocaml/base/*.cma | |
107 | %{_libdir}/ocaml/base/runtime.js | |
108 | %dir %{_libdir}/ocaml/base/base_internalhash_types | |
109 | %{_libdir}/ocaml/base/base_internalhash_types/*.cma | |
110 | %{_libdir}/ocaml/base/base_internalhash_types/runtime.js | |
111 | %dir %{_libdir}/ocaml/base/caml | |
112 | %{_libdir}/ocaml/base/caml/*.cma | |
113 | %dir %{_libdir}/ocaml/base/md5 | |
114 | %{_libdir}/ocaml/base/md5/*.cma | |
115 | %dir %{_libdir}/ocaml/base/shadow_stdlib | |
116 | %{_libdir}/ocaml/base/shadow_stdlib/*.cma | |
117 | %if %{with ocaml_opt} | |
118 | %attr(755,root,root) %{_libdir}/ocaml/base/*.cmxs | |
119 | %attr(755,root,root) %{_libdir}/ocaml/base/base_internalhash_types/*.cmxs | |
120 | %attr(755,root,root) %{_libdir}/ocaml/base/caml/*.cmxs | |
121 | %attr(755,root,root) %{_libdir}/ocaml/base/md5/*.cmxs | |
122 | %attr(755,root,root) %{_libdir}/ocaml/base/shadow_stdlib/*.cmxs | |
123 | %endif | |
124 | ||
125 | %files devel | |
126 | %defattr(644,root,root,755) | |
3efac241 | 127 | %{_libdir}/ocaml/base/libbase_stubs.a |
8237ce22 JB |
128 | %{_libdir}/ocaml/base/*.cmi |
129 | %{_libdir}/ocaml/base/*.cmt | |
130 | %{_libdir}/ocaml/base/*.cmti | |
131 | %{_libdir}/ocaml/base/*.mli | |
3efac241 | 132 | %{_libdir}/ocaml/base/base_internalhash_types/libbase_internalhash_types_stubs.a |
8237ce22 JB |
133 | %{_libdir}/ocaml/base/base_internalhash_types/*.cmi |
134 | %{_libdir}/ocaml/base/base_internalhash_types/*.cmt | |
135 | %{_libdir}/ocaml/base/caml/*.cmi | |
136 | %{_libdir}/ocaml/base/caml/*.cmt | |
137 | %{_libdir}/ocaml/base/md5/*.cmi | |
138 | %{_libdir}/ocaml/base/md5/*.cmt | |
139 | %{_libdir}/ocaml/base/md5/*.cmti | |
140 | %{_libdir}/ocaml/base/md5/*.mli | |
141 | %{_libdir}/ocaml/base/shadow_stdlib/*.cmi | |
142 | %{_libdir}/ocaml/base/shadow_stdlib/*.cmt | |
143 | %{_libdir}/ocaml/base/shadow_stdlib/*.cmti | |
144 | %{_libdir}/ocaml/base/shadow_stdlib/*.mli | |
145 | %if %{with ocaml_opt} | |
3efac241 | 146 | %{_libdir}/ocaml/base/base.a |
8237ce22 JB |
147 | %{_libdir}/ocaml/base/*.cmx |
148 | %{_libdir}/ocaml/base/*.cmxa | |
3efac241 | 149 | %{_libdir}/ocaml/base/base_internalhash_types/base_internalhash_types.a |
8237ce22 JB |
150 | %{_libdir}/ocaml/base/base_internalhash_types/*.cmx |
151 | %{_libdir}/ocaml/base/base_internalhash_types/*.cmxa | |
3efac241 | 152 | %{_libdir}/ocaml/base/caml/caml.a |
8237ce22 JB |
153 | %{_libdir}/ocaml/base/caml/*.cmx |
154 | %{_libdir}/ocaml/base/caml/*.cmxa | |
3efac241 | 155 | %{_libdir}/ocaml/base/md5/md5_lib.a |
8237ce22 JB |
156 | %{_libdir}/ocaml/base/md5/*.cmx |
157 | %{_libdir}/ocaml/base/md5/*.cmxa | |
3efac241 | 158 | %{_libdir}/ocaml/base/shadow_stdlib/shadow_stdlib.a |
8237ce22 JB |
159 | %{_libdir}/ocaml/base/shadow_stdlib/*.cmx |
160 | %{_libdir}/ocaml/base/shadow_stdlib/*.cmxa | |
161 | %endif | |
162 | %{_libdir}/ocaml/base/dune-package | |
163 | %{_libdir}/ocaml/base/opam |