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 URL: http://caml.inria.fr/
50 %{?with_x:BuildRequires: XFree86-devel}
51 %{?with_db3:BuildRequires: db3-devel}
52 %{!?with_db3:BuildRequires: db-devel >= 4.1}
53 %{?with_tk:BuildRequires: tk-devel}
55 BuildRequires: sed >= 4.0
57 BuildRequires: xemacs-common
58 BuildRequires: xemacs-fsf-compat-pkg
60 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
61 Provides: ocaml-ocamldoc
62 Obsoletes: ocaml-ocamldoc
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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: HTML documentation for OCaml
85 Summary(pl): Dokumentacja dla OCamla w formacie HTML
86 Group: Development/Tools
89 HTML documentation for OCaml.
91 %description doc-html -l pl
92 Dokumentacja dla OCamla w formacie HTML.
95 Summary: PostScript documentation for OCaml
96 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
97 Group: Development/Tools
100 PostScript documentation for OCaml.
102 %description doc-ps -l pl
103 Dokumentacja dla OCamla w formacie PostScript.
106 Summary: Info documentation for OCaml
107 Summary(pl): Dokumentacja info dla OCamla
108 Group: Development/Tools
110 %description doc-info
111 Info documentation for OCaml.
113 %description doc-info -l pl
114 Dokumentacja info dla OCamla.
117 Summary: Emacs mode for OCaml
118 Summary(pl): Tryb OCamla dla Emacsa
119 Group: Development/Tools
120 Requires: %{name} = %{epoch}:%{version}-%{release}
123 Emacs mode files for Objective Caml language.
125 %description emacs -l pl
126 Pliki trybu OCamla dla Emacsa.
129 Summary: Runtime system for OCaml
130 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
134 This package contains binaries needed to run bytecode OCaml programs:
135 ocamlrun bytecode interpreter, and basic dynamic link libraries.
137 %description runtime -l pl
138 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
139 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
140 podstawowe biblioteki linkowane dynamicznie.
142 %package labltk-devel
143 Summary: LablTk library for OCaml
144 Summary(pl): Biblioteka LablTk dla OCamla
145 Group: Development/Libraries
146 Requires: %{name}-labltk = %{epoch}:%{version}-%{release}
148 %description labltk-devel
149 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
150 contains files needed to develop OCaml programs using LablTk.
152 %description labltk-devel -l pl
153 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
154 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
158 Summary: Runtime for LablTk library
159 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
161 Requires: %{name} = %{epoch}:%{version}-%{release}
164 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
165 contains files needed to run bytecode OCaml programs using LablTk.
167 %description labltk -l pl
168 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
169 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
172 %package x11graphics-devel
173 Summary: X11 graphic output for OCaml
174 Summary(pl): Dostêp do X11 dla OCamla
175 Group: Development/Libraries
176 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
178 %description x11graphics-devel
179 x11graphics module gives OCaml program access to drawing in X11
180 windows. This package contains files needed to develop OCaml programs
183 %description x11graphics-devel -l pl
184 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
185 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
186 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
189 Summary: X11 graphic output for OCaml
190 Summary(pl): Dostêp do X11 dla OCamla
191 Group: Development/Libraries
192 Requires: %{name} = %{epoch}:%{version}-%{release}
194 %description x11graphics
195 x11graphics module gives OCaml program access to drawing in X11
196 windows. This package contains files needed to run bytecode OCaml
197 programs using x11graphics.
199 %description x11graphics -l pl
200 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
201 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
202 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
205 Summary: Objective Caml Preprocessor
206 Summary(pl): Preprocesor OCamla
207 Group: Development/Languages
208 Requires: %{name} = %{epoch}:%{version}-%{release}
209 Provides: camlp4 = %{epoch}:%{version}-%{release}
213 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
214 tools for syntax (grammars) and the ability to modify the concrete
215 syntax of the language (quotations, syntax extensions).
217 Camlp4 can parse normal Ocaml concrete syntax or any other
218 user-definable syntax. As an example, an alternative syntax is
219 provided, named revised, because it tries to fix some small problems
220 of the normal syntax.
222 Camlp4 can pretty print the normal Ocaml concrete syntax or the
223 revised one. It is therefore always possible to have a version of your
224 sources compilable by the Objective Caml compiler without
227 %description camlp4 -l pl
228 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
229 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
230 jêzyka (cytowania, rozszerzenia).
232 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
233 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
234 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
235 wystêpuj±ce w sk³adni oryginalnej.
237 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
238 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
241 %package camlp4-doc-html
242 Summary: Objective Caml Preprocessor - HTML documentation
243 Summary(pl): Preprocesor OCamla - dokumentacja HTML
244 Group: Development/Languages
246 %description camlp4-doc-html
247 Objective Caml Preprocessor - HTML documentation.
249 %description camlp4-doc-html -l pl
250 Preprocesor OCamla - dokumentacja HTML.
252 %package compiler-objects
253 Summary: Compiled parts of OCaml compiler
254 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
255 Group: Development/Languages
256 Requires: %{name} = %{epoch}:%{version}-%{release}
257 Obsoletes: ocaml-devel
258 Provides: ocaml-devel
260 %description compiler-objects
261 This package contains *.cmi and *.cmo files being parts of OCaml
262 compiler. They are needed to compile some programs.
264 %description compiler-objects -l pl
265 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce czê¶ciami kompilatora
266 OCamla. S± one wymagane do kompilacji niektórych programów.
268 %package ocamldoc-devel
269 Summary: Files needed to develop programs using ocamldoc
270 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
271 Group: Development/Languages
272 Requires: %{name} = %{epoch}:%{version}-%{release}
274 %description ocamldoc-devel
275 You need this package if you are going to write ocamldoc front end or
278 %description ocamldoc-devel -l pl
279 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
280 dla ocamldoc lub co¶ podobnego.
283 Summary: Sources of OCaml standard library
284 Summary(pl): ¬ród³a biblioteki standardowej OCamla
285 Group: Development/Languages
286 Requires: %{name} = %{epoch}:%{version}-%{release}
288 %description lib-source
289 This sources come helpful during debugging of user programs with ocamldebug.
291 %description lib-source -l pl
292 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
293 z u¿yciem ocamldebug.
295 # maybe we'll want to add some more stuff here?
297 Summary: Example source code for OCaml
298 Summary(pl): 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
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
330 # allow pass CFLAGS, replace -O, -pg,-DPROFILING with $(CFAGS)
331 Makefiles=$(find . -type f -name Makefile\*)
332 %{__sed} -i -e 's@^CFLAGS[ \t]*=@override CFLAGS += @' $Makefiles
333 %{__sed} -i -e 's@\(^override CFLAGS += .*\)-O \(.*\)@\1\2@' $Makefiles
334 %{__sed} -i -e 's@^CCFLAGS[ \t]*=\(.*\)@override CCFLAGS += \1 $(CFLAGS)@' $Makefiles
335 %{__sed} -i -e 's@-pg -O -DPROFILING@ $(CFLAGS) @' asmrun/Makefile
336 %{__sed} -i -e 's@-O@$(CFLAGS)@' otherlibs/systhreads/Makefile
339 cp -f /usr/share/automake/config.sub config/gnu
343 -libdir %{_libdir}/%{name} \
344 -mandir %{_mandir}/man1 \
346 %{!?with_tk:-no-tk} \
348 -x11lib /usr/X11R6/%{_lib}
350 %{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall"
351 %{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall" -j1
354 rm -rf $RPM_BUILD_ROOT
355 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
358 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
359 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
360 MANDIR=$RPM_BUILD_ROOT%{_mandir}
362 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
363 %{_libdir}/%{name}/stublibs
368 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
369 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
370 else echo xemacs; fi`" \
371 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
374 # symlink .opt versions of compilers (if present)
375 # warning: don't do that with camlp4 (can't load extensions then)
376 for f in ocamlc ocamlopt ocamldoc ocamllex; do
377 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
378 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
379 $RPM_BUILD_ROOT%{_bindir}/$f.byte
380 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
384 # move includes to the proper place
385 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
386 # but leave compatibility symlink
387 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
389 # compiled sources of compiler, needed by some programs
390 for f in {asm,byte}comp parsing typing utils ; do
391 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
392 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
395 # this isn't installed by default, but is useful
396 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
397 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
398 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
399 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
402 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
403 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
406 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
409 rm -rf $RPM_BUILD_ROOT
412 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
415 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_bindir}/ocamlrun
420 %dir %{_libdir}/%{name}
421 %dir %{_libdir}/%{name}/stublibs
422 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
423 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
425 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
426 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
430 %defattr(644,root,root,755)
431 %doc LICENSE Changes README Upgrading
432 %attr(755,root,root) %{_bindir}/ocaml*
433 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
434 %exclude %{_bindir}/ocamlrun
435 %attr(755,root,root) %{_bindir}/*labels
437 %{_libdir}/%{name}/caml
438 %{_libdir}/%{name}/threads
439 %dir %{_libdir}/%{name}/vmthreads
440 %dir %{_libdir}/%{name}/vmthreads/*.cm*
441 %dir %{_libdir}/%{name}/vmthreads/*.a
442 %{_libdir}/%{name}/*.a
443 %{_libdir}/%{name}/*.o
444 %{_libdir}/%{name}/*.cm*
445 %exclude %{_libdir}/%{name}/*graphics*
446 %{_libdir}/%{name}/ld.conf
447 %{_libdir}/%{name}/camlheader
448 %{_libdir}/%{name}/camlheader_ur
449 %dir %{_libdir}/%{name}/ocamldoc
450 %{_libdir}/%{name}/ocamldoc/*.hva
451 %attr(755,root,root) %{_libdir}/%{name}/expunge
452 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
453 %attr(755,root,root) %{_libdir}/%{name}/*labels
454 %{_mandir}/man1/*ocaml*
457 %defattr(644,root,root,755)
458 %{_libdir}/%{name}/*.ml
459 %{_libdir}/%{name}/*.mli
460 %{_libdir}/%{name}/*/*.mli
463 %defattr(644,root,root,755)
464 %{_examplesdir}/%{name}-%{version}
466 # they are poor, html is much better
470 %files compiler-objects
471 %defattr(644,root,root,755)
472 %{_libdir}/%{name}/compiler
475 %defattr(644,root,root,755)
476 %attr(755,root,root) %{_bindir}/*camlp4*
477 %attr(755,root,root) %{_bindir}/ocpp
478 # Not installed since 3.05, is is needed?
479 #%attr(755,root,root) %{_bindir}/odyl
480 %{_libdir}/%{name}/camlp4
481 %{_mandir}/man*/*camlp4*
482 %{_mandir}/man*/*ocpp*
484 %files camlp4-doc-html
485 %defattr(644,root,root,755)
486 %doc docs/html/camlp4*
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_bindir}/labltk
492 %attr(755,root,root) %{_bindir}/ocamlbrowser
493 %dir %{_libdir}/%{name}/labltk
494 %{_libdir}/%{name}/labltk/*.cm*
495 %{_libdir}/%{name}/labltk/*.a
496 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
497 %{_examplesdir}/%{name}-labltk-%{version}
500 %defattr(644,root,root,755)
501 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
502 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
506 %files x11graphics-devel
507 %defattr(644,root,root,755)
508 %{_libdir}/%{name}/graphics*.cm*
509 %{_libdir}/%{name}/graphics.a
510 %{_libdir}/%{name}/libgraphics.a
513 %defattr(644,root,root,755)
514 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
519 %defattr(644,root,root,755)
520 %{_datadir}/emacs/site-lisp/*.el*
523 %files ocamldoc-devel
524 %defattr(644,root,root,755)
525 %{_libdir}/%{name}/ocamldoc/*.cm*
526 %{_libdir}/%{name}/ocamldoc/*.a
529 %defattr(644,root,root,755)
530 %doc docs/html/ocaml/*
533 %defattr(644,root,root,755)
537 %defattr(644,root,root,755)
538 %{_infodir}/ocaml.info*