]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # native, optimized compiler | |
4 | ||
5 | # ppc64, sparc64 and x32 variants not supported currently | |
6 | # alpha, hppa, ia64, mips removed since 4.00 | |
7 | %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 | |
8 | %undefine with_ocaml_opt | |
9 | %endif | |
10 | ||
11 | %define sver 4.12 | |
12 | ||
13 | Summary: The Objective Caml compiler and programming environment | |
14 | Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne | |
15 | Name: ocaml | |
16 | Version: 4.12.0 | |
17 | Release: 5 | |
18 | Epoch: 1 | |
19 | License: QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library) | |
20 | Group: Development/Languages | |
21 | Source0: http://caml.inria.fr/distrib/ocaml-%{sver}/%{name}-%{version}.tar.xz | |
22 | # Source0-md5: 7343cd398d477001db2c3f2ac92e12ea | |
23 | Source1: http://caml.inria.fr/distrib/ocaml-%{sver}/%{name}-%{sver}-refman-html.tar.gz | |
24 | # Source1-md5: 1bda3d0a46328a985c817d551423e2c6 | |
25 | Source3: http://caml.inria.fr/distrib/ocaml-%{sver}/%{name}-%{sver}-refman.info.tar.gz | |
26 | # Source3-md5: c808dbbe35a6cc5d14da6c3b2f175d2c | |
27 | Source4: https://github.com/mmottl/pure-fun/archive/v1.0.13/pure-fun-1.0.13.tar.gz | |
28 | # Source4-md5: 0a6ff033df78d0880fe4883ace025ebe | |
29 | # note: dead URL | |
30 | Source5: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz | |
31 | # Source5-md5: 77fa1da7375dea1393cc0b6cd802d7e1 | |
32 | Patch0: %{name}-10266.patch | |
33 | Patch1: %{name}-info.patch | |
34 | URL: https://www.ocaml.org/ | |
35 | Requires: %{name}-runtime = %{epoch}:%{version}-%{release} | |
36 | Provides: ocaml-bytes-devel | |
37 | Provides: ocaml-ocamldoc | |
38 | Obsoletes: ocaml-bytes-devel < 1.4 | |
39 | Obsoletes: ocaml-doc-ps < 1:4.12 | |
40 | Obsoletes: ocaml-emacs < 1:4.12 | |
41 | Obsoletes: ocaml-ocamldoc <= pre4 | |
42 | Obsoletes: ocaml-x11graphics < 1:4.12 | |
43 | Obsoletes: ocaml-x11graphics-devel < 1:4.12 | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %define specflags -fno-strict-aliasing | |
47 | ||
48 | %if %{without ocaml_opt} | |
49 | %define _noautoreq Backend_intf Inlining_decision_intf Simplify_boxed_integer_ops_intf | |
50 | %endif | |
51 | ||
52 | %description | |
53 | Objective Caml is a high-level, strongly-typed, functional and | |
54 | object-oriented programming language from the ML family of languages. | |
55 | ||
56 | This package comprises two batch compilers (a fast bytecode compiler | |
57 | and an optimizing native-code compiler), an interactive toplevel | |
58 | system, Lex&Yacc tools, a replay debugger, and a comprehensive | |
59 | library. | |
60 | ||
61 | %description -l pl.UTF-8 | |
62 | OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym | |
63 | językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny | |
64 | języków ML. | |
65 | ||
66 | Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu oraz | |
67 | optymalizujący kompilator do kodu natywnego), interaktywne środowisko | |
68 | pracy, narzędzia do tworzenia analizatorów leksykalnych oraz | |
69 | składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i | |
70 | biblioteki. | |
71 | ||
72 | %package runtime | |
73 | Summary: Runtime system for OCaml | |
74 | Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla | |
75 | Group: Libraries | |
76 | ||
77 | %description runtime | |
78 | This package contains binaries needed to run bytecode OCaml programs: | |
79 | ocamlrun bytecode interpreter, and basic dynamic link libraries. | |
80 | ||
81 | %description runtime -l pl.UTF-8 | |
82 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów w | |
83 | OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) | |
84 | oraz podstawowe biblioteki linkowane dynamicznie. | |
85 | ||
86 | %package lib-source | |
87 | Summary: Sources of OCaml standard library | |
88 | Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla | |
89 | Group: Development/Languages | |
90 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
91 | ||
92 | %description lib-source | |
93 | This sources come helpful during debugging of user programs with | |
94 | ocamldebug. | |
95 | ||
96 | %description lib-source -l pl.UTF-8 | |
97 | Źródła te są przydatne przy odpluskwianiu programów użytkownika z | |
98 | użyciem ocamldebug. | |
99 | ||
100 | %package doc-html | |
101 | Summary: HTML documentation for OCaml | |
102 | Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML | |
103 | Group: Development/Tools | |
104 | ||
105 | %description doc-html | |
106 | HTML documentation for OCaml. | |
107 | ||
108 | %description doc-html -l pl.UTF-8 | |
109 | Dokumentacja dla OCamla w formacie HTML. | |
110 | ||
111 | %package doc-info | |
112 | Summary: Info documentation for OCaml | |
113 | Summary(pl.UTF-8): Dokumentacja info dla OCamla | |
114 | Group: Development/Tools | |
115 | ||
116 | %description doc-info | |
117 | Info documentation for OCaml. | |
118 | ||
119 | %description doc-info -l pl.UTF-8 | |
120 | Dokumentacja info dla OCamla. | |
121 | ||
122 | %package compiler-objects | |
123 | Summary: Compiled parts of OCaml compiler | |
124 | Summary(pl.UTF-8): Skompilowane części kompilatora OCamla | |
125 | Group: Development/Languages | |
126 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
127 | Provides: ocaml-devel | |
128 | Obsoletes: ocaml-devel < 3.06-3 | |
129 | ||
130 | %description compiler-objects | |
131 | This package contains *.cmi and *.cmo files being parts of OCaml | |
132 | compiler. They are needed to compile some programs. | |
133 | ||
134 | %description compiler-objects -l pl.UTF-8 | |
135 | Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora | |
136 | OCamla. Są one wymagane do kompilacji niektórych programów. | |
137 | ||
138 | %package ocamldoc-devel | |
139 | Summary: Files needed to develop programs using ocamldoc | |
140 | Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc | |
141 | Group: Development/Languages | |
142 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
143 | ||
144 | %description ocamldoc-devel | |
145 | You need this package if you are going to write ocamldoc front end or | |
146 | something like that. | |
147 | ||
148 | %description ocamldoc-devel -l pl.UTF-8 | |
149 | Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end | |
150 | dla ocamldoc lub coś podobnego. | |
151 | ||
152 | # maybe we'll want to add some more stuff here? | |
153 | %package examples | |
154 | Summary: Example source code for OCaml | |
155 | Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu | |
156 | Group: Development/Languages | |
157 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
158 | ||
159 | %description examples | |
160 | This packages contains sources for Okasaki's Purely Functional | |
161 | Datastructures in OCaml, along with some contributions. | |
162 | ||
163 | %description examples -l pl.UTF-8 | |
164 | Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych autorstwa | |
165 | Okasaki'ego, napisane w OCamlu, wraz z dodatkami. | |
166 | ||
167 | %prep | |
168 | %setup -q -a1 -a3 | |
169 | %patch0 -p1 | |
170 | gunzip infoman/ocaml.info.gz | |
171 | %patch1 -p1 | |
172 | ||
173 | mkdir examples | |
174 | tar xzf %{SOURCE4} -C examples | |
175 | tar xzf %{SOURCE5} -C examples | |
176 | # order mess with docs somewhat | |
177 | mkdir -p docs/html | |
178 | %{__mv} htmlman docs/html/ocaml | |
179 | ||
180 | %build | |
181 | %configure \ | |
182 | AS=%{__as} \ | |
183 | ASPP="%{__cc} -c" \ | |
184 | --libdir=%{_libdir}/ocaml \ | |
185 | %{!?with_ocaml_opt:--disable-native-compiler} | |
186 | ||
187 | %{__make} world | |
188 | %{__make} bootstrap | |
189 | %if %{with ocaml_opt} | |
190 | %{__make} opt | |
191 | %{__make} opt.opt | |
192 | %endif | |
193 | ||
194 | %install | |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}} | |
197 | ||
198 | %{__make} install \ | |
199 | DESTDIR=$RPM_BUILD_ROOT | |
200 | ||
201 | cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF | |
202 | %{_libdir}/%{name}/stublibs | |
203 | %{_libdir}/%{name} | |
204 | EOF | |
205 | ||
206 | # move includes to the proper place | |
207 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/caml $RPM_BUILD_ROOT%{_includedir}/caml | |
208 | # but leave compatibility symlink | |
209 | ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/ocaml/caml | |
210 | ||
211 | # compiled sources of compiler, needed by some programs | |
212 | for f in %{?with_ocaml_opt:asmcomp} bytecomp parsing typing utils ; do | |
213 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f | |
214 | cp $f/*.{cmi,cmo} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f | |
215 | %{?with_ocaml_opt:cp $f/*.{cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f} | |
216 | done | |
217 | ||
218 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
219 | ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir} | |
220 | ||
221 | # shutup checkfiles | |
222 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3 | |
223 | ||
224 | # install info pages | |
225 | cp -p infoman/ocaml.info $RPM_BUILD_ROOT%{_infodir} | |
226 | cp -p infoman/ocaml.info.body-*.gz $RPM_BUILD_ROOT%{_infodir} | |
227 | ||
228 | %clean | |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
231 | %post doc-info -p /sbin/postshell | |
232 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
233 | ||
234 | %postun doc-info -p /sbin/postshell | |
235 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
236 | ||
237 | %files | |
238 | %defattr(644,root,root,755) | |
239 | %doc Changes LICENSE README.adoc | |
240 | %attr(755,root,root) %{_bindir}/addlabels | |
241 | %attr(755,root,root) %{_bindir}/ocaml | |
242 | %attr(755,root,root) %{_bindir}/ocamlc | |
243 | %attr(755,root,root) %{_bindir}/ocamlc.byte | |
244 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.opt} | |
245 | %attr(755,root,root) %{_bindir}/ocamlcmt | |
246 | %attr(755,root,root) %{_bindir}/ocamlcp | |
247 | %attr(755,root,root) %{_bindir}/ocamlcp.byte | |
248 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlcp.opt} | |
249 | %attr(755,root,root) %{_bindir}/ocamldebug | |
250 | %attr(755,root,root) %{_bindir}/ocamldep | |
251 | %attr(755,root,root) %{_bindir}/ocamldep.byte | |
252 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldep.opt} | |
253 | %attr(755,root,root) %{_bindir}/ocamldoc | |
254 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.opt} | |
255 | %attr(755,root,root) %{_bindir}/ocamllex | |
256 | %attr(755,root,root) %{_bindir}/ocamllex.byte | |
257 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamllex.opt} | |
258 | %attr(755,root,root) %{_bindir}/ocamlmklib | |
259 | %attr(755,root,root) %{_bindir}/ocamlmklib.byte | |
260 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmklib.opt} | |
261 | %attr(755,root,root) %{_bindir}/ocamlmktop | |
262 | %attr(755,root,root) %{_bindir}/ocamlmktop.byte | |
263 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmktop.opt} | |
264 | %attr(755,root,root) %{_bindir}/ocamlobjinfo | |
265 | %attr(755,root,root) %{_bindir}/ocamlobjinfo.byte | |
266 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlobjinfo.opt} | |
267 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt} | |
268 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.byte} | |
269 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.opt} | |
270 | %attr(755,root,root) %{_bindir}/ocamloptp | |
271 | %attr(755,root,root) %{_bindir}/ocamloptp.byte | |
272 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamloptp.opt} | |
273 | %attr(755,root,root) %{_bindir}/ocamlprof | |
274 | %attr(755,root,root) %{_bindir}/ocamlprof.byte | |
275 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlprof.opt} | |
276 | %attr(755,root,root) %{_bindir}/ocamlyacc | |
277 | %attr(755,root,root) %{_bindir}/scrapelabels | |
278 | %{_includedir}/caml | |
279 | %{_libdir}/%{name}/caml | |
280 | %dir %{_libdir}/%{name}/compiler-libs | |
281 | %{_libdir}/%{name}/compiler-libs/*.cm* | |
282 | %{_libdir}/%{name}/compiler-libs/ocaml*.a | |
283 | %{?with_ocaml_opt:%{_libdir}/%{name}/compiler-libs/*.o} | |
284 | %dir %{_libdir}/%{name}/ocamldoc | |
285 | %{_libdir}/%{name}/ocamldoc/*.hva | |
286 | %dir %{_libdir}/%{name}/threads | |
287 | %{_libdir}/%{name}/threads/*.cm* | |
288 | %{_libdir}/%{name}/threads/threads.a | |
289 | %{_libdir}/%{name}/*.a | |
290 | %{?with_ocaml_opt:%{_libdir}/%{name}/*.o} | |
291 | %{_libdir}/%{name}/*.cm* | |
292 | %{_libdir}/%{name}/Makefile.config | |
293 | %{_libdir}/%{name}/ld.conf | |
294 | %{_libdir}/%{name}/camlheader | |
295 | %{_libdir}/%{name}/camlheaderd | |
296 | %{_libdir}/%{name}/camlheaderi | |
297 | %{_libdir}/%{name}/camlheader_ur | |
298 | %attr(755,root,root) %{_libdir}/%{name}/expunge | |
299 | %attr(755,root,root) %{_libdir}/%{name}/extract_crc | |
300 | %{_mandir}/man1/ocaml.1* | |
301 | %{_mandir}/man1/ocamlc.1* | |
302 | %{?with_ocaml_opt:%{_mandir}/man1/ocamlc.opt.1*} | |
303 | %{_mandir}/man1/ocamlcp.1* | |
304 | %{_mandir}/man1/ocamldebug.1* | |
305 | %{_mandir}/man1/ocamldep.1* | |
306 | %{_mandir}/man1/ocamldoc.1* | |
307 | %{_mandir}/man1/ocamllex.1* | |
308 | %{_mandir}/man1/ocamlmktop.1* | |
309 | %{?with_ocaml_opt:%{_mandir}/man1/ocamlopt.1*} | |
310 | %{?with_ocaml_opt:%{_mandir}/man1/ocamlopt.opt.1*} | |
311 | %{_mandir}/man1/ocamloptp.1* | |
312 | %{_mandir}/man1/ocamlprof.1* | |
313 | %{_mandir}/man1/ocamlyacc.1* | |
314 | ||
315 | %files runtime | |
316 | %defattr(644,root,root,755) | |
317 | %attr(755,root,root) %{_bindir}/ocamlrun | |
318 | %attr(755,root,root) %{_bindir}/ocamlrund | |
319 | %attr(755,root,root) %{_bindir}/ocamlruni | |
320 | %dir %{_libdir}/%{name} | |
321 | %{_libdir}/%{name}/eventlog_metadata | |
322 | %{?with_ocaml_opt:%attr(755,root,root) %{_libdir}/%{name}/libasmrun_shared.so} | |
323 | %dir %{_libdir}/%{name}/stublibs | |
324 | %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllcamlstr.so | |
325 | %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllthreads.so | |
326 | %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllunix.so | |
327 | %attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so | |
328 | %{_mandir}/man1/ocamlrun.1* | |
329 | ||
330 | %files lib-source | |
331 | %defattr(644,root,root,755) | |
332 | %{_libdir}/%{name}/*.ml | |
333 | %{_libdir}/%{name}/*.mli | |
334 | %{_libdir}/%{name}/compiler-libs/*.mli | |
335 | %{_libdir}/%{name}/ocamldoc/*.mli | |
336 | %{_libdir}/%{name}/threads/*.mli | |
337 | ||
338 | %files doc-html | |
339 | %defattr(644,root,root,755) | |
340 | %doc docs/html/ocaml/* | |
341 | ||
342 | %files doc-info | |
343 | %defattr(644,root,root,755) | |
344 | %{_infodir}/ocaml.info* | |
345 | ||
346 | %files compiler-objects | |
347 | %defattr(644,root,root,755) | |
348 | %{_libdir}/%{name}/compiler | |
349 | ||
350 | %files ocamldoc-devel | |
351 | %defattr(644,root,root,755) | |
352 | %{_libdir}/%{name}/ocamldoc/*.cm* | |
353 | %{?with_ocaml_opt:%{_libdir}/%{name}/ocamldoc/*.a} | |
354 | ||
355 | %files examples | |
356 | %defattr(644,root,root,755) | |
357 | %{_examplesdir}/%{name}-%{version} |