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.gz
24 # Source0-md5: 8a32dd665d0d8fc08a027e1b8f68a001
25 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.html.tar.gz
26 # Source1-md5: 0daee5643db6960682c1a7d84467885f
27 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
28 # Source2-md5: 35a5d4318456c0982e72ee3f33364bf5
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.oefai.at/~markus/ocaml_sources/pure-fun-1.0.4.tar.bz2
38 # Source7-md5: 567bc681b4cc1cfcbbfb6fa5f012019b
39 Source8: http://www.oefai.at/~markus/ocaml_sources/ds-contrib.tar.gz
40 # Source8-md5: 77fa1da7375dea1393cc0b6cd802d7e1
41 Patch0: %{name}-build.patch
42 Patch1: %{name}-db3.patch
43 Patch2: %{name}-objinfo.patch
44 Patch3: %{name}-mano.patch
45 # needs update for ocaml 3.08
46 #Patch4: %{name}-unused-var-warning.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
57 Requires: ocaml-runtime = %{epoch}:%{version}-%{release}
58 Provides: ocaml-ocamldoc
59 Obsoletes: ocaml-ocamldoc
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 Objective Caml is a high-level, strongly-typed, functional and
64 object-oriented programming language from the ML family of languages.
66 This package comprises two batch compilers (a fast bytecode compiler
67 and an optimizing native-code compiler), an interactive toplevel
68 system, Lex&Yacc tools, a replay debugger, and a comprehensive
72 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
73 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
75 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
76 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
77 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
78 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
81 Summary: PostScript documentation for OCaml
82 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
83 Group: Development/Tools
86 PostScript documentation for OCaml. HTML documentation is in main package.
88 %description doc-ps -l pl
89 Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
93 Summary: Emacs mode for OCaml
94 Summary(pl): Tryb OCamla dla Emacsa
95 Group: Development/Tools
96 Requires: %{name} = %{epoch}:%{version}-%{release}
99 Emacs mode files for Objective Caml language.
101 %description emacs -l pl
102 Pliki trybu OCamla dla Emacsa.
105 Summary: Runtime system for OCaml
106 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
110 This package contains binaries needed to run bytecode OCaml programs:
111 ocamlrun bytecode interpreter, and basic dynamic link libraries.
113 %description runtime -l pl
114 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
115 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
116 podstawowe bibliotki linkowane dynamicznie.
118 %package labltk-devel
119 Summary: LablTk library for OCaml
120 Summary(pl): Biblioteka LablTk dla OCamla
121 Group: Development/Libraries
122 Requires: %{name}-labltk = %{epoch}:%{version}-%{release}
124 %description labltk-devel
125 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
126 contains files needed to develop OCaml programs using LablTk.
128 %description labltk-devel -l pl
129 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
130 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
134 Summary: Runtime for LablTk library
135 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
137 Requires: %{name} = %{epoch}:%{version}-%{release}
140 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
141 contains files needed to run bytecode OCaml programs using LablTk.
143 %description labltk -l pl
144 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
145 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
148 %package x11graphics-devel
149 Summary: X11 graphic output for OCaml
150 Summary(pl): Dostêp do X11 dla OCamla
151 Group: Development/Libraries
152 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
154 %description x11graphics-devel
155 x11graphics module gives OCaml program access to drawing in X11
156 windows. This package contains files needed to develop OCaml programs
159 %description x11graphics-devel -l pl
160 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
161 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
162 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
165 Summary: X11 graphic output for OCaml
166 Summary(pl): Dostêp do X11 dla OCamla
167 Group: Development/Libraries
168 Requires: %{name} = %{epoch}:%{version}-%{release}
170 %description x11graphics
171 x11graphics module gives OCaml program access to drawing in X11
172 windows. This package contains files needed to run bytecode OCaml
173 programs using x11graphics.
175 %description x11graphics -l pl
176 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
177 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
178 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
181 Summary: Objective Caml Preprocessor
182 Summary(pl): Preprocesor OCamla
183 Group: Development/Languages
184 Requires: %{name} = %{epoch}:%{version}-%{release}
185 Provides: camlp4 = %{epoch}:%{version}-%{release}
189 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
190 tools for syntax (grammars) and the ability to modify the concrete
191 syntax of the language (quotations, syntax extensions).
193 Camlp4 can parse normal Ocaml concrete syntax or any other
194 user-definable syntax. As an example, an alternative syntax is
195 provided, named revised, because it tries to fix some small problems
196 of the normal syntax.
198 Camlp4 can pretty print the normal Ocaml concrete syntax or the
199 revised one. It is therefore always possible to have a version of your
200 sources compilable by the Objective Caml compiler without
203 %description camlp4 -l pl
204 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
205 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
206 jêzyka (cytowania, rozszerzenia).
208 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
209 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
210 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
211 wystêpuj±ce w sk³adni oryginalnej.
213 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
214 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
217 %package compiler-objects
218 Summary: Compiled parts of OCaml compiler
219 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
220 Group: Development/Languages
221 Requires: %{name} = %{epoch}:%{version}-%{release}
222 Obsoletes: ocaml-devel
223 Provides: ocaml-devel
225 %description compiler-objects
226 This package contains *.cmi and *.cmo files being parts of OCaml
227 compiler. They are needed to compile some programs.
229 %description compiler-objects -l pl
230 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
231 OCamla. S± one wymagane do kompilacji niektórych programów.
233 %package ocamldoc-devel
234 Summary: Files needed to develop programs using ocamldoc
235 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
236 Group: Development/Languages
237 Requires: %{name} = %{epoch}:%{version}-%{release}
239 %description ocamldoc-devel
240 You need this package if you are going to write ocamldoc front end or
243 %description ocamldoc-devel -l pl
244 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
245 dla ocamldoc lub co¶ podobnego.
248 Summary: Sources of OCaml standard library
249 Summary(pl): ¬ród³a biblioteki standardowej OCamla
250 Group: Development/Languages
251 Requires: %{name} = %{epoch}:%{version}-%{release}
253 %description lib-source
254 This sources come helpful during debugging of user programs with ocamldebug.
256 %description lib-source -l pl
257 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
258 z u¿yciem ocamldebug.
260 # maybe we'll want to add some more stuff here?
262 Summary: Example source code for OCaml
263 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
264 Group: Development/Languages
265 Requires: %{name} = %{epoch}:%{version}-%{release}
267 %description examples
268 This packages contains sources for Okasaki's Purely Functional
269 Datastructures in OCaml, along with some contributions.
271 %description examples -l pl
272 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
273 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
276 %setup -q -a1 -a3 -a5
278 tar xjf %{SOURCE7} -C examples
279 tar xzf %{SOURCE8} -C examples
280 # order mess with docs somewhat
283 mv htmlman docs/html/ocaml
284 cp %{SOURCE2} docs/ocaml.ps.gz
285 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
286 cp %{SOURCE4} docs/camlp4.ps.gz
287 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
288 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
296 cp -f /usr/share/automake/config.sub config/gnu
298 -cc "%{__cc} %{rpmcflags}" \
300 -libdir %{_libdir}/%{name} \
301 -mandir %{_mandir}/man1 \
303 %{!?with_tk:-no-tk} \
305 -x11lib /usr/X11R6/%{_lib}
307 %{__make} world bootstrap opt.opt
308 %{__make} -C tools objinfo
311 rm -rf $RPM_BUILD_ROOT
312 install -d $RPM_BUILD_ROOT{%{_includedir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
315 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
316 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
317 MANDIR=$RPM_BUILD_ROOT%{_mandir}
319 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
320 %{_libdir}/%{name}/stublibs
325 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
326 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
327 else echo xemacs; fi`" \
328 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
331 # symlink .opt versions of compilers (if present)
332 # warning: don't do that with camlp4 (can't load extensions then)
333 for f in ocamlc ocamlopt ocamldoc ocamllex; do
334 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
335 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
336 $RPM_BUILD_ROOT%{_bindir}/$f.byte
337 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
341 # move includes to the proper place
342 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
343 # but leave compatibility symlink
344 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
346 # compiled sources of compiler, needed by some programs
347 for f in {asm,byte}comp parsing typing utils ; do
348 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
349 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
352 # this isn't installed by default, but is useful
353 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
354 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
355 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
356 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
359 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
360 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
363 rm -rf $RPM_BUILD_ROOT
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_bindir}/ocamlrun
368 %dir %{_libdir}/%{name}
369 %dir %{_libdir}/%{name}/stublibs
370 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
371 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
373 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
374 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
378 %defattr(644,root,root,755)
379 %doc LICENSE Changes README Upgrading
381 %attr(755,root,root) %{_bindir}/ocaml*
382 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
383 %exclude %{_bindir}/ocamlrun
384 %attr(755,root,root) %{_bindir}/*labels
386 %{_libdir}/%{name}/caml
387 %{_libdir}/%{name}/threads
388 %dir %{_libdir}/%{name}/vmthreads
389 %dir %{_libdir}/%{name}/vmthreads/*.cm*
390 %dir %{_libdir}/%{name}/vmthreads/*.a
391 %{_libdir}/%{name}/*.a
392 %{_libdir}/%{name}/*.o
393 %{_libdir}/%{name}/*.cm*
394 %exclude %{_libdir}/%{name}/*graphics*
395 %{_libdir}/%{name}/ld.conf
396 %{_libdir}/%{name}/camlheader
397 %{_libdir}/%{name}/camlheader_ur
398 %dir %{_libdir}/%{name}/ocamldoc
399 %{_libdir}/%{name}/ocamldoc/*.hva
400 %attr(755,root,root) %{_libdir}/%{name}/expunge
401 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
402 %attr(755,root,root) %{_libdir}/%{name}/*labels
403 %{_mandir}/man1/*ocaml*
406 %defattr(644,root,root,755)
407 %{_libdir}/%{name}/*.ml
408 %{_libdir}/%{name}/*.mli
409 %{_libdir}/%{name}/*/*.mli
412 %defattr(644,root,root,755)
413 %{_examplesdir}/%{name}-%{version}
415 # they are poor, html is much better
419 %files compiler-objects
420 %defattr(644,root,root,755)
421 %{_libdir}/%{name}/compiler
424 %defattr(644,root,root,755)
425 %doc docs/html/camlp4*
426 %attr(755,root,root) %{_bindir}/*camlp4*
427 %attr(755,root,root) %{_bindir}/ocpp
428 # Not installed since 3.05, is is needed?
429 #%attr(755,root,root) %{_bindir}/odyl
430 %{_libdir}/%{name}/camlp4
431 %{_mandir}/man*/*camlp4*
432 %{_mandir}/man*/*ocpp*
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_bindir}/labltk
438 %attr(755,root,root) %{_bindir}/ocamlbrowser
439 %dir %{_libdir}/%{name}/labltk
440 %{_libdir}/%{name}/labltk/*.cm*
441 %{_libdir}/%{name}/labltk/*.a
442 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
443 %{_examplesdir}/%{name}-labltk-%{version}
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
448 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
452 %files x11graphics-devel
453 %defattr(644,root,root,755)
454 %{_libdir}/%{name}/graphics*.cm*
455 %{_libdir}/%{name}/graphics.a
456 %{_libdir}/%{name}/libgraphics.a
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
465 %defattr(644,root,root,755)
466 %{_datadir}/emacs/site-lisp/*.el*
469 %files ocamldoc-devel
470 %defattr(644,root,root,755)
471 %{_libdir}/%{name}/ocamldoc/*.cm*
472 %{_libdir}/%{name}/ocamldoc/*.a
475 %defattr(644,root,root,755)