3 %bcond_without emacs # without emacs subpackage
4 %bcond_without x # without X11 support
5 %bcond_without tk # without Tcl/Tk support
6 %bcond_with db3 # use db3 instead of db 4.x
8 # --without x11 implies --without tk
9 %{!?with_x:%undefine with_tk}
14 Summary: The Objective Caml compiler and programming environment
15 Summary(pl): Kompilator OCamla (Objective Caml) oraz ¶rodowisko programistyczne
20 License: distributable
21 Vendor: Group of implementors <caml-light@inria.fr>
22 Group: Development/Languages
23 Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.gz
24 # Source0-md5: 105d192896bf945b660c4fb1ee486f57
25 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.html.tar.gz
26 # Source1-md5: 0daee5643db6960682c1a7d84467885f
27 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
28 # Source2-md5: 35a5d4318456c0982e72ee3f33364bf5
29 Source3: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.html.tar.gz
30 # Source3-md5: 21370bae4e7f6435b38aeb21db7ce8bb
31 Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.dvi.gz
32 # Source4-md5: 035915d1a530aa7ec9b194d9a7d258eb
33 Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.html.tar.gz
34 # Source5-md5: 96d8eb4ca5abd58c9a280ba59f73b192
35 Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.dvi.gz
36 # Source6-md5: fcd87c235109364242a0c9ccf176dff8
37 Source7: http://www.ocaml.info/ocaml_sources/pure-fun-1.0.4.tar.bz2
38 # Source7-md5: 567bc681b4cc1cfcbbfb6fa5f012019b
39 Source8: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
40 # Source8-md5: 77fa1da7375dea1393cc0b6cd802d7e1
41 Source9: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
42 # Source9-md5: 49b68ec07ccd7ce45eb6bd3f3fdee140
43 Patch0: %{name}-build.patch
44 Patch1: %{name}-db3.patch
45 Patch2: %{name}-objinfo.patch
46 # needs update for ocaml 3.08
47 #Patch3: %{name}-unused-var-warning.patch
48 Patch4: %{name}-tk85support.patch
49 Patch5: %{name}-CFLAGS.patch
50 URL: http://caml.inria.fr/
51 %{?with_x:BuildRequires: XFree86-devel}
52 %{?with_db3:BuildRequires: db3-devel}
53 %{!?with_db3:BuildRequires: db-devel >= 4.1}
54 %{?with_tk:BuildRequires: tk-devel}
56 BuildRequires: sed >= 4.0
58 BuildRequires: xemacs-common
59 BuildRequires: xemacs-fsf-compat-pkg
61 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
62 Provides: ocaml-ocamldoc
63 Obsoletes: ocaml-ocamldoc
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 Objective Caml is a high-level, strongly-typed, functional and
68 object-oriented programming language from the ML family of languages.
70 This package comprises two batch compilers (a fast bytecode compiler
71 and an optimizing native-code compiler), an interactive toplevel
72 system, Lex&Yacc tools, a replay debugger, and a comprehensive
76 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
77 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
79 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
80 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
81 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
82 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
85 Summary: HTML documentation for OCaml
86 Summary(pl): Dokumentacja dla OCamla w formacie HTML
87 Group: Development/Tools
90 HTML documentation for OCaml.
92 %description doc-html -l pl
93 Dokumentacja dla OCamla w formacie HTML.
96 Summary: PostScript documentation for OCaml
97 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
98 Group: Development/Tools
101 PostScript documentation for OCaml.
103 %description doc-ps -l pl
104 Dokumentacja dla OCamla w formacie PostScript.
107 Summary: Info documentation for OCaml
108 Summary(pl): Dokumentacja info dla OCamla
109 Group: Development/Tools
111 %description doc-info
112 Info documentation for OCaml.
114 %description doc-info -l pl
115 Dokumentacja info dla OCamla.
118 Summary: Emacs mode for OCaml
119 Summary(pl): Tryb OCamla dla Emacsa
120 Group: Development/Tools
121 Requires: %{name} = %{epoch}:%{version}-%{release}
124 Emacs mode files for Objective Caml language.
126 %description emacs -l pl
127 Pliki trybu OCamla dla Emacsa.
130 Summary: Runtime system for OCaml
131 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
135 This package contains binaries needed to run bytecode OCaml programs:
136 ocamlrun bytecode interpreter, and basic dynamic link libraries.
138 %description runtime -l pl
139 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
140 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
141 podstawowe biblioteki linkowane dynamicznie.
143 %package labltk-devel
144 Summary: LablTk library for OCaml
145 Summary(pl): Biblioteka LablTk dla OCamla
146 Group: Development/Libraries
147 Requires: %{name}-labltk = %{epoch}:%{version}-%{release}
149 %description labltk-devel
150 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
151 contains files needed to develop OCaml programs using LablTk.
153 %description labltk-devel -l pl
154 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
155 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
159 Summary: Runtime for LablTk library
160 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
162 Requires: %{name} = %{epoch}:%{version}-%{release}
165 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
166 contains files needed to run bytecode OCaml programs using LablTk.
168 %description labltk -l pl
169 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
170 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
173 %package x11graphics-devel
174 Summary: X11 graphic output for OCaml
175 Summary(pl): Dostêp do X11 dla OCamla
176 Group: Development/Libraries
177 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
179 %description x11graphics-devel
180 x11graphics module gives OCaml program access to drawing in X11
181 windows. This package contains files needed to develop OCaml programs
184 %description x11graphics-devel -l pl
185 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
186 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
187 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
190 Summary: X11 graphic output for OCaml
191 Summary(pl): Dostêp do X11 dla OCamla
192 Group: Development/Libraries
193 Requires: %{name} = %{epoch}:%{version}-%{release}
195 %description x11graphics
196 x11graphics module gives OCaml program access to drawing in X11
197 windows. This package contains files needed to run bytecode OCaml
198 programs using x11graphics.
200 %description x11graphics -l pl
201 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
202 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
203 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
206 Summary: Objective Caml Preprocessor
207 Summary(pl): Preprocesor OCamla
208 Group: Development/Languages
209 Requires: %{name} = %{epoch}:%{version}-%{release}
210 Provides: camlp4 = %{epoch}:%{version}-%{release}
214 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
215 tools for syntax (grammars) and the ability to modify the concrete
216 syntax of the language (quotations, syntax extensions).
218 Camlp4 can parse normal Ocaml concrete syntax or any other
219 user-definable syntax. As an example, an alternative syntax is
220 provided, named revised, because it tries to fix some small problems
221 of the normal syntax.
223 Camlp4 can pretty print the normal Ocaml concrete syntax or the
224 revised one. It is therefore always possible to have a version of your
225 sources compilable by the Objective Caml compiler without
228 %description camlp4 -l pl
229 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
230 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
231 jêzyka (cytowania, rozszerzenia).
233 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
234 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
235 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
236 wystêpuj±ce w sk³adni oryginalnej.
238 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
239 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
242 %package camlp4-doc-html
243 Summary: Objective Caml Preprocessor - HTML documentation
244 Summary(pl): Preprocesor OCamla - dokumentacja HTML
245 Group: Development/Languages
247 %description camlp4-doc-html
248 Objective Caml Preprocessor - HTML documentation.
250 %description camlp4-doc-html -l pl
251 Preprocesor OCamla - dokumentacja HTML.
253 %package compiler-objects
254 Summary: Compiled parts of OCaml compiler
255 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
256 Group: Development/Languages
257 Requires: %{name} = %{epoch}:%{version}-%{release}
258 Obsoletes: ocaml-devel
259 Provides: ocaml-devel
261 %description compiler-objects
262 This package contains *.cmi and *.cmo files being parts of OCaml
263 compiler. They are needed to compile some programs.
265 %description compiler-objects -l pl
266 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce czê¶ciami kompilatora
267 OCamla. S± one wymagane do kompilacji niektórych programów.
269 %package ocamldoc-devel
270 Summary: Files needed to develop programs using ocamldoc
271 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
272 Group: Development/Languages
273 Requires: %{name} = %{epoch}:%{version}-%{release}
275 %description ocamldoc-devel
276 You need this package if you are going to write ocamldoc front end or
279 %description ocamldoc-devel -l pl
280 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
281 dla ocamldoc lub co¶ podobnego.
284 Summary: Sources of OCaml standard library
285 Summary(pl): ¬ród³a biblioteki standardowej OCamla
286 Group: Development/Languages
287 Requires: %{name} = %{epoch}:%{version}-%{release}
289 %description lib-source
290 This sources come helpful during debugging of user programs with ocamldebug.
292 %description lib-source -l pl
293 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
294 z u¿yciem ocamldebug.
296 # maybe we'll want to add some more stuff here?
298 Summary: Example source code for OCaml
299 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
300 Group: Development/Languages
301 Requires: %{name} = %{epoch}:%{version}-%{release}
303 %description examples
304 This packages contains sources for Okasaki's Purely Functional
305 Datastructures in OCaml, along with some contributions.
307 %description examples -l pl
308 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
309 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
312 %setup -q -a1 -a3 -a5
314 tar xjf %{SOURCE7} -C examples
315 tar xzf %{SOURCE8} -C examples
317 # order mess with docs somewhat
319 mv htmlman docs/html/ocaml
320 cp %{SOURCE2} docs/ocaml.ps.gz
321 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
322 cp %{SOURCE4} docs/camlp4.ps.gz
323 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
324 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
333 cp -f /usr/share/automake/config.sub config/gnu
337 -libdir %{_libdir}/%{name} \
338 -mandir %{_mandir}/man1 \
340 %{!?with_tk:-no-tk} \
342 -x11lib /usr/X11R6/%{_lib}
344 %{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall"
345 %{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall" -j1
348 rm -rf $RPM_BUILD_ROOT
349 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
352 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
353 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
354 MANDIR=$RPM_BUILD_ROOT%{_mandir}
356 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
357 %{_libdir}/%{name}/stublibs
362 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
363 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
364 else echo xemacs; fi`" \
365 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
368 # symlink .opt versions of compilers (if present)
369 # warning: don't do that with camlp4 (can't load extensions then)
370 for f in ocamlc ocamlopt ocamldoc ocamllex; do
371 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
372 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
373 $RPM_BUILD_ROOT%{_bindir}/$f.byte
374 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
378 # move includes to the proper place
379 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
380 # but leave compatibility symlink
381 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
383 # compiled sources of compiler, needed by some programs
384 for f in {asm,byte}comp parsing typing utils ; do
385 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
386 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
389 # this isn't installed by default, but is useful
390 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
391 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
392 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
393 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
396 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
397 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
400 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
403 rm -rf $RPM_BUILD_ROOT
406 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
409 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_bindir}/ocamlrun
414 %dir %{_libdir}/%{name}
415 %dir %{_libdir}/%{name}/stublibs
416 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
417 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
419 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
420 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
424 %defattr(644,root,root,755)
425 %doc LICENSE Changes README Upgrading
426 %attr(755,root,root) %{_bindir}/ocaml*
427 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
428 %exclude %{_bindir}/ocamlrun
429 %attr(755,root,root) %{_bindir}/*labels
431 %{_libdir}/%{name}/caml
432 %{_libdir}/%{name}/threads
433 %dir %{_libdir}/%{name}/vmthreads
434 %dir %{_libdir}/%{name}/vmthreads/*.cm*
435 %dir %{_libdir}/%{name}/vmthreads/*.a
436 %{_libdir}/%{name}/*.a
437 %{_libdir}/%{name}/*.o
438 %{_libdir}/%{name}/*.cm*
439 %exclude %{_libdir}/%{name}/*graphics*
440 %{_libdir}/%{name}/ld.conf
441 %{_libdir}/%{name}/camlheader
442 %{_libdir}/%{name}/camlheader_ur
443 %dir %{_libdir}/%{name}/ocamldoc
444 %{_libdir}/%{name}/ocamldoc/*.hva
445 %attr(755,root,root) %{_libdir}/%{name}/expunge
446 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
447 %attr(755,root,root) %{_libdir}/%{name}/*labels
448 %{_mandir}/man1/*ocaml*
451 %defattr(644,root,root,755)
452 %{_libdir}/%{name}/*.ml
453 %{_libdir}/%{name}/*.mli
454 %{_libdir}/%{name}/*/*.mli
457 %defattr(644,root,root,755)
458 %{_examplesdir}/%{name}-%{version}
460 # they are poor, html is much better
464 %files compiler-objects
465 %defattr(644,root,root,755)
466 %{_libdir}/%{name}/compiler
469 %defattr(644,root,root,755)
470 %attr(755,root,root) %{_bindir}/*camlp4*
471 %attr(755,root,root) %{_bindir}/ocpp
472 # Not installed since 3.05, is is needed?
473 #%attr(755,root,root) %{_bindir}/odyl
474 %{_libdir}/%{name}/camlp4
475 %{_mandir}/man*/*camlp4*
476 %{_mandir}/man*/*ocpp*
478 %files camlp4-doc-html
479 %defattr(644,root,root,755)
480 %doc docs/html/camlp4*
484 %defattr(644,root,root,755)
485 %attr(755,root,root) %{_bindir}/labltk
486 %attr(755,root,root) %{_bindir}/ocamlbrowser
487 %dir %{_libdir}/%{name}/labltk
488 %{_libdir}/%{name}/labltk/*.cm*
489 %{_libdir}/%{name}/labltk/*.a
490 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
491 %{_examplesdir}/%{name}-labltk-%{version}
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
496 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
500 %files x11graphics-devel
501 %defattr(644,root,root,755)
502 %{_libdir}/%{name}/graphics*.cm*
503 %{_libdir}/%{name}/graphics.a
504 %{_libdir}/%{name}/libgraphics.a
507 %defattr(644,root,root,755)
508 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
513 %defattr(644,root,root,755)
514 %{_datadir}/emacs/site-lisp/*.el*
517 %files ocamldoc-devel
518 %defattr(644,root,root,755)
519 %{_libdir}/%{name}/ocamldoc/*.cm*
520 %{_libdir}/%{name}/ocamldoc/*.a
523 %defattr(644,root,root,755)
524 %doc docs/html/ocaml/*
527 %defattr(644,root,root,755)
531 %defattr(644,root,root,755)
532 %{_infodir}/ocaml.info*