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: b6b380ae71f6f7bc7ff0989a0f8409e6
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: xorg-lib-libX11-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)
66 %define specflags -fno-strict-aliasing
69 Objective Caml is a high-level, strongly-typed, functional and
70 object-oriented programming language from the ML family of languages.
72 This package comprises two batch compilers (a fast bytecode compiler
73 and an optimizing native-code compiler), an interactive toplevel
74 system, Lex&Yacc tools, a replay debugger, and a comprehensive
78 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
79 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
81 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
82 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
83 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
84 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
87 Summary: Runtime system for OCaml
88 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
92 This package contains binaries needed to run bytecode OCaml programs:
93 ocamlrun bytecode interpreter, and basic dynamic link libraries.
95 %description runtime -l pl
96 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
97 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
98 podstawowe biblioteki linkowane dynamicznie.
101 Summary: Sources of OCaml standard library
102 Summary(pl): ¬ród³a biblioteki standardowej OCamla
103 Group: Development/Languages
104 Requires: %{name} = %{epoch}:%{version}-%{release}
106 %description lib-source
107 This sources come helpful during debugging of user programs with ocamldebug.
109 %description lib-source -l pl
110 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
111 z u¿yciem ocamldebug.
114 Summary: HTML documentation for OCaml
115 Summary(pl): Dokumentacja dla OCamla w formacie HTML
116 Group: Development/Tools
118 %description doc-html
119 HTML documentation for OCaml.
121 %description doc-html -l pl
122 Dokumentacja dla OCamla w formacie HTML.
125 Summary: PostScript documentation for OCaml
126 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
127 Group: Development/Tools
130 PostScript documentation for OCaml.
132 %description doc-ps -l pl
133 Dokumentacja dla OCamla w formacie PostScript.
136 Summary: Info documentation for OCaml
137 Summary(pl): Dokumentacja info dla OCamla
138 Group: Development/Tools
140 %description doc-info
141 Info documentation for OCaml.
143 %description doc-info -l pl
144 Dokumentacja info dla OCamla.
147 Summary: Emacs mode for OCaml
148 Summary(pl): Tryb OCamla dla Emacsa
149 Group: Development/Tools
150 Requires: %{name} = %{epoch}:%{version}-%{release}
153 Emacs mode files for Objective Caml language.
155 %description emacs -l pl
156 Pliki trybu OCamla dla Emacsa.
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 labltk-devel
174 Summary: LablTk library for OCaml
175 Summary(pl): Biblioteka LablTk dla OCamla
176 Group: Development/Libraries
177 Requires: %{name}-labltk = %{epoch}:%{version}-%{release}
179 %description labltk-devel
180 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
181 contains files needed to develop OCaml programs using LablTk.
183 %description labltk-devel -l pl
184 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
185 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
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.
204 %package x11graphics-devel
205 Summary: X11 graphic output for OCaml
206 Summary(pl): Dostêp do X11 dla OCamla
207 Group: Development/Libraries
208 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
210 %description x11graphics-devel
211 x11graphics module gives OCaml program access to drawing in X11
212 windows. This package contains files needed to develop OCaml programs
215 %description x11graphics-devel -l pl
216 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
217 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
218 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
221 Summary: Objective Caml Preprocessor
222 Summary(pl): Preprocesor OCamla
223 Group: Development/Languages
224 Requires: %{name} = %{epoch}:%{version}-%{release}
225 Provides: camlp4 = %{epoch}:%{version}-%{release}
229 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
230 tools for syntax (grammars) and the ability to modify the concrete
231 syntax of the language (quotations, syntax extensions).
233 Camlp4 can parse normal Ocaml concrete syntax or any other
234 user-definable syntax. As an example, an alternative syntax is
235 provided, named revised, because it tries to fix some small problems
236 of the normal syntax.
238 Camlp4 can pretty print the normal Ocaml concrete syntax or the
239 revised one. It is therefore always possible to have a version of your
240 sources compilable by the Objective Caml compiler without
243 %description camlp4 -l pl
244 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
245 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
246 jêzyka (cytowania, rozszerzenia).
248 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
249 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
250 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
251 wystêpuj±ce w sk³adni oryginalnej.
253 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
254 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
257 %package camlp4-doc-html
258 Summary: Objective Caml Preprocessor - HTML documentation
259 Summary(pl): Preprocesor OCamla - dokumentacja HTML
260 Group: Development/Languages
262 %description camlp4-doc-html
263 Objective Caml Preprocessor - HTML documentation.
265 %description camlp4-doc-html -l pl
266 Preprocesor OCamla - dokumentacja HTML.
268 %package compiler-objects
269 Summary: Compiled parts of OCaml compiler
270 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
271 Group: Development/Languages
272 Requires: %{name} = %{epoch}:%{version}-%{release}
273 Obsoletes: ocaml-devel
274 Provides: ocaml-devel
276 %description compiler-objects
277 This package contains *.cmi and *.cmo files being parts of OCaml
278 compiler. They are needed to compile some programs.
280 %description compiler-objects -l pl
281 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce czê¶ciami kompilatora
282 OCamla. S± one wymagane do kompilacji niektórych programów.
284 %package ocamldoc-devel
285 Summary: Files needed to develop programs using ocamldoc
286 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
287 Group: Development/Languages
288 Requires: %{name} = %{epoch}:%{version}-%{release}
290 %description ocamldoc-devel
291 You need this package if you are going to write ocamldoc front end or
294 %description ocamldoc-devel -l pl
295 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
296 dla ocamldoc lub co¶ podobnego.
298 # maybe we'll want to add some more stuff here?
300 Summary: Example source code for OCaml
301 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
302 Group: Development/Languages
303 Requires: %{name} = %{epoch}:%{version}-%{release}
305 %description examples
306 This packages contains sources for Okasaki's Purely Functional
307 Datastructures in OCaml, along with some contributions.
309 %description examples -l pl
310 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
311 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
314 %setup -q -a1 -a3 -a5
316 tar xjf %{SOURCE7} -C examples
317 tar xzf %{SOURCE8} -C examples
319 # order mess with docs somewhat
321 mv htmlman docs/html/ocaml
322 cp %{SOURCE2} docs/ocaml.ps.gz
323 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
324 cp %{SOURCE4} docs/camlp4.ps.gz
325 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
326 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
335 cp -f /usr/share/automake/config.sub config/gnu
339 -libdir %{_libdir}/%{name} \
340 -mandir %{_mandir}/man1 \
342 %{!?with_tk:-no-tk} \
346 %{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall"
347 %{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall" -j1
350 rm -rf $RPM_BUILD_ROOT
351 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
354 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
355 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
356 MANDIR=$RPM_BUILD_ROOT%{_mandir}
358 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
359 %{_libdir}/%{name}/stublibs
364 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
365 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
366 else echo xemacs; fi`" \
367 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
370 # symlink .opt versions of compilers (if present)
371 # warning: don't do that with camlp4 (can't load extensions then)
372 for f in ocamlc ocamlopt ocamldoc ocamllex; do
373 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
374 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
375 $RPM_BUILD_ROOT%{_bindir}/$f.byte
376 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
380 # move includes to the proper place
381 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
382 # but leave compatibility symlink
383 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
385 # compiled sources of compiler, needed by some programs
386 for f in {asm,byte}comp parsing typing utils ; do
387 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
388 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
391 # this isn't installed by default, but is useful
392 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
393 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
394 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
395 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
398 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
399 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
402 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
405 rm -rf $RPM_BUILD_ROOT
408 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
411 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
414 %defattr(644,root,root,755)
415 %doc LICENSE Changes README Upgrading
416 %attr(755,root,root) %{_bindir}/ocaml*
417 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
418 %exclude %{_bindir}/ocamlrun
419 %attr(755,root,root) %{_bindir}/*labels
421 %{_libdir}/%{name}/caml
422 %{_libdir}/%{name}/threads
423 %dir %{_libdir}/%{name}/vmthreads
424 %dir %{_libdir}/%{name}/vmthreads/*.cm*
425 %dir %{_libdir}/%{name}/vmthreads/*.a
426 %{_libdir}/%{name}/*.a
427 %{_libdir}/%{name}/*.o
428 %{_libdir}/%{name}/*.cm*
429 %exclude %{_libdir}/%{name}/*graphics*
430 %{_libdir}/%{name}/ld.conf
431 %{_libdir}/%{name}/camlheader
432 %{_libdir}/%{name}/camlheader_ur
433 %dir %{_libdir}/%{name}/ocamldoc
434 %{_libdir}/%{name}/ocamldoc/*.hva
435 %attr(755,root,root) %{_libdir}/%{name}/expunge
436 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
437 %attr(755,root,root) %{_libdir}/%{name}/*labels
438 %{_mandir}/man1/*ocaml*
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_bindir}/ocamlrun
443 %dir %{_libdir}/%{name}
444 %dir %{_libdir}/%{name}/stublibs
445 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
446 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
448 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
449 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
453 %defattr(644,root,root,755)
454 %{_libdir}/%{name}/*.ml
455 %{_libdir}/%{name}/*.mli
456 %{_libdir}/%{name}/*/*.mli
459 %defattr(644,root,root,755)
460 %doc docs/html/ocaml/*
463 %defattr(644,root,root,755)
467 %defattr(644,root,root,755)
468 %{_infodir}/ocaml.info*
470 # they are poor, html is much better
476 %defattr(644,root,root,755)
477 %{_datadir}/emacs/site-lisp/*.el*
482 %defattr(644,root,root,755)
483 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
484 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_bindir}/labltk
489 %attr(755,root,root) %{_bindir}/ocamlbrowser
490 %dir %{_libdir}/%{name}/labltk
491 %{_libdir}/%{name}/labltk/*.cm*
492 %{_libdir}/%{name}/labltk/*.a
493 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
494 %{_examplesdir}/%{name}-labltk-%{version}
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
502 %files x11graphics-devel
503 %defattr(644,root,root,755)
504 %{_libdir}/%{name}/graphics*.cm*
505 %{_libdir}/%{name}/graphics.a
506 %{_libdir}/%{name}/libgraphics.a
510 %defattr(644,root,root,755)
511 %attr(755,root,root) %{_bindir}/*camlp4*
512 %attr(755,root,root) %{_bindir}/ocpp
513 # Not installed since 3.05, is it needed?
514 #%attr(755,root,root) %{_bindir}/odyl
515 %{_libdir}/%{name}/camlp4
516 %{_mandir}/man*/*camlp4*
517 %{_mandir}/man*/*ocpp*
519 %files camlp4-doc-html
520 %defattr(644,root,root,755)
521 %doc docs/html/camlp4*
523 %files compiler-objects
524 %defattr(644,root,root,755)
525 %{_libdir}/%{name}/compiler
527 %files ocamldoc-devel
528 %defattr(644,root,root,755)
529 %{_libdir}/%{name}/ocamldoc/*.cm*
530 %{_libdir}/%{name}/ocamldoc/*.a
533 %defattr(644,root,root,755)
534 %{_examplesdir}/%{name}-%{version}