3 # _without_emacs - without emacs subpackage
4 # _without_tk - without tk support
5 # _without_x11 - without X11 support (implies --without tk)
6 # _with_db3 - use db3 instead of db 4.x
8 %{?_without_x11:%define _without_tk 1}
10 Summary: The Objective Caml compiler and programming environment
11 Summary(pl): Kompilator OCamla (Objective Caml) oraz ¶rodowisko programistyczne
15 License: distributable
16 Vendor: Group of implementors <caml-light@inria.fr>
17 Group: Development/Languages
18 Source0: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}/%{name}-%{version}.tar.gz
19 Source1: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}/%{name}-%{version}-refman.html.tar.gz
20 Source2: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}/%{name}-%{version}-refman.ps.gz
21 Source3: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-manual.html.tar.gz
22 Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-manual.dvi.gz
23 Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.html.tar.gz
24 Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.dvi.gz
25 Source7: http://www.oefai.at/~markus/ocaml_sources/pure-fun-1.0.4.tar.bz2
26 Source8: http://www.oefai.at/~markus/ocaml_sources/ds-contrib.tar.gz
27 Patch0: %{name}-build.patch
28 Patch1: %{name}-manlinks.patch
29 Patch2: %{name}-db3.patch
30 Patch3: %{name}-objinfo.patch
31 Patch4: %{name}-opt-symbols.patch
32 Patch5: %{name}-mano.patch
33 URL: http://caml.inria.fr/
34 Requires: ocaml-runtime = %{version}-%{release}
35 Obsoletes: ocaml-ocamldoc
36 Provides: ocaml-ocamldoc
37 %{?_with_db3:BuildRequires: db3-devel}
38 %{!?_with_db3:BuildRequires: db-devel >= 4.1}
39 %{!?_without_tk:BuildRequires: tk-devel}
40 %{!?_without_x11:BuildRequires: XFree86-devel}
41 %{!?_without_emacs:BuildRequires: xemacs}
42 %{!?_without_emacs:BuildRequires: xemacs-common}
43 %{!?_without_emacs:BuildRequires: xemacs-fsf-compat-pkg}
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Objective Caml is a high-level, strongly-typed, functional and
49 object-oriented programming language from the ML family of languages.
51 This package comprises two batch compilers (a fast bytecode compiler
52 and an optimizing native-code compiler), an interactive toplevel
53 system, Lex&Yacc tools, a replay debugger, and a comprehensive
57 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
58 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
60 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
61 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
62 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
63 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
66 Summary: PostScript documentation for OCaml
67 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
68 Group: Development/Tools
71 PostScript documentation for OCaml. HTML documentation is in main package.
73 %description doc-ps -l pl
74 Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
78 Summary: Emacs mode for OCaml
79 Summary(pl): Tryb OCamla dla Emacsa
80 Group: Development/Tools
81 Requires: %{name} = %{version}
84 Emacs mode files for Objective Caml language.
86 %description emacs -l pl
87 Pliki trybu OCamla dla Emacsa.
90 Summary: Runtime system for OCaml
91 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
95 This package contains binaries needed to run bytecode OCaml programs:
96 ocamlrun bytecode interpreter, and basic dynamic link libraries.
98 %description runtime -l pl
99 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
100 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
101 podstawowe bibliotki linkowane dynamicznie.
103 %package labltk-devel
104 Summary: LablTk library for OCaml
105 Summary(pl): Biblioteka LablTk dla OCamla
106 Group: Development/Libraries
107 Requires: %{name}-labltk = %{version}-%{release}
109 %description labltk-devel
110 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
111 contains files needed to develop OCaml programs using LablTk.
113 %description labltk-devel -l pl
114 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
115 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
119 Summary: Runtime for LablTk library
120 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
122 Requires: %{name} = %{version}-%{release}
125 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
126 contains files needed to run bytecode OCaml programs using LablTk.
128 %description labltk -l pl
129 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
130 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
133 %package x11graphics-devel
134 Summary: X11 graphic output for OCaml
135 Summary(pl): Dostêp do X11 dla OCamla
136 Group: Development/Libraries
137 Requires: %{name}-x11graphics = %{version}-%{release}
139 %description x11graphics-devel
140 x11graphics module gives OCaml program access to drawing in X11
141 windows. This package contains files needed to develop OCaml programs
144 %description x11graphics-devel -l pl
145 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
146 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
147 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
150 Summary: X11 graphic output for OCaml
151 Summary(pl): Dostêp do X11 dla OCamla
152 Group: Development/Libraries
153 Requires: %{name} = %{version}-%{release}
155 %description x11graphics
156 x11graphics module gives OCaml program access to drawing in X11
157 windows. This package contains files needed to run bytecode OCaml
158 programs using x11graphics.
160 %description x11graphics -l pl
161 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
162 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
163 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
166 Summary: Objective Caml Preprocessor
167 Summary(pl): Preprocesor OCamla
168 Group: Development/Languages
169 Requires: %{name} = %{version}-%{release}
170 Provides: camlp4 = %{version}-%{release}
174 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
175 tools for syntax (grammars) and the ability to modify the concrete
176 syntax of the language (quotations, syntax extensions).
178 Camlp4 can parse normal Ocaml concrete syntax or any other
179 user-definable syntax. As an example, an alternative syntax is
180 provided, named revised, because it tries to fix some small problems
181 of the normal syntax.
183 Camlp4 can pretty print the normal Ocaml concrete syntax or the
184 revised one. It is therefore always possible to have a version of your
185 sources compilable by the Objective Caml compiler without
188 %description camlp4 -l pl
189 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
190 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
191 jêzyka (cytowania, rozszerzenia).
193 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
194 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
195 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
196 wystêpuj±ce w sk³adni oryginalnej.
198 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
199 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
202 %package compiler-objects
203 Summary: Compiled parts of OCaml compiler
204 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
205 Group: Development/Languages
206 Requires: %{name} = %{version}-%{release}
207 Obsoletes: ocaml-devel
209 %description compiler-objects
210 This package contains *.cmi and *.cmo files being parts of OCaml
211 compiler. They are needed to compile some programs.
213 %description compiler-objects -l pl
214 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
215 OCamla. S± one wymagane do kompilacji niektórych programów.
217 %package ocamldoc-devel
218 Summary: Files needed to develop programs using ocamldoc
219 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
220 Group: Development/Languages
221 Requires: %{name} = %{version}-%{release}
223 %description ocamldoc-devel
224 You need this package if you are going to write ocamldoc front end or
227 %description ocamldoc-devel -l pl
228 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
229 dla ocamldoc lub co¶ podobnego.
232 Summary: Sources of OCaml standard library
233 Summary(pl): ¬ród³a biblioteki standardowej OCamla
234 Group: Development/Languages
235 Requires: %{name} = %{version}-%{release}
237 %description lib-source
238 This sources come helpful during debugging of user programs with ocamldebug.
240 %description lib-source -l pl
241 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
242 z u¿yciem ocamldebug.
244 # maybe we'll want to add some more stuff here?
246 Summary: Example source code for OCaml
247 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
248 Group: Development/Languages
249 Requires: %{name} = %{version}-%{release}
251 %description examples
252 This packages contains sources for Okasaki's Purely Functional
253 Datastructures in OCaml, along with some contributions.
255 %description examples -l pl
256 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
257 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
262 %setup -q -T -D -c -n %{name}-%{version}/examples -a 7
263 %setup -q -T -D -c -n %{name}-%{version}/examples -a 8
264 %setup -q -T -D -n %{name}-%{version} -a 3
265 %setup -q -T -D -n %{name}-%{version} -a 5
266 # order mess with docs somewhat
269 mv htmlman docs/html/ocaml
270 cp %{SOURCE2} docs/ocaml.ps.gz
271 mv camlp4-%{version}-manual.html docs/html/camlp4
272 cp %{SOURCE4} docs/camlp4.ps.gz
273 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
274 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
284 -cc "%{__cc} %{rpmcflags}" \
286 -libdir %{_libdir}/%{name} \
287 -mandir %{_mandir}/man1 \
289 %{?_without_tk:-no-tk} \
292 %{__make} world bootstrap opt.opt
293 %{__make} -C tools objinfo
296 rm -rf $RPM_BUILD_ROOT
299 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
300 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
301 MANDIR=$RPM_BUILD_ROOT%{_mandir}
303 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
304 %{_libdir}/%{name}/stublibs
308 %if %{!?_without_emacs:1}%{?_without_emacs:0}
309 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
310 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
311 else echo xemacs; fi`" \
312 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
315 # symlink .opt versions of compilers (if present)
316 # warning: don't do that with camlp4 (can't load extensions then)
317 for f in ocamlc ocamlopt ocamldoc ocamllex; do
318 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
319 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
320 $RPM_BUILD_ROOT%{_bindir}/$f.byte
321 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
325 # move includes to the proper place
326 install -d $RPM_BUILD_ROOT%{_includedir}
327 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
328 # but leave compatibility symlink
329 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
331 # compiled sources of compiler, needed by some programs
332 for f in {asm,byte}comp parsing typing utils ; do
333 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
334 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
337 # this isn't installed by default, but is useful
338 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
340 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
341 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
343 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
344 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
346 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
349 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
350 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
353 rm -rf $RPM_BUILD_ROOT
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_bindir}/ocamlrun
358 %dir %{_libdir}/%{name}
359 %dir %{_libdir}/%{name}/stublibs
360 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
361 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
362 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlllabltk.so}
363 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlltkanim.so}
366 %defattr(644,root,root,755)
367 %doc LICENSE Changes README Upgrading
369 %attr(755,root,root) %{_bindir}/ocaml*
370 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
371 %exclude %{_bindir}/ocamlrun
372 %attr(755,root,root) %{_bindir}/*labels
374 %{_libdir}/%{name}/caml
375 %{_libdir}/%{name}/threads
376 %{_libdir}/%{name}/*.a
377 %{_libdir}/%{name}/*.o
378 %{_libdir}/%{name}/*.cm*
379 %exclude %{_libdir}/%{name}/*graphics*
380 %{_libdir}/%{name}/ld.conf
381 %{_libdir}/%{name}/camlheader
382 %{_libdir}/%{name}/camlheader_ur
383 %dir %{_libdir}/%{name}/ocamldoc
384 %{_libdir}/%{name}/ocamldoc/*.sty
385 %{_libdir}/%{name}/ocamldoc/*.hva
386 %attr(755,root,root) %{_libdir}/%{name}/expunge
387 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
388 %attr(755,root,root) %{_libdir}/%{name}/*labels
389 %{_mandir}/man1/*ocaml*
392 %defattr(644,root,root,755)
393 %{_libdir}/%{name}/*.ml
394 %{_libdir}/%{name}/*.mli
397 %defattr(644,root,root,755)
398 %{_examplesdir}/%{name}-%{version}
400 # they are poor, html is much better
404 %files compiler-objects
405 %defattr(644,root,root,755)
406 %{_libdir}/%{name}/compiler
409 %defattr(644,root,root,755)
410 %doc docs/html/camlp4*
411 %attr(755,root,root) %{_bindir}/*camlp4*
412 %attr(755,root,root) %{_bindir}/ocpp
413 # Not installed since 3.05, is is needed?
414 #%attr(755,root,root) %{_bindir}/odyl
415 %{_libdir}/%{name}/camlp4
416 %{_mandir}/man*/*camlp4*
417 %{_mandir}/man*/*ocpp*
419 %if %{!?_without_tk:1}%{?_without_tk:0}
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_bindir}/labltk
423 %attr(755,root,root) %{_bindir}/ocamlbrowser
424 %dir %{_libdir}/%{name}/labltk
425 %{_libdir}/%{name}/labltk/*.cm*
426 %{_libdir}/%{name}/labltk/*.a
427 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
428 %{_examplesdir}/%{name}-labltk-%{version}
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
433 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
436 %if %{!?_without_x11:1}%{?_without_x11:0}
437 %files x11graphics-devel
438 %defattr(644,root,root,755)
439 %{_libdir}/%{name}/graphics*.cm*
440 %{_libdir}/%{name}/graphics.a
441 %{_libdir}/%{name}/libgraphics.a
444 %defattr(644,root,root,755)
445 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
448 %if %{!?_without_emacs:1}%{?_without_emacs:0}
450 %defattr(644,root,root,755)
451 %{_datadir}/emacs/site-lisp/*.el*
454 %files ocamldoc-devel
455 %defattr(644,root,root,755)
456 %{_libdir}/%{name}/ocamldoc/*.cm*
457 %{_libdir}/%{name}/ocamldoc/*.a
460 %defattr(644,root,root,755)