3 %bcond_without emacs # emacs subpackage
4 %bcond_without x # X11 support
5 %bcond_without ocaml_opt # native, optimized compiler
7 # ppc64, sparc64 and x32 variants not supported currently
8 # alpha, hppa, ia64, mips removed since 4.00
9 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
10 %undefine with_ocaml_opt
15 Summary: The Objective Caml compiler and programming environment
16 Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
21 License: QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library)
22 Group: Development/Languages
23 Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.xz
24 # Source0-md5: 092139f2a256d1f3d2571f64ab475aa9
25 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman-html.tar.gz
26 # Source1-md5: 5c58a4fce99b20e02c3208ad956bcb9d
27 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
28 # Source2-md5: a408f706789b9b84b0eb68da3db05f15
29 Source3: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
30 # Source3-md5: 8c9df1da0e36a69817f43115fa87360c
31 Source4: https://github.com/mmottl/pure-fun/archive/v1.0.13/pure-fun-1.0.13.tar.gz
32 # Source4-md5: 0a6ff033df78d0880fe4883ace025ebe
34 Source5: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
35 # Source5-md5: 77fa1da7375dea1393cc0b6cd802d7e1
36 Patch1: %{name}-CFLAGS.patch
37 Patch2: %{name}-as_needed.patch
39 URL: http://caml.inria.fr/
40 %{?with_x:BuildRequires: xorg-lib-libX11-devel}
42 BuildRequires: sed >= 4.0
44 BuildRequires: emacs-common
46 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
47 Provides: ocaml-bytes-devel
48 Provides: ocaml-ocamldoc
49 Obsoletes: ocaml-ocamldoc
50 Obsoletes: ocaml-bytes-devel
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define specflags -fno-strict-aliasing
56 Objective Caml is a high-level, strongly-typed, functional and
57 object-oriented programming language from the ML family of languages.
59 This package comprises two batch compilers (a fast bytecode compiler
60 and an optimizing native-code compiler), an interactive toplevel
61 system, Lex&Yacc tools, a replay debugger, and a comprehensive
64 %description -l pl.UTF-8
65 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym
66 językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny
69 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
70 oraz optymalizujący kompilator do kodu natywnego), interaktywne
71 środowisko pracy, narzędzia do tworzenia analizatorów leksykalnych
72 oraz składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
76 Summary: Runtime system for OCaml
77 Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
81 This package contains binaries needed to run bytecode OCaml programs:
82 ocamlrun bytecode interpreter, and basic dynamic link libraries.
84 %description runtime -l pl.UTF-8
85 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
86 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun)
87 oraz podstawowe biblioteki linkowane dynamicznie.
90 Summary: Sources of OCaml standard library
91 Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
92 Group: Development/Languages
93 Requires: %{name} = %{epoch}:%{version}-%{release}
95 %description lib-source
96 This sources come helpful during debugging of user programs with
99 %description lib-source -l pl.UTF-8
100 Źródła te są przydatne przy odpluskwianiu programów użytkownika
101 z użyciem ocamldebug.
104 Summary: HTML documentation for OCaml
105 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
106 Group: Development/Tools
108 %description doc-html
109 HTML documentation for OCaml.
111 %description doc-html -l pl.UTF-8
112 Dokumentacja dla OCamla w formacie HTML.
115 Summary: PostScript documentation for OCaml
116 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie PostScript
117 Group: Development/Tools
120 PostScript documentation for OCaml.
122 %description doc-ps -l pl.UTF-8
123 Dokumentacja dla OCamla w formacie PostScript.
126 Summary: Info documentation for OCaml
127 Summary(pl.UTF-8): Dokumentacja info dla OCamla
128 Group: Development/Tools
130 %description doc-info
131 Info documentation for OCaml.
133 %description doc-info -l pl.UTF-8
134 Dokumentacja info dla OCamla.
137 Summary: Emacs mode for OCaml
138 Summary(pl.UTF-8): Tryb OCamla dla Emacsa
139 Group: Development/Tools
140 Requires: %{name} = %{epoch}:%{version}-%{release}
143 Emacs mode files for Objective Caml language.
145 %description emacs -l pl.UTF-8
146 Pliki trybu OCamla dla Emacsa.
149 Summary: X11 graphic output for OCaml
150 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
151 Group: Development/Libraries
152 Requires: %{name} = %{epoch}:%{version}-%{release}
154 %description x11graphics
155 x11graphics module gives OCaml program access to drawing in X11
156 windows. This package contains files needed to run bytecode OCaml
157 programs using x11graphics.
159 %description x11graphics -l pl.UTF-8
160 Moduł x11graphics daje programom napisanym w OCamlu możliwość
161 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
162 potrzebne do uruchamiania programów używających x11graphics.
164 %package x11graphics-devel
165 Summary: X11 graphic output for OCaml
166 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
167 Group: Development/Libraries
168 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
170 %description x11graphics-devel
171 x11graphics module gives OCaml program access to drawing in X11
172 windows. This package contains files needed to develop OCaml programs
175 %description x11graphics-devel -l pl.UTF-8
176 Moduł x11graphics daje programom napisanym w OCamlu możliwość
177 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
178 niezbędne do tworzenia programów używających x11graphics.
180 %package compiler-objects
181 Summary: Compiled parts of OCaml compiler
182 Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
183 Group: Development/Languages
184 Requires: %{name} = %{epoch}:%{version}-%{release}
185 Provides: ocaml-devel
186 Obsoletes: ocaml-devel
188 %description compiler-objects
189 This package contains *.cmi and *.cmo files being parts of OCaml
190 compiler. They are needed to compile some programs.
192 %description compiler-objects -l pl.UTF-8
193 Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
194 OCamla. Są one wymagane do kompilacji niektórych programów.
196 %package ocamldoc-devel
197 Summary: Files needed to develop programs using ocamldoc
198 Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
199 Group: Development/Languages
200 Requires: %{name} = %{epoch}:%{version}-%{release}
202 %description ocamldoc-devel
203 You need this package if you are going to write ocamldoc front end or
206 %description ocamldoc-devel -l pl.UTF-8
207 Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
208 dla ocamldoc lub coś podobnego.
210 # maybe we'll want to add some more stuff here?
212 Summary: Example source code for OCaml
213 Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
214 Group: Development/Languages
215 Requires: %{name} = %{epoch}:%{version}-%{release}
217 %description examples
218 This packages contains sources for Okasaki's Purely Functional
219 Datastructures in OCaml, along with some contributions.
221 %description examples -l pl.UTF-8
222 Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych
223 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
228 tar xzf %{SOURCE4} -C examples
229 tar xzf %{SOURCE5} -C examples
230 # order mess with docs somewhat
232 mv htmlman docs/html/ocaml
233 cp %{SOURCE2} docs/ocaml.ps.gz
239 cp -f /usr/share/automake/config.sub config/gnu
241 -host %{_target_platform} \
244 -libdir %{_libdir}/%{name} \
245 -mandir %{_mandir}/man1 \
249 %{__make} -j1 world bootstrap %{?with_ocaml_opt:opt.opt} \
250 CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT"
253 rm -rf $RPM_BUILD_ROOT
254 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
255 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
258 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
259 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
260 MANDIR=$RPM_BUILD_ROOT%{_mandir}
262 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
263 %{_libdir}/%{name}/stublibs
268 %{__make} -C emacs install \
269 DESTDIR=$RPM_BUILD_ROOT \
270 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp" \
274 # symlink .opt versions of compilers (if present)
275 for f in ocamlc ocamlopt ocamldoc ocamllex; do
276 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
277 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
278 $RPM_BUILD_ROOT%{_bindir}/$f.byte
279 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
283 # move includes to the proper place
284 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
285 # but leave compatibility symlink
286 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
288 # compiled sources of compiler, needed by some programs
289 for f in {asm,byte}comp parsing typing utils ; do
290 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
291 cp $f/*.{cmi,cmo} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
292 %{?with_ocaml_opt:cp $f/*.{cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f}
295 # this isn't installed by default, but is useful
296 #install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
297 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
298 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
301 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
304 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
307 rm -rf $RPM_BUILD_ROOT
309 %post doc-info -p /sbin/postshell
310 -/usr/sbin/fix-info-dir -c %{_infodir}
312 %postun doc-info -p /sbin/postshell
313 -/usr/sbin/fix-info-dir -c %{_infodir}
316 %defattr(644,root,root,755)
317 %doc Changes LICENSE README.adoc
318 %attr(755,root,root) %{_bindir}/addlabels
319 %attr(755,root,root) %{_bindir}/ocaml
320 %attr(755,root,root) %{_bindir}/ocamlc
321 %attr(755,root,root) %{_bindir}/ocamlc.byte
322 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.opt}
323 %attr(755,root,root) %{_bindir}/ocamlcp
324 %attr(755,root,root) %{_bindir}/ocamlcp.byte
325 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlcp.opt}
326 %attr(755,root,root) %{_bindir}/ocamldebug
327 %attr(755,root,root) %{_bindir}/ocamldep
328 %attr(755,root,root) %{_bindir}/ocamldep.byte
329 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldep.opt}
330 %attr(755,root,root) %{_bindir}/ocamldoc
331 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.opt}
332 %attr(755,root,root) %{_bindir}/ocamllex
333 %attr(755,root,root) %{_bindir}/ocamllex.byte
334 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamllex.opt}
335 %attr(755,root,root) %{_bindir}/ocamlmklib
336 %attr(755,root,root) %{_bindir}/ocamlmklib.byte
337 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmklib.opt}
338 %attr(755,root,root) %{_bindir}/ocamlmktop
339 %attr(755,root,root) %{_bindir}/ocamlmktop.byte
340 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmktop.opt}
341 %attr(755,root,root) %{_bindir}/ocamlobjinfo
342 %attr(755,root,root) %{_bindir}/ocamlobjinfo.byte
343 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlobjinfo.opt}
344 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt}
345 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.byte}
346 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.opt}
347 %attr(755,root,root) %{_bindir}/ocamloptp
348 %attr(755,root,root) %{_bindir}/ocamloptp.byte
349 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamloptp.opt}
350 %attr(755,root,root) %{_bindir}/ocamlprof
351 %attr(755,root,root) %{_bindir}/ocamlprof.byte
352 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlprof.opt}
353 %attr(755,root,root) %{_bindir}/ocamlyacc
354 %attr(755,root,root) %{_bindir}/scrapelabels
356 %{_libdir}/%{name}/caml
357 %{_libdir}/%{name}/compiler-libs
358 %{_libdir}/%{name}/threads
359 %dir %{_libdir}/%{name}/vmthreads
360 %dir %{_libdir}/%{name}/vmthreads/*.cm*
361 %dir %{_libdir}/%{name}/vmthreads/*.a
362 %{_libdir}/%{name}/*.a
363 %{?with_ocaml_opt:%{_libdir}/%{name}/*.o}
364 %{_libdir}/%{name}/*.cm*
365 %exclude %{_libdir}/%{name}/*graphics*
366 %{_libdir}/%{name}/Makefile.config
367 %{_libdir}/%{name}/ld.conf
368 %{_libdir}/%{name}/camlheader
369 %{_libdir}/%{name}/camlheader_ur
370 %dir %{_libdir}/%{name}/ocamldoc
371 %{_libdir}/%{name}/ocamldoc/*.hva
372 %attr(755,root,root) %{_libdir}/%{name}/expunge
373 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
374 %attr(755,root,root) %{_libdir}/%{name}/objinfo_helper
375 %{_mandir}/man1/ocaml*
376 %exclude %{_mandir}/man1/ocamlrun.1*
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_bindir}/ocamlrun
381 %dir %{_libdir}/%{name}
382 %{_libdir}/%{name}/VERSION
383 %dir %{_libdir}/%{name}/site-lib
384 %dir %{_libdir}/%{name}/stublibs
385 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
386 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
387 %{?with_ocaml_opt:%attr(755,root,root) %{_libdir}/%{name}/libasmrun_shared.so}
388 %attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
389 %{_mandir}/man1/ocamlrun.1*
392 %defattr(644,root,root,755)
393 %{_libdir}/%{name}/*.ml
394 %{_libdir}/%{name}/*.mli
395 %{_libdir}/%{name}/*/*.mli
398 %defattr(644,root,root,755)
399 %doc docs/html/ocaml/*
402 %defattr(644,root,root,755)
406 %defattr(644,root,root,755)
407 %{_infodir}/ocaml.info*
409 # they are poor, html is much better
415 %defattr(644,root,root,755)
416 %{_datadir}/emacs/site-lisp/*.el*
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
424 %files x11graphics-devel
425 %defattr(644,root,root,755)
426 %{_libdir}/%{name}/graphics*.cm*
427 %{?with_ocaml_opt:%{_libdir}/%{name}/graphics.a}
428 %{_libdir}/%{name}/libgraphics.a
431 %files compiler-objects
432 %defattr(644,root,root,755)
433 %{_libdir}/%{name}/compiler
435 %files ocamldoc-devel
436 %defattr(644,root,root,755)
437 %{_libdir}/%{name}/ocamldoc/*.cm*
438 %{?with_ocaml_opt:%{_libdir}/%{name}/ocamldoc/*.a}
441 %defattr(644,root,root,755)
442 %{_examplesdir}/%{name}-%{version}