3 %bcond_without ocaml_opt # native, optimized compiler
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
13 Summary: The Objective Caml compiler and programming environment
14 Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
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
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)
46 %define specflags -fno-strict-aliasing
48 %if %{without ocaml_opt}
49 %define _noautoreq Backend_intf Inlining_decision_intf Simplify_boxed_integer_ops_intf
53 Objective Caml is a high-level, strongly-typed, functional and
54 object-oriented programming language from the ML family of languages.
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
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
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
73 Summary: Runtime system for OCaml
74 Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
78 This package contains binaries needed to run bytecode OCaml programs:
79 ocamlrun bytecode interpreter, and basic dynamic link libraries.
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.
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}
92 %description lib-source
93 This sources come helpful during debugging of user programs with
96 %description lib-source -l pl.UTF-8
97 Źródła te są przydatne przy odpluskwianiu programów użytkownika z
101 Summary: HTML documentation for OCaml
102 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
103 Group: Development/Tools
105 %description doc-html
106 HTML documentation for OCaml.
108 %description doc-html -l pl.UTF-8
109 Dokumentacja dla OCamla w formacie HTML.
112 Summary: Info documentation for OCaml
113 Summary(pl.UTF-8): Dokumentacja info dla OCamla
114 Group: Development/Tools
116 %description doc-info
117 Info documentation for OCaml.
119 %description doc-info -l pl.UTF-8
120 Dokumentacja info dla OCamla.
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
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.
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.
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}
144 %description ocamldoc-devel
145 You need this package if you are going to write ocamldoc front end or
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.
152 # maybe we'll want to add some more stuff here?
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}
159 %description examples
160 This packages contains sources for Okasaki's Purely Functional
161 Datastructures in OCaml, along with some contributions.
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.
170 gunzip infoman/ocaml.info.gz
174 tar xzf %{SOURCE4} -C examples
175 tar xzf %{SOURCE5} -C examples
176 # order mess with docs somewhat
178 %{__mv} htmlman docs/html/ocaml
184 --libdir=%{_libdir}/ocaml \
185 %{!?with_ocaml_opt:--disable-native-compiler}
189 %if %{with ocaml_opt}
195 rm -rf $RPM_BUILD_ROOT
196 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
199 DESTDIR=$RPM_BUILD_ROOT
201 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
202 %{_libdir}/%{name}/stublibs
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
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}
218 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
219 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
222 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
225 cp -p infoman/ocaml.info $RPM_BUILD_ROOT%{_infodir}
226 cp -p infoman/ocaml.info.body-*.gz $RPM_BUILD_ROOT%{_infodir}
229 rm -rf $RPM_BUILD_ROOT
231 %post doc-info -p /sbin/postshell
232 -/usr/sbin/fix-info-dir -c %{_infodir}
234 %postun doc-info -p /sbin/postshell
235 -/usr/sbin/fix-info-dir -c %{_infodir}
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
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*
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*
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
339 %defattr(644,root,root,755)
340 %doc docs/html/ocaml/*
343 %defattr(644,root,root,755)
344 %{_infodir}/ocaml.info*
346 %files compiler-objects
347 %defattr(644,root,root,755)
348 %{_libdir}/%{name}/compiler
350 %files ocamldoc-devel
351 %defattr(644,root,root,755)
352 %{_libdir}/%{name}/ocamldoc/*.cm*
353 %{?with_ocaml_opt:%{_libdir}/%{name}/ocamldoc/*.a}
356 %defattr(644,root,root,755)
357 %{_examplesdir}/%{name}-%{version}