4 %bcond_without emacs # without emacs subpackage
5 %bcond_without x # without X11 support
6 %bcond_without tk # without Tcl/Tk support
7 %bcond_with db3 # use db3 instead of db 4.x
9 # --without x11 implies --without tk
10 %{!?with_x:%undefine with_tk}
14 Summary: The Objective Caml compiler and programming environment
15 Summary(pl): Kompilator OCamla (Objective Caml) oraz ¶rodowisko programistyczne
19 License: distributable
20 Vendor: Group of implementors <caml-light@inria.fr>
21 Group: Development/Languages
22 Source0: http://caml.inria.fr/distrib/%{name}-%{version}/%{name}-%{version}.0.tar.gz
23 # Source0-md5: c6ef478362295c150101cdd2efcd38e0
24 Source1: http://caml.inria.fr/distrib/%{name}-%{version}/%{name}-%{version}-refman.html.tar.gz
25 # Source1-md5: 0daee5643db6960682c1a7d84467885f
26 Source2: http://caml.inria.fr/distrib/%{name}-%{version}/%{name}-%{version}-refman.ps.gz
27 # Source2-md5: 35a5d4318456c0982e72ee3f33364bf5
28 Source3: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.html.tar.gz
29 # Source3-md5: 21370bae4e7f6435b38aeb21db7ce8bb
30 Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.dvi.gz
31 # Source4-md5: 035915d1a530aa7ec9b194d9a7d258eb
32 Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.html.tar.gz
33 # Source5-md5: 96d8eb4ca5abd58c9a280ba59f73b192
34 Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.dvi.gz
35 # Source6-md5: fcd87c235109364242a0c9ccf176dff8
36 Source7: http://www.oefai.at/~markus/ocaml_sources/pure-fun-1.0.4.tar.bz2
37 # Source7-md5: 567bc681b4cc1cfcbbfb6fa5f012019b
38 Source8: http://www.oefai.at/~markus/ocaml_sources/ds-contrib.tar.gz
39 # Source8-md5: 77fa1da7375dea1393cc0b6cd802d7e1
40 Patch0: %{name}-build.patch
41 Patch1: %{name}-db3.patch
42 Patch2: %{name}-objinfo.patch
43 #Patch3: %{name}-mano.patch
44 #Patch4: %{name}-unused-var-warning.patch
45 #Patch5: %{name}-3.07-patch2.diffs
46 #Patch6: %{name}-emacs_batch_mode.patch
47 URL: http://caml.inria.fr/
48 %{?with_x:BuildRequires: XFree86-devel}
49 %{?with_db3:BuildRequires: db3-devel}
50 %{!?with_db3:BuildRequires: db-devel >= 4.1}
51 %{?with_tk:BuildRequires: tk-devel}
54 BuildRequires: xemacs-common
55 BuildRequires: xemacs-fsf-compat-pkg
58 Requires: ocaml-runtime = %{version}-%{release}
59 Provides: ocaml-ocamldoc
60 Obsoletes: ocaml-ocamldoc
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 Objective Caml is a high-level, strongly-typed, functional and
65 object-oriented programming language from the ML family of languages.
67 This package comprises two batch compilers (a fast bytecode compiler
68 and an optimizing native-code compiler), an interactive toplevel
69 system, Lex&Yacc tools, a replay debugger, and a comprehensive
73 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
74 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
76 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
77 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
78 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
79 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
82 Summary: PostScript documentation for OCaml
83 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
84 Group: Development/Tools
87 PostScript documentation for OCaml. HTML documentation is in main package.
89 %description doc-ps -l pl
90 Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
94 Summary: Emacs mode for OCaml
95 Summary(pl): Tryb OCamla dla Emacsa
96 Group: Development/Tools
97 Requires: %{name} = %{version}
100 Emacs mode files for Objective Caml language.
102 %description emacs -l pl
103 Pliki trybu OCamla dla Emacsa.
106 Summary: Runtime system for OCaml
107 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
111 This package contains binaries needed to run bytecode OCaml programs:
112 ocamlrun bytecode interpreter, and basic dynamic link libraries.
114 %description runtime -l pl
115 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
116 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
117 podstawowe bibliotki linkowane dynamicznie.
119 %package labltk-devel
120 Summary: LablTk library for OCaml
121 Summary(pl): Biblioteka LablTk dla OCamla
122 Group: Development/Libraries
123 Requires: %{name}-labltk = %{version}-%{release}
125 %description labltk-devel
126 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
127 contains files needed to develop OCaml programs using LablTk.
129 %description labltk-devel -l pl
130 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
131 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
135 Summary: Runtime for LablTk library
136 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
138 Requires: %{name} = %{version}-%{release}
141 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
142 contains files needed to run bytecode OCaml programs using LablTk.
144 %description labltk -l pl
145 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
146 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
149 %package x11graphics-devel
150 Summary: X11 graphic output for OCaml
151 Summary(pl): Dostêp do X11 dla OCamla
152 Group: Development/Libraries
153 Requires: %{name}-x11graphics = %{version}-%{release}
155 %description x11graphics-devel
156 x11graphics module gives OCaml program access to drawing in X11
157 windows. This package contains files needed to develop OCaml programs
160 %description x11graphics-devel -l pl
161 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
162 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
163 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
166 Summary: X11 graphic output for OCaml
167 Summary(pl): Dostêp do X11 dla OCamla
168 Group: Development/Libraries
169 Requires: %{name} = %{version}-%{release}
171 %description x11graphics
172 x11graphics module gives OCaml program access to drawing in X11
173 windows. This package contains files needed to run bytecode OCaml
174 programs using x11graphics.
176 %description x11graphics -l pl
177 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
178 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
179 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
182 Summary: Objective Caml Preprocessor
183 Summary(pl): Preprocesor OCamla
184 Group: Development/Languages
185 Requires: %{name} = %{version}-%{release}
186 Provides: camlp4 = %{version}-%{release}
190 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
191 tools for syntax (grammars) and the ability to modify the concrete
192 syntax of the language (quotations, syntax extensions).
194 Camlp4 can parse normal Ocaml concrete syntax or any other
195 user-definable syntax. As an example, an alternative syntax is
196 provided, named revised, because it tries to fix some small problems
197 of the normal syntax.
199 Camlp4 can pretty print the normal Ocaml concrete syntax or the
200 revised one. It is therefore always possible to have a version of your
201 sources compilable by the Objective Caml compiler without
204 %description camlp4 -l pl
205 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
206 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
207 jêzyka (cytowania, rozszerzenia).
209 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
210 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
211 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
212 wystêpuj±ce w sk³adni oryginalnej.
214 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
215 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
218 %package compiler-objects
219 Summary: Compiled parts of OCaml compiler
220 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
221 Group: Development/Languages
222 Requires: %{name} = %{version}-%{release}
223 Obsoletes: ocaml-devel
224 Provides: ocaml-devel
226 %description compiler-objects
227 This package contains *.cmi and *.cmo files being parts of OCaml
228 compiler. They are needed to compile some programs.
230 %description compiler-objects -l pl
231 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
232 OCamla. S± one wymagane do kompilacji niektórych programów.
234 %package ocamldoc-devel
235 Summary: Files needed to develop programs using ocamldoc
236 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
237 Group: Development/Languages
238 Requires: %{name} = %{version}-%{release}
240 %description ocamldoc-devel
241 You need this package if you are going to write ocamldoc front end or
244 %description ocamldoc-devel -l pl
245 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
246 dla ocamldoc lub co¶ podobnego.
249 Summary: Sources of OCaml standard library
250 Summary(pl): ¬ród³a biblioteki standardowej OCamla
251 Group: Development/Languages
252 Requires: %{name} = %{version}-%{release}
254 %description lib-source
255 This sources come helpful during debugging of user programs with ocamldebug.
257 %description lib-source -l pl
258 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
259 z u¿yciem ocamldebug.
261 # maybe we'll want to add some more stuff here?
263 Summary: Example source code for OCaml
264 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
265 Group: Development/Languages
266 Requires: %{name} = %{version}-%{release}
268 %description examples
269 This packages contains sources for Okasaki's Purely Functional
270 Datastructures in OCaml, along with some contributions.
272 %description examples -l pl
273 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
274 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
277 %setup -q -a1 -a3 -a5 -n %{name}-%{version}.0
279 tar xjf %{SOURCE7} -C examples
280 tar xzf %{SOURCE8} -C examples
281 # order mess with docs somewhat
284 mv htmlman docs/html/ocaml
285 cp %{SOURCE2} docs/ocaml.ps.gz
286 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
287 cp %{SOURCE4} docs/camlp4.ps.gz
288 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
289 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
299 cp /usr/share/automake/config.sub config/gnu
301 -cc "%{__cc} %{rpmcflags}" \
303 -libdir %{_libdir}/%{name} \
304 -mandir %{_mandir}/man1 \
306 %{!?with_tk:-no-tk} \
308 -x11lib /usr/X11R6/%{_lib}
310 %{__make} world bootstrap opt.opt
311 %{__make} -C tools objinfo
314 rm -rf $RPM_BUILD_ROOT
315 install -d $RPM_BUILD_ROOT{%{_includedir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
318 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
319 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
320 MANDIR=$RPM_BUILD_ROOT%{_mandir}
322 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
323 %{_libdir}/%{name}/stublibs
328 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
329 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
330 else echo xemacs; fi`" \
331 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
334 # symlink .opt versions of compilers (if present)
335 # warning: don't do that with camlp4 (can't load extensions then)
336 for f in ocamlc ocamlopt ocamldoc ocamllex; do
337 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
338 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
339 $RPM_BUILD_ROOT%{_bindir}/$f.byte
340 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
344 # move includes to the proper place
345 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
346 # but leave compatibility symlink
347 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
349 # compiled sources of compiler, needed by some programs
350 for f in {asm,byte}comp parsing typing utils ; do
351 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
352 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
355 # this isn't installed by default, but is useful
356 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
357 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
358 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
359 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
362 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
363 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
366 rm -rf $RPM_BUILD_ROOT
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_bindir}/ocamlrun
371 %dir %{_libdir}/%{name}
372 %dir %{_libdir}/%{name}/stublibs
373 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
374 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
376 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
377 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
381 %defattr(644,root,root,755)
382 %doc LICENSE Changes README Upgrading
384 %attr(755,root,root) %{_bindir}/ocaml*
385 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
386 %exclude %{_bindir}/ocamlrun
387 %attr(755,root,root) %{_bindir}/*labels
389 %{_libdir}/%{name}/caml
390 %{_libdir}/%{name}/threads
391 %dir %{_libdir}/%{name}/vmthreads
392 %dir %{_libdir}/%{name}/vmthreads/*.cm*
393 %dir %{_libdir}/%{name}/vmthreads/*.a
394 %{_libdir}/%{name}/*.a
395 %{_libdir}/%{name}/*.o
396 %{_libdir}/%{name}/*.cm*
397 %exclude %{_libdir}/%{name}/*graphics*
398 %{_libdir}/%{name}/ld.conf
399 %{_libdir}/%{name}/camlheader
400 %{_libdir}/%{name}/camlheader_ur
401 %dir %{_libdir}/%{name}/ocamldoc
402 %{_libdir}/%{name}/ocamldoc/*.hva
403 %attr(755,root,root) %{_libdir}/%{name}/expunge
404 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
405 %attr(755,root,root) %{_libdir}/%{name}/*labels
406 %{_mandir}/man1/*ocaml*
409 %defattr(644,root,root,755)
410 %{_libdir}/%{name}/*.ml
411 %{_libdir}/%{name}/*.mli
412 %{_libdir}/%{name}/*/*.mli
415 %defattr(644,root,root,755)
416 %{_examplesdir}/%{name}-%{version}
418 # they are poor, html is much better
422 %files compiler-objects
423 %defattr(644,root,root,755)
424 %{_libdir}/%{name}/compiler
427 %defattr(644,root,root,755)
428 %doc docs/html/camlp4*
429 %attr(755,root,root) %{_bindir}/*camlp4*
430 %attr(755,root,root) %{_bindir}/ocpp
431 # Not installed since 3.05, is is needed?
432 #%attr(755,root,root) %{_bindir}/odyl
433 %{_libdir}/%{name}/camlp4
434 %{_mandir}/man*/*camlp4*
435 %{_mandir}/man*/*ocpp*
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_bindir}/labltk
441 %attr(755,root,root) %{_bindir}/ocamlbrowser
442 %dir %{_libdir}/%{name}/labltk
443 %{_libdir}/%{name}/labltk/*.cm*
444 %{_libdir}/%{name}/labltk/*.a
445 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
446 %{_examplesdir}/%{name}-labltk-%{version}
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
451 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
455 %files x11graphics-devel
456 %defattr(644,root,root,755)
457 %{_libdir}/%{name}/graphics*.cm*
458 %{_libdir}/%{name}/graphics.a
459 %{_libdir}/%{name}/libgraphics.a
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
468 %defattr(644,root,root,755)
469 %{_datadir}/emacs/site-lisp/*.el*
472 %files ocamldoc-devel
473 %defattr(644,root,root,755)
474 %{_libdir}/%{name}/ocamldoc/*.cm*
475 %{_libdir}/%{name}/ocamldoc/*.a
478 %defattr(644,root,root,755)