4 %bcond_without emacs # emacs subpackage
5 %bcond_without x11 # without X11 support
6 %bcond_without tk # tk support
7 %bcond_with db3 # use db3 instead of db 4.x
9 # --without x11 implies --without tk
10 %{!?with_x11:%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}.tar.gz
23 # Source0-md5: 2dd038055f5e1350078ad81270411b78
24 Source1: http://caml.inria.fr/distrib/%{name}-%{version}/%{name}-%{version}-refman.html.tar.gz
25 # Source1-md5: 9ac1f7e9e381b95504f0e7868d9fbf52
26 Source2: http://caml.inria.fr/distrib/%{name}-%{version}/%{name}-%{version}-refman.ps.gz
27 # Source2-md5: 09a9ac4bc1ec90ca4d16743ffbe76c78
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 URL: http://caml.inria.fr/
46 %{?with_x11:BuildRequires: XFree86-devel}
47 %{?with_db3:BuildRequires: db3-devel}
48 %{!?with_db3:BuildRequires: db-devel >= 4.1}
49 %{?with_tk:BuildRequires: tk-devel}
52 BuildRequires: xemacs-common
53 BuildRequires: xemacs-fsf-compat-pkg
55 Requires: ocaml-runtime = %{version}-%{release}
56 Provides: ocaml-ocamldoc
57 Obsoletes: ocaml-ocamldoc
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 Objective Caml is a high-level, strongly-typed, functional and
62 object-oriented programming language from the ML family of languages.
64 This package comprises two batch compilers (a fast bytecode compiler
65 and an optimizing native-code compiler), an interactive toplevel
66 system, Lex&Yacc tools, a replay debugger, and a comprehensive
70 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
71 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
73 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
74 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
75 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
76 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
79 Summary: PostScript documentation for OCaml
80 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
81 Group: Development/Tools
84 PostScript documentation for OCaml. HTML documentation is in main package.
86 %description doc-ps -l pl
87 Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
91 Summary: Emacs mode for OCaml
92 Summary(pl): Tryb OCamla dla Emacsa
93 Group: Development/Tools
94 Requires: %{name} = %{version}
97 Emacs mode files for Objective Caml language.
99 %description emacs -l pl
100 Pliki trybu OCamla dla Emacsa.
103 Summary: Runtime system for OCaml
104 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
108 This package contains binaries needed to run bytecode OCaml programs:
109 ocamlrun bytecode interpreter, and basic dynamic link libraries.
111 %description runtime -l pl
112 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
113 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
114 podstawowe bibliotki linkowane dynamicznie.
116 %package labltk-devel
117 Summary: LablTk library for OCaml
118 Summary(pl): Biblioteka LablTk dla OCamla
119 Group: Development/Libraries
120 Requires: %{name}-labltk = %{version}-%{release}
122 %description labltk-devel
123 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
124 contains files needed to develop OCaml programs using LablTk.
126 %description labltk-devel -l pl
127 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
128 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
132 Summary: Runtime for LablTk library
133 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
135 Requires: %{name} = %{version}-%{release}
138 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
139 contains files needed to run bytecode OCaml programs using LablTk.
141 %description labltk -l pl
142 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
143 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
146 %package x11graphics-devel
147 Summary: X11 graphic output for OCaml
148 Summary(pl): Dostêp do X11 dla OCamla
149 Group: Development/Libraries
150 Requires: %{name}-x11graphics = %{version}-%{release}
152 %description x11graphics-devel
153 x11graphics module gives OCaml program access to drawing in X11
154 windows. This package contains files needed to develop OCaml programs
157 %description x11graphics-devel -l pl
158 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
159 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
160 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
163 Summary: X11 graphic output for OCaml
164 Summary(pl): Dostêp do X11 dla OCamla
165 Group: Development/Libraries
166 Requires: %{name} = %{version}-%{release}
168 %description x11graphics
169 x11graphics module gives OCaml program access to drawing in X11
170 windows. This package contains files needed to run bytecode OCaml
171 programs using x11graphics.
173 %description x11graphics -l pl
174 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
175 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
176 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
179 Summary: Objective Caml Preprocessor
180 Summary(pl): Preprocesor OCamla
181 Group: Development/Languages
182 Requires: %{name} = %{version}-%{release}
183 Provides: camlp4 = %{version}-%{release}
187 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
188 tools for syntax (grammars) and the ability to modify the concrete
189 syntax of the language (quotations, syntax extensions).
191 Camlp4 can parse normal Ocaml concrete syntax or any other
192 user-definable syntax. As an example, an alternative syntax is
193 provided, named revised, because it tries to fix some small problems
194 of the normal syntax.
196 Camlp4 can pretty print the normal Ocaml concrete syntax or the
197 revised one. It is therefore always possible to have a version of your
198 sources compilable by the Objective Caml compiler without
201 %description camlp4 -l pl
202 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
203 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
204 jêzyka (cytowania, rozszerzenia).
206 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
207 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
208 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
209 wystêpuj±ce w sk³adni oryginalnej.
211 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
212 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
215 %package compiler-objects
216 Summary: Compiled parts of OCaml compiler
217 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
218 Group: Development/Languages
219 Requires: %{name} = %{version}-%{release}
220 Obsoletes: ocaml-devel
222 %description compiler-objects
223 This package contains *.cmi and *.cmo files being parts of OCaml
224 compiler. They are needed to compile some programs.
226 %description compiler-objects -l pl
227 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
228 OCamla. S± one wymagane do kompilacji niektórych programów.
230 %package ocamldoc-devel
231 Summary: Files needed to develop programs using ocamldoc
232 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
233 Group: Development/Languages
234 Requires: %{name} = %{version}-%{release}
236 %description ocamldoc-devel
237 You need this package if you are going to write ocamldoc front end or
240 %description ocamldoc-devel -l pl
241 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
242 dla ocamldoc lub co¶ podobnego.
245 Summary: Sources of OCaml standard library
246 Summary(pl): ¬ród³a biblioteki standardowej OCamla
247 Group: Development/Languages
248 Requires: %{name} = %{version}-%{release}
250 %description lib-source
251 This sources come helpful during debugging of user programs with ocamldebug.
253 %description lib-source -l pl
254 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
255 z u¿yciem ocamldebug.
257 # maybe we'll want to add some more stuff here?
259 Summary: Example source code for OCaml
260 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
261 Group: Development/Languages
262 Requires: %{name} = %{version}-%{release}
264 %description examples
265 This packages contains sources for Okasaki's Purely Functional
266 Datastructures in OCaml, along with some contributions.
268 %description examples -l pl
269 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
270 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
273 %setup -q -a1 -a3 -a5
275 tar xjf %{SOURCE7} -C examples
276 tar xzf %{SOURCE8} -C examples
277 # order mess with docs somewhat
280 mv htmlman docs/html/ocaml
281 cp %{SOURCE2} docs/ocaml.ps.gz
282 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
283 cp %{SOURCE4} docs/camlp4.ps.gz
284 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
285 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
294 -cc "%{__cc} %{rpmcflags}" \
296 -libdir %{_libdir}/%{name} \
297 -mandir %{_mandir}/man1 \
299 %{!?with_tk:-no-tk} \
302 %{__make} world bootstrap opt.opt
303 %{__make} -C tools objinfo
306 rm -rf $RPM_BUILD_ROOT
307 install -d $RPM_BUILD_ROOT{%{_includedir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
310 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
311 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
312 MANDIR=$RPM_BUILD_ROOT%{_mandir}
314 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
315 %{_libdir}/%{name}/stublibs
320 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
321 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
322 else echo xemacs; fi`" \
323 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
326 # symlink .opt versions of compilers (if present)
327 # warning: don't do that with camlp4 (can't load extensions then)
328 for f in ocamlc ocamlopt ocamldoc ocamllex; do
329 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
330 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
331 $RPM_BUILD_ROOT%{_bindir}/$f.byte
332 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
336 # move includes to the proper place
337 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
338 # but leave compatibility symlink
339 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
341 # compiled sources of compiler, needed by some programs
342 for f in {asm,byte}comp parsing typing utils ; do
343 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
344 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
347 # this isn't installed by default, but is useful
348 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
349 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
350 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
351 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
354 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
355 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
358 rm -rf $RPM_BUILD_ROOT
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_bindir}/ocamlrun
363 %dir %{_libdir}/%{name}
364 %dir %{_libdir}/%{name}/stublibs
365 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
366 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
368 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
369 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
373 %defattr(644,root,root,755)
374 %doc LICENSE Changes README Upgrading
376 %attr(755,root,root) %{_bindir}/ocaml*
377 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
378 %exclude %{_bindir}/ocamlrun
379 %attr(755,root,root) %{_bindir}/*labels
381 %{_libdir}/%{name}/caml
382 %{_libdir}/%{name}/threads
383 %dir %{_libdir}/%{name}/vmthreads
384 %dir %{_libdir}/%{name}/vmthreads/*.cm*
385 %dir %{_libdir}/%{name}/vmthreads/*.a
386 %{_libdir}/%{name}/*.a
387 %{_libdir}/%{name}/*.o
388 %{_libdir}/%{name}/*.cm*
389 %exclude %{_libdir}/%{name}/*graphics*
390 %{_libdir}/%{name}/ld.conf
391 %{_libdir}/%{name}/camlheader
392 %{_libdir}/%{name}/camlheader_ur
393 %dir %{_libdir}/%{name}/ocamldoc
394 %{_libdir}/%{name}/ocamldoc/*.hva
395 %attr(755,root,root) %{_libdir}/%{name}/expunge
396 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
397 %attr(755,root,root) %{_libdir}/%{name}/*labels
398 %{_mandir}/man1/*ocaml*
401 %defattr(644,root,root,755)
402 %{_libdir}/%{name}/*.ml
403 %{_libdir}/%{name}/*.mli
404 %{_libdir}/%{name}/*/*.mli
407 %defattr(644,root,root,755)
408 %{_examplesdir}/%{name}-%{version}
410 # they are poor, html is much better
414 %files compiler-objects
415 %defattr(644,root,root,755)
416 %{_libdir}/%{name}/compiler
419 %defattr(644,root,root,755)
420 %doc docs/html/camlp4*
421 %attr(755,root,root) %{_bindir}/*camlp4*
422 %attr(755,root,root) %{_bindir}/ocpp
423 # Not installed since 3.05, is is needed?
424 #%attr(755,root,root) %{_bindir}/odyl
425 %{_libdir}/%{name}/camlp4
426 %{_mandir}/man*/*camlp4*
427 %{_mandir}/man*/*ocpp*
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_bindir}/labltk
433 %attr(755,root,root) %{_bindir}/ocamlbrowser
434 %dir %{_libdir}/%{name}/labltk
435 %{_libdir}/%{name}/labltk/*.cm*
436 %{_libdir}/%{name}/labltk/*.a
437 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
438 %{_examplesdir}/%{name}-labltk-%{version}
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
443 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
447 %files x11graphics-devel
448 %defattr(644,root,root,755)
449 %{_libdir}/%{name}/graphics*.cm*
450 %{_libdir}/%{name}/graphics.a
451 %{_libdir}/%{name}/libgraphics.a
454 %defattr(644,root,root,755)
455 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
460 %defattr(644,root,root,755)
461 %{_datadir}/emacs/site-lisp/*.el*
464 %files ocamldoc-devel
465 %defattr(644,root,root,755)
466 %{_libdir}/%{name}/ocamldoc/*.cm*
467 %{_libdir}/%{name}/ocamldoc/*.a
470 %defattr(644,root,root,755)