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}
15 Summary: The Objective Caml compiler and programming environment
16 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: c6ef478362295c150101cdd2efcd38e0
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 #Patch4: %{name}-unused-var-warning.patch
46 #Patch5: %{name}-3.07-patch2.diffs
47 #Patch6: %{name}-emacs_batch_mode.patch
48 URL: http://caml.inria.fr/
49 %{?with_x:BuildRequires: XFree86-devel}
50 %{?with_db3:BuildRequires: db3-devel}
51 %{!?with_db3:BuildRequires: db-devel >= 4.1}
52 %{?with_tk:BuildRequires: tk-devel}
55 BuildRequires: xemacs-common
56 BuildRequires: xemacs-fsf-compat-pkg
59 Requires: ocaml-runtime = %{version}-%{release}
60 Provides: ocaml-ocamldoc
61 Obsoletes: ocaml-ocamldoc
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 Objective Caml is a high-level, strongly-typed, functional and
66 object-oriented programming language from the ML family of languages.
68 This package comprises two batch compilers (a fast bytecode compiler
69 and an optimizing native-code compiler), an interactive toplevel
70 system, Lex&Yacc tools, a replay debugger, and a comprehensive
74 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
75 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
77 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
78 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
79 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
80 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
83 Summary: PostScript documentation for OCaml
84 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
85 Group: Development/Tools
88 PostScript documentation for OCaml. HTML documentation is in main package.
90 %description doc-ps -l pl
91 Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
95 Summary: Emacs mode for OCaml
96 Summary(pl): Tryb OCamla dla Emacsa
97 Group: Development/Tools
98 Requires: %{name} = %{version}
101 Emacs mode files for Objective Caml language.
103 %description emacs -l pl
104 Pliki trybu OCamla dla Emacsa.
107 Summary: Runtime system for OCaml
108 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
112 This package contains binaries needed to run bytecode OCaml programs:
113 ocamlrun bytecode interpreter, and basic dynamic link libraries.
115 %description runtime -l pl
116 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
117 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
118 podstawowe bibliotki linkowane dynamicznie.
120 %package labltk-devel
121 Summary: LablTk library for OCaml
122 Summary(pl): Biblioteka LablTk dla OCamla
123 Group: Development/Libraries
124 Requires: %{name}-labltk = %{version}-%{release}
126 %description labltk-devel
127 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
128 contains files needed to develop OCaml programs using LablTk.
130 %description labltk-devel -l pl
131 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
132 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
136 Summary: Runtime for LablTk library
137 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
139 Requires: %{name} = %{version}-%{release}
142 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
143 contains files needed to run bytecode OCaml programs using LablTk.
145 %description labltk -l pl
146 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
147 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
150 %package x11graphics-devel
151 Summary: X11 graphic output for OCaml
152 Summary(pl): Dostêp do X11 dla OCamla
153 Group: Development/Libraries
154 Requires: %{name}-x11graphics = %{version}-%{release}
156 %description x11graphics-devel
157 x11graphics module gives OCaml program access to drawing in X11
158 windows. This package contains files needed to develop OCaml programs
161 %description x11graphics-devel -l pl
162 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
163 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
164 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
167 Summary: X11 graphic output for OCaml
168 Summary(pl): Dostêp do X11 dla OCamla
169 Group: Development/Libraries
170 Requires: %{name} = %{version}-%{release}
172 %description x11graphics
173 x11graphics module gives OCaml program access to drawing in X11
174 windows. This package contains files needed to run bytecode OCaml
175 programs using x11graphics.
177 %description x11graphics -l pl
178 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
179 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
180 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
183 Summary: Objective Caml Preprocessor
184 Summary(pl): Preprocesor OCamla
185 Group: Development/Languages
186 Requires: %{name} = %{version}-%{release}
187 Provides: camlp4 = %{version}-%{release}
191 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
192 tools for syntax (grammars) and the ability to modify the concrete
193 syntax of the language (quotations, syntax extensions).
195 Camlp4 can parse normal Ocaml concrete syntax or any other
196 user-definable syntax. As an example, an alternative syntax is
197 provided, named revised, because it tries to fix some small problems
198 of the normal syntax.
200 Camlp4 can pretty print the normal Ocaml concrete syntax or the
201 revised one. It is therefore always possible to have a version of your
202 sources compilable by the Objective Caml compiler without
205 %description camlp4 -l pl
206 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
207 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
208 jêzyka (cytowania, rozszerzenia).
210 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
211 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
212 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
213 wystêpuj±ce w sk³adni oryginalnej.
215 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
216 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
219 %package compiler-objects
220 Summary: Compiled parts of OCaml compiler
221 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
222 Group: Development/Languages
223 Requires: %{name} = %{version}-%{release}
224 Obsoletes: ocaml-devel
225 Provides: ocaml-devel
227 %description compiler-objects
228 This package contains *.cmi and *.cmo files being parts of OCaml
229 compiler. They are needed to compile some programs.
231 %description compiler-objects -l pl
232 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
233 OCamla. S± one wymagane do kompilacji niektórych programów.
235 %package ocamldoc-devel
236 Summary: Files needed to develop programs using ocamldoc
237 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
238 Group: Development/Languages
239 Requires: %{name} = %{version}-%{release}
241 %description ocamldoc-devel
242 You need this package if you are going to write ocamldoc front end or
245 %description ocamldoc-devel -l pl
246 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
247 dla ocamldoc lub co¶ podobnego.
250 Summary: Sources of OCaml standard library
251 Summary(pl): ¬ród³a biblioteki standardowej OCamla
252 Group: Development/Languages
253 Requires: %{name} = %{version}-%{release}
255 %description lib-source
256 This sources come helpful during debugging of user programs with ocamldebug.
258 %description lib-source -l pl
259 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
260 z u¿yciem ocamldebug.
262 # maybe we'll want to add some more stuff here?
264 Summary: Example source code for OCaml
265 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
266 Group: Development/Languages
267 Requires: %{name} = %{version}-%{release}
269 %description examples
270 This packages contains sources for Okasaki's Purely Functional
271 Datastructures in OCaml, along with some contributions.
273 %description examples -l pl
274 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
275 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
278 %setup -q -a1 -a3 -a5
280 tar xjf %{SOURCE7} -C examples
281 tar xzf %{SOURCE8} -C examples
282 # order mess with docs somewhat
285 mv htmlman docs/html/ocaml
286 cp %{SOURCE2} docs/ocaml.ps.gz
287 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
288 cp %{SOURCE4} docs/camlp4.ps.gz
289 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
290 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
300 cp /usr/share/automake/config.sub config/gnu
302 -cc "%{__cc} %{rpmcflags}" \
304 -libdir %{_libdir}/%{name} \
305 -mandir %{_mandir}/man1 \
307 %{!?with_tk:-no-tk} \
309 -x11lib /usr/X11R6/%{_lib}
311 %{__make} world bootstrap opt.opt
312 %{__make} -C tools objinfo
315 rm -rf $RPM_BUILD_ROOT
316 install -d $RPM_BUILD_ROOT{%{_includedir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
319 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
320 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
321 MANDIR=$RPM_BUILD_ROOT%{_mandir}
323 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
324 %{_libdir}/%{name}/stublibs
329 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
330 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
331 else echo xemacs; fi`" \
332 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
335 # symlink .opt versions of compilers (if present)
336 # warning: don't do that with camlp4 (can't load extensions then)
337 for f in ocamlc ocamlopt ocamldoc ocamllex; do
338 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
339 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
340 $RPM_BUILD_ROOT%{_bindir}/$f.byte
341 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
345 # move includes to the proper place
346 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
347 # but leave compatibility symlink
348 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
350 # compiled sources of compiler, needed by some programs
351 for f in {asm,byte}comp parsing typing utils ; do
352 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
353 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
356 # this isn't installed by default, but is useful
357 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
358 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
359 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
360 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
363 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
364 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
367 rm -rf $RPM_BUILD_ROOT
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{_bindir}/ocamlrun
372 %dir %{_libdir}/%{name}
373 %dir %{_libdir}/%{name}/stublibs
374 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
375 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
377 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
378 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
382 %defattr(644,root,root,755)
383 %doc LICENSE Changes README Upgrading
385 %attr(755,root,root) %{_bindir}/ocaml*
386 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
387 %exclude %{_bindir}/ocamlrun
388 %attr(755,root,root) %{_bindir}/*labels
390 %{_libdir}/%{name}/caml
391 %{_libdir}/%{name}/threads
392 %dir %{_libdir}/%{name}/vmthreads
393 %dir %{_libdir}/%{name}/vmthreads/*.cm*
394 %dir %{_libdir}/%{name}/vmthreads/*.a
395 %{_libdir}/%{name}/*.a
396 %{_libdir}/%{name}/*.o
397 %{_libdir}/%{name}/*.cm*
398 %exclude %{_libdir}/%{name}/*graphics*
399 %{_libdir}/%{name}/ld.conf
400 %{_libdir}/%{name}/camlheader
401 %{_libdir}/%{name}/camlheader_ur
402 %dir %{_libdir}/%{name}/ocamldoc
403 %{_libdir}/%{name}/ocamldoc/*.hva
404 %attr(755,root,root) %{_libdir}/%{name}/expunge
405 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
406 %attr(755,root,root) %{_libdir}/%{name}/*labels
407 %{_mandir}/man1/*ocaml*
410 %defattr(644,root,root,755)
411 %{_libdir}/%{name}/*.ml
412 %{_libdir}/%{name}/*.mli
413 %{_libdir}/%{name}/*/*.mli
416 %defattr(644,root,root,755)
417 %{_examplesdir}/%{name}-%{version}
419 # they are poor, html is much better
423 %files compiler-objects
424 %defattr(644,root,root,755)
425 %{_libdir}/%{name}/compiler
428 %defattr(644,root,root,755)
429 %doc docs/html/camlp4*
430 %attr(755,root,root) %{_bindir}/*camlp4*
431 %attr(755,root,root) %{_bindir}/ocpp
432 # Not installed since 3.05, is is needed?
433 #%attr(755,root,root) %{_bindir}/odyl
434 %{_libdir}/%{name}/camlp4
435 %{_mandir}/man*/*camlp4*
436 %{_mandir}/man*/*ocpp*
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_bindir}/labltk
442 %attr(755,root,root) %{_bindir}/ocamlbrowser
443 %dir %{_libdir}/%{name}/labltk
444 %{_libdir}/%{name}/labltk/*.cm*
445 %{_libdir}/%{name}/labltk/*.a
446 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
447 %{_examplesdir}/%{name}-labltk-%{version}
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
452 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
456 %files x11graphics-devel
457 %defattr(644,root,root,755)
458 %{_libdir}/%{name}/graphics*.cm*
459 %{_libdir}/%{name}/graphics.a
460 %{_libdir}/%{name}/libgraphics.a
463 %defattr(644,root,root,755)
464 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
469 %defattr(644,root,root,755)
470 %{_datadir}/emacs/site-lisp/*.el*
473 %files ocamldoc-devel
474 %defattr(644,root,root,755)
475 %{_libdir}/%{name}/ocamldoc/*.cm*
476 %{_libdir}/%{name}/ocamldoc/*.a
479 %defattr(644,root,root,755)