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 URL: https://www.ocaml.org/
34 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
35 Provides: ocaml-bytes-devel
36 Provides: ocaml-ocamldoc
37 Obsoletes: ocaml-bytes-devel
38 Obsoletes: ocaml-doc-ps < 1:4.12
39 Obsoletes: ocaml-emacs < 1:4.12
40 Obsoletes: ocaml-ocamldoc
41 Obsoletes: ocaml-x11graphics < 1:4.12
42 Obsoletes: ocaml-x11graphics-devel < 1:4.12
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define specflags -fno-strict-aliasing
47 %if %{without ocaml_opt}
48 %define _noautoreq Backend_intf Inlining_decision_intf Simplify_boxed_integer_ops_intf
52 Objective Caml is a high-level, strongly-typed, functional and
53 object-oriented programming language from the ML family of languages.
55 This package comprises two batch compilers (a fast bytecode compiler
56 and an optimizing native-code compiler), an interactive toplevel
57 system, Lex&Yacc tools, a replay debugger, and a comprehensive
60 %description -l pl.UTF-8
61 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym
62 językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny
65 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu oraz
66 optymalizujący kompilator do kodu natywnego), interaktywne środowisko
67 pracy, narzędzia do tworzenia analizatorów leksykalnych oraz
68 składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
72 Summary: Runtime system for OCaml
73 Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
77 This package contains binaries needed to run bytecode OCaml programs:
78 ocamlrun bytecode interpreter, and basic dynamic link libraries.
80 %description runtime -l pl.UTF-8
81 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
82 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun)
83 oraz podstawowe biblioteki linkowane dynamicznie.
86 Summary: Sources of OCaml standard library
87 Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
88 Group: Development/Languages
89 Requires: %{name} = %{epoch}:%{version}-%{release}
91 %description lib-source
92 This sources come helpful during debugging of user programs with
95 %description lib-source -l pl.UTF-8
96 Źródła te są przydatne przy odpluskwianiu programów użytkownika z
100 Summary: HTML documentation for OCaml
101 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
102 Group: Development/Tools
104 %description doc-html
105 HTML documentation for OCaml.
107 %description doc-html -l pl.UTF-8
108 Dokumentacja dla OCamla w formacie HTML.
111 Summary: Info documentation for OCaml
112 Summary(pl.UTF-8): Dokumentacja info dla OCamla
113 Group: Development/Tools
115 %description doc-info
116 Info documentation for OCaml.
118 %description doc-info -l pl.UTF-8
119 Dokumentacja info dla OCamla.
121 %package compiler-objects
122 Summary: Compiled parts of OCaml compiler
123 Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
124 Group: Development/Languages
125 Requires: %{name} = %{epoch}:%{version}-%{release}
126 Provides: ocaml-devel
127 Obsoletes: ocaml-devel
129 %description compiler-objects
130 This package contains *.cmi and *.cmo files being parts of OCaml
131 compiler. They are needed to compile some programs.
133 %description compiler-objects -l pl.UTF-8
134 Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
135 OCamla. Są one wymagane do kompilacji niektórych programów.
137 %package ocamldoc-devel
138 Summary: Files needed to develop programs using ocamldoc
139 Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
140 Group: Development/Languages
141 Requires: %{name} = %{epoch}:%{version}-%{release}
143 %description ocamldoc-devel
144 You need this package if you are going to write ocamldoc front end or
147 %description ocamldoc-devel -l pl.UTF-8
148 Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
149 dla ocamldoc lub coś podobnego.
151 # maybe we'll want to add some more stuff here?
153 Summary: Example source code for OCaml
154 Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
155 Group: Development/Languages
156 Requires: %{name} = %{epoch}:%{version}-%{release}
158 %description examples
159 This packages contains sources for Okasaki's Purely Functional
160 Datastructures in OCaml, along with some contributions.
162 %description examples -l pl.UTF-8
163 Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych autorstwa
164 Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
171 tar xzf %{SOURCE4} -C examples
172 tar xzf %{SOURCE5} -C examples
173 # order mess with docs somewhat
175 %{__mv} htmlman docs/html/ocaml
181 --libdir=%{_libdir}/ocaml \
182 %{!?with_ocaml_opt:--disable-native-compiler}
186 %if %{with ocaml_opt}
192 rm -rf $RPM_BUILD_ROOT
193 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
196 DESTDIR=$RPM_BUILD_ROOT
198 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
199 %{_libdir}/%{name}/stublibs
203 # move includes to the proper place
204 %{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/caml $RPM_BUILD_ROOT%{_includedir}/caml
205 # but leave compatibility symlink
206 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/ocaml/caml
208 # compiled sources of compiler, needed by some programs
209 for f in %{?with_ocaml_opt:asmcomp} bytecomp parsing typing utils ; do
210 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
211 cp $f/*.{cmi,cmo} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
212 %{?with_ocaml_opt:cp $f/*.{cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f}
215 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
216 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
219 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
222 cp -p infoman/ocaml.info{,.body-*}.gz $RPM_BUILD_ROOT%{_infodir}
225 rm -rf $RPM_BUILD_ROOT
227 %post doc-info -p /sbin/postshell
228 -/usr/sbin/fix-info-dir -c %{_infodir}
230 %postun doc-info -p /sbin/postshell
231 -/usr/sbin/fix-info-dir -c %{_infodir}
234 %defattr(644,root,root,755)
235 %doc Changes LICENSE README.adoc
236 %attr(755,root,root) %{_bindir}/addlabels
237 %attr(755,root,root) %{_bindir}/ocaml
238 %attr(755,root,root) %{_bindir}/ocamlc
239 %attr(755,root,root) %{_bindir}/ocamlc.byte
240 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.opt}
241 %attr(755,root,root) %{_bindir}/ocamlcmt
242 %attr(755,root,root) %{_bindir}/ocamlcp
243 %attr(755,root,root) %{_bindir}/ocamlcp.byte
244 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlcp.opt}
245 %attr(755,root,root) %{_bindir}/ocamldebug
246 %attr(755,root,root) %{_bindir}/ocamldep
247 %attr(755,root,root) %{_bindir}/ocamldep.byte
248 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldep.opt}
249 %attr(755,root,root) %{_bindir}/ocamldoc
250 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.opt}
251 %attr(755,root,root) %{_bindir}/ocamllex
252 %attr(755,root,root) %{_bindir}/ocamllex.byte
253 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamllex.opt}
254 %attr(755,root,root) %{_bindir}/ocamlmklib
255 %attr(755,root,root) %{_bindir}/ocamlmklib.byte
256 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmklib.opt}
257 %attr(755,root,root) %{_bindir}/ocamlmktop
258 %attr(755,root,root) %{_bindir}/ocamlmktop.byte
259 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmktop.opt}
260 %attr(755,root,root) %{_bindir}/ocamlobjinfo
261 %attr(755,root,root) %{_bindir}/ocamlobjinfo.byte
262 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlobjinfo.opt}
263 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt}
264 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.byte}
265 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.opt}
266 %attr(755,root,root) %{_bindir}/ocamloptp
267 %attr(755,root,root) %{_bindir}/ocamloptp.byte
268 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamloptp.opt}
269 %attr(755,root,root) %{_bindir}/ocamlprof
270 %attr(755,root,root) %{_bindir}/ocamlprof.byte
271 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlprof.opt}
272 %attr(755,root,root) %{_bindir}/ocamlyacc
273 %attr(755,root,root) %{_bindir}/scrapelabels
275 %{_libdir}/%{name}/caml
276 %{_libdir}/%{name}/compiler-libs
277 %{_libdir}/%{name}/threads
278 %{_libdir}/%{name}/*.a
279 %{?with_ocaml_opt:%{_libdir}/%{name}/*.o}
280 %{_libdir}/%{name}/*.cm*
281 %{_libdir}/%{name}/Makefile.config
282 %{_libdir}/%{name}/ld.conf
283 %{_libdir}/%{name}/camlheader
284 %{_libdir}/%{name}/camlheaderd
285 %{_libdir}/%{name}/camlheaderi
286 %{_libdir}/%{name}/camlheader_ur
287 %dir %{_libdir}/%{name}/ocamldoc
288 %{_libdir}/%{name}/ocamldoc/*.hva
289 %attr(755,root,root) %{_libdir}/%{name}/expunge
290 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
291 %{_mandir}/man1/ocaml*
292 %exclude %{_mandir}/man1/ocamlrun.1*
295 %defattr(644,root,root,755)
296 %attr(755,root,root) %{_bindir}/ocamlrun
297 %attr(755,root,root) %{_bindir}/ocamlrund
298 %attr(755,root,root) %{_bindir}/ocamlruni
299 %dir %{_libdir}/%{name}
300 %dir %{_libdir}/%{name}/stublibs
301 %{_libdir}/%{name}/eventlog_metadata
302 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
303 %{?with_ocaml_opt:%attr(755,root,root) %{_libdir}/%{name}/libasmrun_shared.so}
304 %attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
305 %{_mandir}/man1/ocamlrun.1*
308 %defattr(644,root,root,755)
309 %{_libdir}/%{name}/*.ml
310 %{_libdir}/%{name}/*.mli
311 %{_libdir}/%{name}/*/*.mli
314 %defattr(644,root,root,755)
315 %doc docs/html/ocaml/*
318 %defattr(644,root,root,755)
319 %{_infodir}/ocaml.info*
321 %files compiler-objects
322 %defattr(644,root,root,755)
323 %{_libdir}/%{name}/compiler
325 %files ocamldoc-devel
326 %defattr(644,root,root,755)
327 %{_libdir}/%{name}/ocamldoc/*.cm*
328 %{?with_ocaml_opt:%{_libdir}/%{name}/ocamldoc/*.a}
331 %defattr(644,root,root,755)
332 %{_examplesdir}/%{name}-%{version}