3 %bcond_without emacs # without emacs subpackage
4 %bcond_without x # without X11 support
5 %bcond_without tk # without Tcl/Tk support
7 # --without x11 implies --without tk
8 %{!?with_x:%undefine with_tk}
13 Summary: The Objective Caml compiler and programming environment
14 Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
19 License: distributable
20 Vendor: Group of implementors <caml-light@inria.fr>
21 Group: Development/Languages
22 Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.bz2
23 # Source0-md5: 15a8c603b34d466329881285438349ef
24 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.html.tar.gz
25 # Source1-md5: 663b31c8ea364a531aa325a5b06a2763
26 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
27 # Source2-md5: 69c7acc08ee182c97089fe0736c04e37
28 Source3: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.html.tar.gz
29 # Source3-md5: 21370bae4e7f6435b38aeb21db7ce8bb
30 Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.dvi.gz
31 # Source4-md5: 035915d1a530aa7ec9b194d9a7d258eb
32 Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.html.tar.gz
33 # Source5-md5: 96d8eb4ca5abd58c9a280ba59f73b192
34 Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.dvi.gz
35 # Source6-md5: fcd87c235109364242a0c9ccf176dff8
36 Source7: http://www.ocaml.info/ocaml_sources/pure-fun-1.0.6.tar.bz2
37 # Source7-md5: 94eac3fa1ac51b8ada344b04839cb43c
38 Source8: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
39 # Source8-md5: 77fa1da7375dea1393cc0b6cd802d7e1
40 Source9: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
41 # Source9-md5: f80b52b8bc4b10ed557808fc899acf3a
42 Patch0: %{name}-build.patch
43 Patch1: %{name}-db3.patch
44 Patch2: %{name}-objinfo.patch
45 Patch3: %{name}-tk85support.patch
46 Patch4: %{name}-CFLAGS.patch
47 Patch5: %{name}-as_needed.patch
48 URL: http://caml.inria.fr/
49 BuildRequires: db-devel >= 4.1
50 %{?with_tk:BuildRequires: tk-devel}
51 %{?with_x:BuildRequires: xorg-lib-libX11-devel}
53 BuildRequires: sed >= 4.0
55 BuildRequires: xemacs-common
56 BuildRequires: xemacs-fsf-compat-pkg
58 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
59 Provides: ocaml-ocamldoc
60 Obsoletes: ocaml-ocamldoc
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 %define specflags -fno-strict-aliasing
66 Objective Caml is a high-level, strongly-typed, functional and
67 object-oriented programming language from the ML family of languages.
69 This package comprises two batch compilers (a fast bytecode compiler
70 and an optimizing native-code compiler), an interactive toplevel
71 system, Lex&Yacc tools, a replay debugger, and a comprehensive
74 %description -l pl.UTF-8
75 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym językiem
76 wysokiego poziomu z silnym typowaniem. Należy do rodziny języków ML.
78 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
79 oraz optymalizujący kompilator do kodu natywnego), interaktywne środowisko
80 pracy, narzędzia do tworzenia analizatorów leksykalnych oraz składniowych
81 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
84 Summary: Runtime system for OCaml
85 Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
89 This package contains binaries needed to run bytecode OCaml programs:
90 ocamlrun bytecode interpreter, and basic dynamic link libraries.
92 %description runtime -l pl.UTF-8
93 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
94 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
95 podstawowe biblioteki linkowane dynamicznie.
98 Summary: Sources of OCaml standard library
99 Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
100 Group: Development/Languages
101 Requires: %{name} = %{epoch}:%{version}-%{release}
103 %description lib-source
104 This sources come helpful during debugging of user programs with ocamldebug.
106 %description lib-source -l pl.UTF-8
107 Źródła te są przydatne przy odpluskwianiu programów użytkownika
108 z użyciem ocamldebug.
111 Summary: HTML documentation for OCaml
112 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
113 Group: Development/Tools
115 %description doc-html
116 HTML documentation for OCaml.
118 %description doc-html -l pl.UTF-8
119 Dokumentacja dla OCamla w formacie HTML.
122 Summary: PostScript documentation for OCaml
123 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie PostScript
124 Group: Development/Tools
127 PostScript documentation for OCaml.
129 %description doc-ps -l pl.UTF-8
130 Dokumentacja dla OCamla w formacie PostScript.
133 Summary: Info documentation for OCaml
134 Summary(pl.UTF-8): Dokumentacja info dla OCamla
135 Group: Development/Tools
137 %description doc-info
138 Info documentation for OCaml.
140 %description doc-info -l pl.UTF-8
141 Dokumentacja info dla OCamla.
144 Summary: Emacs mode for OCaml
145 Summary(pl.UTF-8): Tryb OCamla dla Emacsa
146 Group: Development/Tools
147 Requires: %{name} = %{epoch}:%{version}-%{release}
150 Emacs mode files for Objective Caml language.
152 %description emacs -l pl.UTF-8
153 Pliki trybu OCamla dla Emacsa.
156 Summary: Runtime for LablTk library
157 Summary(pl.UTF-8): Środowisko uruchomieniowe dla biblioteki LablTk
159 Requires: %{name} = %{epoch}:%{version}-%{release}
162 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
163 contains files needed to run bytecode OCaml programs using LablTk.
165 %description labltk -l pl.UTF-8
166 Biblioteka LablTk daje programom napisanym w OCamlu dostęp do widgetów
167 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
170 %package labltk-devel
171 Summary: LablTk library for OCaml
172 Summary(pl.UTF-8): Biblioteka LablTk dla OCamla
173 Group: Development/Libraries
174 Requires: %{name}-labltk = %{epoch}:%{version}-%{release}
176 %description labltk-devel
177 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
178 contains files needed to develop OCaml programs using LablTk.
180 %description labltk-devel -l pl.UTF-8
181 Biblioteka LablTk daje programom napisanym w OCamlu dostęp do widgetów
182 Tcl/Tk. Pakiet ten zawiera pliki niezbędne do tworzenia programów
186 Summary: X11 graphic output for OCaml
187 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
188 Group: Development/Libraries
189 Requires: %{name} = %{epoch}:%{version}-%{release}
191 %description x11graphics
192 x11graphics module gives OCaml program access to drawing in X11
193 windows. This package contains files needed to run bytecode OCaml
194 programs using x11graphics.
196 %description x11graphics -l pl.UTF-8
197 Moduł x11graphics daje programom napisanym w OCamlu możliwość
198 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
199 potrzebne do uruchamiania programów używających x11graphics.
201 %package x11graphics-devel
202 Summary: X11 graphic output for OCaml
203 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
204 Group: Development/Libraries
205 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
207 %description x11graphics-devel
208 x11graphics module gives OCaml program access to drawing in X11
209 windows. This package contains files needed to develop OCaml programs
212 %description x11graphics-devel -l pl.UTF-8
213 Moduł x11graphics daje programom napisanym w OCamlu możliwość
214 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
215 niezbędne do tworzenia programów używających x11graphics.
218 Summary: Objective Caml Preprocessor
219 Summary(pl.UTF-8): Preprocesor OCamla
220 Group: Development/Languages
221 Requires: %{name} = %{epoch}:%{version}-%{release}
222 Provides: camlp4 = %{epoch}:%{version}-%{release}
226 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
227 tools for syntax (grammars) and the ability to modify the concrete
228 syntax of the language (quotations, syntax extensions).
230 Camlp4 can parse normal Ocaml concrete syntax or any other
231 user-definable syntax. As an example, an alternative syntax is
232 provided, named revised, because it tries to fix some small problems
233 of the normal syntax.
235 Camlp4 can pretty print the normal Ocaml concrete syntax or the
236 revised one. It is therefore always possible to have a version of your
237 sources compilable by the Objective Caml compiler without
240 %description camlp4 -l pl.UTF-8
241 Camlp4 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania
242 składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni
243 języka (cytowania, rozszerzenia).
245 Camlp4 może sparsować oryginalną składnię Ocamla lub dowolną inną
246 definiowalną przez użytkownika. Jako przykład podana jest alternatywna
247 składnia (revised syntax), która próbuje poprawić drobne problemy
248 występujące w składni oryginalnej.
250 Camlp4 umie ładnie formatować źródła zarówno w oryginalnej jak i
251 poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej
254 %package camlp4-doc-html
255 Summary: Objective Caml Preprocessor - HTML documentation
256 Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja HTML
257 Group: Development/Languages
259 %description camlp4-doc-html
260 Objective Caml Preprocessor - HTML documentation.
262 %description camlp4-doc-html -l pl.UTF-8
263 Preprocesor OCamla - dokumentacja HTML.
265 %package compiler-objects
266 Summary: Compiled parts of OCaml compiler
267 Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
268 Group: Development/Languages
269 Requires: %{name} = %{epoch}:%{version}-%{release}
270 Obsoletes: ocaml-devel
271 Provides: ocaml-devel
273 %description compiler-objects
274 This package contains *.cmi and *.cmo files being parts of OCaml
275 compiler. They are needed to compile some programs.
277 %description compiler-objects -l pl.UTF-8
278 Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
279 OCamla. Są one wymagane do kompilacji niektórych programów.
281 %package ocamldoc-devel
282 Summary: Files needed to develop programs using ocamldoc
283 Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
284 Group: Development/Languages
285 Requires: %{name} = %{epoch}:%{version}-%{release}
287 %description ocamldoc-devel
288 You need this package if you are going to write ocamldoc front end or
291 %description ocamldoc-devel -l pl.UTF-8
292 Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
293 dla ocamldoc lub coś podobnego.
295 # maybe we'll want to add some more stuff here?
297 Summary: Example source code for OCaml
298 Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
299 Group: Development/Languages
300 Requires: %{name} = %{epoch}:%{version}-%{release}
302 %description examples
303 This packages contains sources for Okasaki's Purely Functional
304 Datastructures in OCaml, along with some contributions.
306 %description examples -l pl.UTF-8
307 Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych
308 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
311 %setup -q -a1 -a3 -a5
313 tar xjf %{SOURCE7} -C examples
314 tar xzf %{SOURCE8} -C examples
316 # order mess with docs somewhat
318 mv htmlman docs/html/ocaml
319 cp %{SOURCE2} docs/ocaml.ps.gz
320 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
321 cp %{SOURCE4} docs/camlp4.ps.gz
322 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
323 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
332 cp -f /usr/share/automake/config.sub config/gnu
336 -libdir %{_libdir}/%{name} \
337 -mandir %{_mandir}/man1 \
339 %{!?with_tk:-no-tk} \
343 %{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall"
344 %{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall" -j1
346 # broken build system
347 sed -e 's,LIBDIR,%{_libdir},' camlp4/man/camlp4.1.tpl > camlp4/man/camlp4.1
350 rm -rf $RPM_BUILD_ROOT
351 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
352 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
355 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
356 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
357 MANDIR=$RPM_BUILD_ROOT%{_mandir}
359 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
360 %{_libdir}/%{name}/stublibs
365 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
366 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
367 else echo xemacs; fi`" \
368 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
371 # symlink .opt versions of compilers (if present)
372 # warning: don't do that with camlp4 (can't load extensions then)
373 for f in ocamlc ocamlopt ocamldoc ocamllex; do
374 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
375 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
376 $RPM_BUILD_ROOT%{_bindir}/$f.byte
377 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
381 # move includes to the proper place
382 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
383 # but leave compatibility symlink
384 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
386 # compiled sources of compiler, needed by some programs
387 for f in {asm,byte}comp parsing typing utils ; do
388 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
389 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
392 # this isn't installed by default, but is useful
393 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
394 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
395 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
396 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
399 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
400 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
403 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
405 # broken build system
406 install camlp4/man/camlp4.1 $RPM_BUILD_ROOT%{_mandir}/man1
407 for f in camlp4o.1 camlp4r.1 mkcamlp4.1 camlp4o.opt.1 camlp4r.opt.1 ; do
408 echo '.so camlp4.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f
412 rm -rf $RPM_BUILD_ROOT
415 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
418 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
421 %defattr(644,root,root,755)
422 %doc LICENSE Changes README Upgrading
423 %attr(755,root,root) %{_bindir}/ocaml*
424 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
425 %exclude %{_bindir}/ocamlrun
426 %attr(755,root,root) %{_bindir}/*labels
428 %{_libdir}/%{name}/caml
429 %{_libdir}/%{name}/threads
430 %dir %{_libdir}/%{name}/vmthreads
431 %dir %{_libdir}/%{name}/vmthreads/*.cm*
432 %dir %{_libdir}/%{name}/vmthreads/*.a
433 %{_libdir}/%{name}/*.a
434 %{_libdir}/%{name}/*.o
435 %{_libdir}/%{name}/*.cm*
436 %exclude %{_libdir}/%{name}/*graphics*
437 %{_libdir}/%{name}/ld.conf
438 %{_libdir}/%{name}/camlheader
439 %{_libdir}/%{name}/camlheader_ur
440 %{_libdir}/%{name}/ocamlbuild
441 %dir %{_libdir}/%{name}/ocamldoc
442 %{_libdir}/%{name}/ocamldoc/*.hva
443 %attr(755,root,root) %{_libdir}/%{name}/expunge
444 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
445 %attr(755,root,root) %{_libdir}/%{name}/*labels
446 %{_mandir}/man1/*ocaml*
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_bindir}/ocamlrun
451 %dir %{_libdir}/%{name}
452 %dir %{_libdir}/%{name}/site-lib
453 %dir %{_libdir}/%{name}/stublibs
454 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
455 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
457 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
458 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
462 %defattr(644,root,root,755)
463 %{_libdir}/%{name}/*.ml
464 %{_libdir}/%{name}/*.mli
465 %{_libdir}/%{name}/*/*.mli
468 %defattr(644,root,root,755)
469 %doc docs/html/ocaml/*
472 %defattr(644,root,root,755)
476 %defattr(644,root,root,755)
477 %{_infodir}/ocaml.info*
479 # they are poor, html is much better
485 %defattr(644,root,root,755)
486 %{_datadir}/emacs/site-lisp/*.el*
491 %defattr(644,root,root,755)
492 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
493 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
496 %defattr(644,root,root,755)
497 %attr(755,root,root) %{_bindir}/labltk
498 %attr(755,root,root) %{_bindir}/ocamlbrowser
499 %dir %{_libdir}/%{name}/labltk
500 %{_libdir}/%{name}/labltk/*.cm*
501 %{_libdir}/%{name}/labltk/*.a
502 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
503 %{_examplesdir}/%{name}-labltk-%{version}
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
511 %files x11graphics-devel
512 %defattr(644,root,root,755)
513 %{_libdir}/%{name}/graphics*.cm*
514 %{_libdir}/%{name}/graphics.a
515 %{_libdir}/%{name}/libgraphics.a
519 %defattr(644,root,root,755)
520 %attr(755,root,root) %{_bindir}/camlp4*
521 %attr(755,root,root) %{_bindir}/mkcamlp4
522 %{_libdir}/%{name}/camlp4
523 %{_mandir}/man1/camlp4*.1*
524 %{_mandir}/man1/mkcamlp4.1*
526 %files camlp4-doc-html
527 %defattr(644,root,root,755)
528 %doc docs/html/camlp4*
530 %files compiler-objects
531 %defattr(644,root,root,755)
532 %{_libdir}/%{name}/compiler
534 %files ocamldoc-devel
535 %defattr(644,root,root,755)
536 %{_libdir}/%{name}/ocamldoc/*.cm*
537 %{_libdir}/%{name}/ocamldoc/*.a
540 %defattr(644,root,root,755)
541 %{_examplesdir}/%{name}-%{version}