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.bz2
24 # Source0-md5: 63428ce7e114520e8f529c9ca809a1b0
25 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.html.tar.gz
26 # Source1-md5: b25eb211bf91bcaa536b12d12731ceec
27 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
28 # Source2-md5: 598bb8e86329afe1ae374385b2e177e7
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: 280160b1fc7c8513074c3fda0446de29
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: Runtime system for OCaml
86 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
90 This package contains binaries needed to run bytecode OCaml programs:
91 ocamlrun bytecode interpreter, and basic dynamic link libraries.
93 %description runtime -l pl
94 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
95 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
96 podstawowe biblioteki linkowane dynamicznie.
99 Summary: Sources of OCaml standard library
100 Summary(pl): ¬ród³a biblioteki standardowej OCamla
101 Group: Development/Languages
102 Requires: %{name} = %{epoch}:%{version}-%{release}
104 %description lib-source
105 This sources come helpful during debugging of user programs with ocamldebug.
107 %description lib-source -l pl
108 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
109 z u¿yciem ocamldebug.
112 Summary: HTML documentation for OCaml
113 Summary(pl): Dokumentacja dla OCamla w formacie HTML
114 Group: Development/Tools
116 %description doc-html
117 HTML documentation for OCaml.
119 %description doc-html -l pl
120 Dokumentacja dla OCamla w formacie HTML.
123 Summary: PostScript documentation for OCaml
124 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
125 Group: Development/Tools
128 PostScript documentation for OCaml.
130 %description doc-ps -l pl
131 Dokumentacja dla OCamla w formacie PostScript.
134 Summary: Info documentation for OCaml
135 Summary(pl): Dokumentacja info dla OCamla
136 Group: Development/Tools
138 %description doc-info
139 Info documentation for OCaml.
141 %description doc-info -l pl
142 Dokumentacja info dla OCamla.
145 Summary: Emacs mode for OCaml
146 Summary(pl): Tryb OCamla dla Emacsa
147 Group: Development/Tools
148 Requires: %{name} = %{epoch}:%{version}-%{release}
151 Emacs mode files for Objective Caml language.
153 %description emacs -l pl
154 Pliki trybu OCamla dla Emacsa.
157 Summary: Runtime for LablTk library
158 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
160 Requires: %{name} = %{epoch}:%{version}-%{release}
163 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
164 contains files needed to run bytecode OCaml programs using LablTk.
166 %description labltk -l pl
167 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
168 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
171 %package labltk-devel
172 Summary: LablTk library for OCaml
173 Summary(pl): Biblioteka LablTk dla OCamla
174 Group: Development/Libraries
175 Requires: %{name}-labltk = %{epoch}:%{version}-%{release}
177 %description labltk-devel
178 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
179 contains files needed to develop OCaml programs using LablTk.
181 %description labltk-devel -l pl
182 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
183 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
187 Summary: X11 graphic output for OCaml
188 Summary(pl): Dostêp do X11 dla OCamla
189 Group: Development/Libraries
190 Requires: %{name} = %{epoch}:%{version}-%{release}
192 %description x11graphics
193 x11graphics module gives OCaml program access to drawing in X11
194 windows. This package contains files needed to run bytecode OCaml
195 programs using x11graphics.
197 %description x11graphics -l pl
198 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
199 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
200 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
202 %package x11graphics-devel
203 Summary: X11 graphic output for OCaml
204 Summary(pl): Dostêp do X11 dla OCamla
205 Group: Development/Libraries
206 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
208 %description x11graphics-devel
209 x11graphics module gives OCaml program access to drawing in X11
210 windows. This package contains files needed to develop OCaml programs
213 %description x11graphics-devel -l pl
214 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
215 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
216 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
219 Summary: Objective Caml Preprocessor
220 Summary(pl): Preprocesor OCamla
221 Group: Development/Languages
222 Requires: %{name} = %{epoch}:%{version}-%{release}
223 Provides: camlp4 = %{epoch}:%{version}-%{release}
227 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
228 tools for syntax (grammars) and the ability to modify the concrete
229 syntax of the language (quotations, syntax extensions).
231 Camlp4 can parse normal Ocaml concrete syntax or any other
232 user-definable syntax. As an example, an alternative syntax is
233 provided, named revised, because it tries to fix some small problems
234 of the normal syntax.
236 Camlp4 can pretty print the normal Ocaml concrete syntax or the
237 revised one. It is therefore always possible to have a version of your
238 sources compilable by the Objective Caml compiler without
241 %description camlp4 -l pl
242 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
243 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
244 jêzyka (cytowania, rozszerzenia).
246 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
247 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
248 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
249 wystêpuj±ce w sk³adni oryginalnej.
251 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
252 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
255 %package camlp4-doc-html
256 Summary: Objective Caml Preprocessor - HTML documentation
257 Summary(pl): Preprocesor OCamla - dokumentacja HTML
258 Group: Development/Languages
260 %description camlp4-doc-html
261 Objective Caml Preprocessor - HTML documentation.
263 %description camlp4-doc-html -l pl
264 Preprocesor OCamla - dokumentacja HTML.
266 %package compiler-objects
267 Summary: Compiled parts of OCaml compiler
268 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
269 Group: Development/Languages
270 Requires: %{name} = %{epoch}:%{version}-%{release}
271 Obsoletes: ocaml-devel
272 Provides: ocaml-devel
274 %description compiler-objects
275 This package contains *.cmi and *.cmo files being parts of OCaml
276 compiler. They are needed to compile some programs.
278 %description compiler-objects -l pl
279 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce czê¶ciami kompilatora
280 OCamla. S± one wymagane do kompilacji niektórych programów.
282 %package ocamldoc-devel
283 Summary: Files needed to develop programs using ocamldoc
284 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
285 Group: Development/Languages
286 Requires: %{name} = %{epoch}:%{version}-%{release}
288 %description ocamldoc-devel
289 You need this package if you are going to write ocamldoc front end or
292 %description ocamldoc-devel -l pl
293 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
294 dla ocamldoc lub co¶ podobnego.
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 %doc LICENSE Changes README Upgrading
414 %attr(755,root,root) %{_bindir}/ocaml*
415 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
416 %exclude %{_bindir}/ocamlrun
417 %attr(755,root,root) %{_bindir}/*labels
419 %{_libdir}/%{name}/caml
420 %{_libdir}/%{name}/threads
421 %dir %{_libdir}/%{name}/vmthreads
422 %dir %{_libdir}/%{name}/vmthreads/*.cm*
423 %dir %{_libdir}/%{name}/vmthreads/*.a
424 %{_libdir}/%{name}/*.a
425 %{_libdir}/%{name}/*.o
426 %{_libdir}/%{name}/*.cm*
427 %exclude %{_libdir}/%{name}/*graphics*
428 %{_libdir}/%{name}/ld.conf
429 %{_libdir}/%{name}/camlheader
430 %{_libdir}/%{name}/camlheader_ur
431 %dir %{_libdir}/%{name}/ocamldoc
432 %{_libdir}/%{name}/ocamldoc/*.hva
433 %attr(755,root,root) %{_libdir}/%{name}/expunge
434 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
435 %attr(755,root,root) %{_libdir}/%{name}/*labels
436 %{_mandir}/man1/*ocaml*
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_bindir}/ocamlrun
441 %dir %{_libdir}/%{name}
442 %dir %{_libdir}/%{name}/stublibs
443 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
444 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
446 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
447 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
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 %doc docs/html/ocaml/*
461 %defattr(644,root,root,755)
465 %defattr(644,root,root,755)
466 %{_infodir}/ocaml.info*
468 # they are poor, html is much better
474 %defattr(644,root,root,755)
475 %{_datadir}/emacs/site-lisp/*.el*
480 %defattr(644,root,root,755)
481 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
482 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
485 %defattr(644,root,root,755)
486 %attr(755,root,root) %{_bindir}/labltk
487 %attr(755,root,root) %{_bindir}/ocamlbrowser
488 %dir %{_libdir}/%{name}/labltk
489 %{_libdir}/%{name}/labltk/*.cm*
490 %{_libdir}/%{name}/labltk/*.a
491 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
492 %{_examplesdir}/%{name}-labltk-%{version}
497 %defattr(644,root,root,755)
498 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.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
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_bindir}/*camlp4*
510 %attr(755,root,root) %{_bindir}/ocpp
511 # Not installed since 3.05, is it needed?
512 #%attr(755,root,root) %{_bindir}/odyl
513 %{_libdir}/%{name}/camlp4
514 %{_mandir}/man*/*camlp4*
515 %{_mandir}/man*/*ocpp*
517 %files camlp4-doc-html
518 %defattr(644,root,root,755)
519 %doc docs/html/camlp4*
521 %files compiler-objects
522 %defattr(644,root,root,755)
523 %{_libdir}/%{name}/compiler
525 %files ocamldoc-devel
526 %defattr(644,root,root,755)
527 %{_libdir}/%{name}/ocamldoc/*.cm*
528 %{_libdir}/%{name}/ocamldoc/*.a
531 %defattr(644,root,root,755)
532 %{_examplesdir}/%{name}-%{version}