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 Patch6: %{name}-as_needed.patch
51 URL: http://caml.inria.fr/
52 %{?with_db3:BuildRequires: db3-devel}
53 %{!?with_db3:BuildRequires: db-devel >= 4.1}
54 %{?with_tk:BuildRequires: tk-devel}
55 %{?with_x:BuildRequires: xorg-lib-libX11-devel}
57 BuildRequires: sed >= 4.0
59 BuildRequires: xemacs-common
60 BuildRequires: xemacs-fsf-compat-pkg
62 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
63 Provides: ocaml-ocamldoc
64 Obsoletes: ocaml-ocamldoc
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 %define specflags -fno-strict-aliasing
70 Objective Caml is a high-level, strongly-typed, functional and
71 object-oriented programming language from the ML family of languages.
73 This package comprises two batch compilers (a fast bytecode compiler
74 and an optimizing native-code compiler), an interactive toplevel
75 system, Lex&Yacc tools, a replay debugger, and a comprehensive
79 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
80 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
82 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
83 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
84 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
85 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
88 Summary: Runtime system for OCaml
89 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
93 This package contains binaries needed to run bytecode OCaml programs:
94 ocamlrun bytecode interpreter, and basic dynamic link libraries.
96 %description runtime -l pl
97 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
98 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
99 podstawowe biblioteki linkowane dynamicznie.
102 Summary: Sources of OCaml standard library
103 Summary(pl): ¬ród³a biblioteki standardowej OCamla
104 Group: Development/Languages
105 Requires: %{name} = %{epoch}:%{version}-%{release}
107 %description lib-source
108 This sources come helpful during debugging of user programs with ocamldebug.
110 %description lib-source -l pl
111 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
112 z u¿yciem ocamldebug.
115 Summary: HTML documentation for OCaml
116 Summary(pl): Dokumentacja dla OCamla w formacie HTML
117 Group: Development/Tools
119 %description doc-html
120 HTML documentation for OCaml.
122 %description doc-html -l pl
123 Dokumentacja dla OCamla w formacie HTML.
126 Summary: PostScript documentation for OCaml
127 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
128 Group: Development/Tools
131 PostScript documentation for OCaml.
133 %description doc-ps -l pl
134 Dokumentacja dla OCamla w formacie PostScript.
137 Summary: Info documentation for OCaml
138 Summary(pl): Dokumentacja info dla OCamla
139 Group: Development/Tools
141 %description doc-info
142 Info documentation for OCaml.
144 %description doc-info -l pl
145 Dokumentacja info dla OCamla.
148 Summary: Emacs mode for OCaml
149 Summary(pl): Tryb OCamla dla Emacsa
150 Group: Development/Tools
151 Requires: %{name} = %{epoch}:%{version}-%{release}
154 Emacs mode files for Objective Caml language.
156 %description emacs -l pl
157 Pliki trybu OCamla dla Emacsa.
160 Summary: Runtime for LablTk library
161 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
163 Requires: %{name} = %{epoch}:%{version}-%{release}
166 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
167 contains files needed to run bytecode OCaml programs using LablTk.
169 %description labltk -l pl
170 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
171 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
174 %package labltk-devel
175 Summary: LablTk library for OCaml
176 Summary(pl): Biblioteka LablTk dla OCamla
177 Group: Development/Libraries
178 Requires: %{name}-labltk = %{epoch}:%{version}-%{release}
180 %description labltk-devel
181 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
182 contains files needed to develop OCaml programs using LablTk.
184 %description labltk-devel -l pl
185 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
186 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
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.
205 %package x11graphics-devel
206 Summary: X11 graphic output for OCaml
207 Summary(pl): Dostêp do X11 dla OCamla
208 Group: Development/Libraries
209 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
211 %description x11graphics-devel
212 x11graphics module gives OCaml program access to drawing in X11
213 windows. This package contains files needed to develop OCaml programs
216 %description x11graphics-devel -l pl
217 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
218 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
219 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
222 Summary: Objective Caml Preprocessor
223 Summary(pl): Preprocesor OCamla
224 Group: Development/Languages
225 Requires: %{name} = %{epoch}:%{version}-%{release}
226 Provides: camlp4 = %{epoch}:%{version}-%{release}
230 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
231 tools for syntax (grammars) and the ability to modify the concrete
232 syntax of the language (quotations, syntax extensions).
234 Camlp4 can parse normal Ocaml concrete syntax or any other
235 user-definable syntax. As an example, an alternative syntax is
236 provided, named revised, because it tries to fix some small problems
237 of the normal syntax.
239 Camlp4 can pretty print the normal Ocaml concrete syntax or the
240 revised one. It is therefore always possible to have a version of your
241 sources compilable by the Objective Caml compiler without
244 %description camlp4 -l pl
245 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
246 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
247 jêzyka (cytowania, rozszerzenia).
249 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
250 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
251 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
252 wystêpuj±ce w sk³adni oryginalnej.
254 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
255 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
258 %package camlp4-doc-html
259 Summary: Objective Caml Preprocessor - HTML documentation
260 Summary(pl): Preprocesor OCamla - dokumentacja HTML
261 Group: Development/Languages
263 %description camlp4-doc-html
264 Objective Caml Preprocessor - HTML documentation.
266 %description camlp4-doc-html -l pl
267 Preprocesor OCamla - dokumentacja HTML.
269 %package compiler-objects
270 Summary: Compiled parts of OCaml compiler
271 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
272 Group: Development/Languages
273 Requires: %{name} = %{epoch}:%{version}-%{release}
274 Obsoletes: ocaml-devel
275 Provides: ocaml-devel
277 %description compiler-objects
278 This package contains *.cmi and *.cmo files being parts of OCaml
279 compiler. They are needed to compile some programs.
281 %description compiler-objects -l pl
282 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce czê¶ciami kompilatora
283 OCamla. S± one wymagane do kompilacji niektórych programów.
285 %package ocamldoc-devel
286 Summary: Files needed to develop programs using ocamldoc
287 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
288 Group: Development/Languages
289 Requires: %{name} = %{epoch}:%{version}-%{release}
291 %description ocamldoc-devel
292 You need this package if you are going to write ocamldoc front end or
295 %description ocamldoc-devel -l pl
296 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
297 dla ocamldoc lub co¶ podobnego.
299 # maybe we'll want to add some more stuff here?
301 Summary: Example source code for OCaml
302 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
303 Group: Development/Languages
304 Requires: %{name} = %{epoch}:%{version}-%{release}
306 %description examples
307 This packages contains sources for Okasaki's Purely Functional
308 Datastructures in OCaml, along with some contributions.
310 %description examples -l pl
311 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
312 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
315 %setup -q -a1 -a3 -a5
317 tar xjf %{SOURCE7} -C examples
318 tar xzf %{SOURCE8} -C examples
320 # order mess with docs somewhat
322 mv htmlman docs/html/ocaml
323 cp %{SOURCE2} docs/ocaml.ps.gz
324 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
325 cp %{SOURCE4} docs/camlp4.ps.gz
326 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
327 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
337 cp -f /usr/share/automake/config.sub config/gnu
341 -libdir %{_libdir}/%{name} \
342 -mandir %{_mandir}/man1 \
344 %{!?with_tk:-no-tk} \
348 %{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall"
349 %{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall" -j1
352 rm -rf $RPM_BUILD_ROOT
353 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
356 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
357 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
358 MANDIR=$RPM_BUILD_ROOT%{_mandir}
360 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
361 %{_libdir}/%{name}/stublibs
366 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
367 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
368 else echo xemacs; fi`" \
369 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
372 # symlink .opt versions of compilers (if present)
373 # warning: don't do that with camlp4 (can't load extensions then)
374 for f in ocamlc ocamlopt ocamldoc ocamllex; do
375 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
376 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
377 $RPM_BUILD_ROOT%{_bindir}/$f.byte
378 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
382 # move includes to the proper place
383 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
384 # but leave compatibility symlink
385 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
387 # compiled sources of compiler, needed by some programs
388 for f in {asm,byte}comp parsing typing utils ; do
389 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
390 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
393 # this isn't installed by default, but is useful
394 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
395 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
396 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
397 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
400 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
401 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
404 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
407 rm -rf $RPM_BUILD_ROOT
410 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
413 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
416 %defattr(644,root,root,755)
417 %doc LICENSE Changes README Upgrading
418 %attr(755,root,root) %{_bindir}/ocaml*
419 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
420 %exclude %{_bindir}/ocamlrun
421 %attr(755,root,root) %{_bindir}/*labels
423 %{_libdir}/%{name}/caml
424 %{_libdir}/%{name}/threads
425 %dir %{_libdir}/%{name}/vmthreads
426 %dir %{_libdir}/%{name}/vmthreads/*.cm*
427 %dir %{_libdir}/%{name}/vmthreads/*.a
428 %{_libdir}/%{name}/*.a
429 %{_libdir}/%{name}/*.o
430 %{_libdir}/%{name}/*.cm*
431 %exclude %{_libdir}/%{name}/*graphics*
432 %{_libdir}/%{name}/ld.conf
433 %{_libdir}/%{name}/camlheader
434 %{_libdir}/%{name}/camlheader_ur
435 %dir %{_libdir}/%{name}/ocamldoc
436 %{_libdir}/%{name}/ocamldoc/*.hva
437 %attr(755,root,root) %{_libdir}/%{name}/expunge
438 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
439 %attr(755,root,root) %{_libdir}/%{name}/*labels
440 %{_mandir}/man1/*ocaml*
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_bindir}/ocamlrun
445 %dir %{_libdir}/%{name}
446 %dir %{_libdir}/%{name}/stublibs
447 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
448 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
450 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
451 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
455 %defattr(644,root,root,755)
456 %{_libdir}/%{name}/*.ml
457 %{_libdir}/%{name}/*.mli
458 %{_libdir}/%{name}/*/*.mli
461 %defattr(644,root,root,755)
462 %doc docs/html/ocaml/*
465 %defattr(644,root,root,755)
469 %defattr(644,root,root,755)
470 %{_infodir}/ocaml.info*
472 # they are poor, html is much better
478 %defattr(644,root,root,755)
479 %{_datadir}/emacs/site-lisp/*.el*
484 %defattr(644,root,root,755)
485 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
486 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_bindir}/labltk
491 %attr(755,root,root) %{_bindir}/ocamlbrowser
492 %dir %{_libdir}/%{name}/labltk
493 %{_libdir}/%{name}/labltk/*.cm*
494 %{_libdir}/%{name}/labltk/*.a
495 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
496 %{_examplesdir}/%{name}-labltk-%{version}
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
504 %files x11graphics-devel
505 %defattr(644,root,root,755)
506 %{_libdir}/%{name}/graphics*.cm*
507 %{_libdir}/%{name}/graphics.a
508 %{_libdir}/%{name}/libgraphics.a
512 %defattr(644,root,root,755)
513 %attr(755,root,root) %{_bindir}/*camlp4*
514 %attr(755,root,root) %{_bindir}/ocpp
515 # Not installed since 3.05, is it needed?
516 #%attr(755,root,root) %{_bindir}/odyl
517 %{_libdir}/%{name}/camlp4
518 %{_mandir}/man*/*camlp4*
519 %{_mandir}/man*/*ocpp*
521 %files camlp4-doc-html
522 %defattr(644,root,root,755)
523 %doc docs/html/camlp4*
525 %files compiler-objects
526 %defattr(644,root,root,755)
527 %{_libdir}/%{name}/compiler
529 %files ocamldoc-devel
530 %defattr(644,root,root,755)
531 %{_libdir}/%{name}/ocamldoc/*.cm*
532 %{_libdir}/%{name}/ocamldoc/*.a
535 %defattr(644,root,root,755)
536 %{_examplesdir}/%{name}-%{version}