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}
208 %description compiler-objects
209 This package contains *.cmi and *.cmo files being parts of OCaml
210 compiler. They are needed to compile some programs.
212 %description compiler-objects -l pl
213 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
214 OCamla. S± one wymagane do kompilacji niektórych programów.
216 %package ocamldoc-devel
217 Summary: Files needed to develop programs using ocamldoc
218 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
219 Group: Development/Languages
220 Requires: %{name} = %{version}-%{release}
222 %description ocamldoc-devel
223 You need this package if you are going to write ocamldoc front end or
226 %description ocamldoc-devel -l pl
227 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
228 dla ocamldoc lub co¶ podobnego.
231 Summary: Sources of OCaml standard library
232 Summary(pl): ¬ród³a biblioteki standardowej OCamla
233 Group: Development/Languages
234 Requires: %{name} = %{version}-%{release}
236 %description lib-source
237 This sources come helpful during debugging of user programs with ocamldebug.
239 %description lib-source -l pl
240 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
241 z u¿yciem ocamldebug.
243 # maybe we'll want to add some more stuff here?
245 Summary: Example source code for OCaml
246 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
247 Group: Development/Languages
248 Requires: %{name} = %{version}-%{release}
250 %description examples
251 This packages contains sources for Okasaki's Purely Functional
252 Datastructures in OCaml, along with some contributions.
254 %description examples -l pl
255 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
256 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
261 %setup -q -T -D -c -n %{name}-%{version}/examples -a 7
262 %setup -q -T -D -c -n %{name}-%{version}/examples -a 8
263 %setup -q -T -D -n %{name}-%{version} -a 3
264 %setup -q -T -D -n %{name}-%{version} -a 5
265 # order mess with docs somewhat
268 mv htmlman docs/html/ocaml
269 cp %{SOURCE2} docs/ocaml.ps.gz
270 mv camlp4-%{version}-manual.html docs/html/camlp4
271 cp %{SOURCE4} docs/camlp4.ps.gz
272 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
273 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
283 -cc "%{__cc} %{rpmcflags}" \
285 -libdir %{_libdir}/%{name} \
286 -mandir %{_mandir}/man1 \
288 %{?_without_tk:-no-tk} \
291 %{__make} world bootstrap opt.opt
292 %{__make} -C tools objinfo
295 rm -rf $RPM_BUILD_ROOT
298 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
299 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
300 MANDIR=$RPM_BUILD_ROOT%{_mandir}
302 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
303 %{_libdir}/%{name}/stublibs
307 %if %{!?_without_emacs:1}%{?_without_emacs:0}
308 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
309 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
310 else echo xemacs; fi`" \
311 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
314 # symlink .opt versions of compilers (if present)
315 # warning: don't do that with camlp4 (can't load extensions then)
316 for f in ocamlc ocamlopt ocamldoc ocamllex; do
317 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
318 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
319 $RPM_BUILD_ROOT%{_bindir}/$f.byte
320 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
324 # move includes to the proper place
325 install -d $RPM_BUILD_ROOT%{_includedir}
326 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
327 # but leave compatibility symlink
328 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
330 # compiled sources of compiler, needed by some programs
331 for f in {asm,byte}comp parsing typing utils ; do
332 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
333 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
336 # this isn't installed by default, but is useful
337 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
339 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
340 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
342 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
343 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
345 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
348 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
349 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
352 rm -rf $RPM_BUILD_ROOT
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_bindir}/ocamlrun
357 %dir %{_libdir}/%{name}
358 %dir %{_libdir}/%{name}/stublibs
359 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
360 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
361 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlllabltk.so}
362 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlltkanim.so}
365 %defattr(644,root,root,755)
366 %doc LICENSE Changes README Upgrading
368 %attr(755,root,root) %{_bindir}/ocaml*
369 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
370 %exclude %{_bindir}/ocamlrun
371 %attr(755,root,root) %{_bindir}/*labels
373 %{_libdir}/%{name}/caml
374 %{_libdir}/%{name}/threads
375 %{_libdir}/%{name}/*.a
376 %{_libdir}/%{name}/*.o
377 %{_libdir}/%{name}/*.cm*
378 %exclude %{_libdir}/%{name}/*graphics*
379 %{_libdir}/%{name}/ld.conf
380 %{_libdir}/%{name}/camlheader
381 %{_libdir}/%{name}/camlheader_ur
382 %dir %{_libdir}/%{name}/ocamldoc
383 %{_libdir}/%{name}/ocamldoc/*.sty
384 %{_libdir}/%{name}/ocamldoc/*.hva
385 %attr(755,root,root) %{_libdir}/%{name}/expunge
386 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
387 %attr(755,root,root) %{_libdir}/%{name}/*labels
388 %{_mandir}/man1/*ocaml*
391 %defattr(644,root,root,755)
392 %{_libdir}/%{name}/*.ml
393 %{_libdir}/%{name}/*.mli
396 %defattr(644,root,root,755)
397 %{_examplesdir}/%{name}-%{version}
399 # they are poor, html is much better
403 %files compiler-objects
404 %defattr(644,root,root,755)
405 %{_libdir}/%{name}/compiler
408 %defattr(644,root,root,755)
409 %doc docs/html/camlp4*
410 %attr(755,root,root) %{_bindir}/*camlp4*
411 %attr(755,root,root) %{_bindir}/ocpp
412 # Not installed since 3.05, is is needed?
413 #%attr(755,root,root) %{_bindir}/odyl
414 %{_libdir}/%{name}/camlp4
415 %{_mandir}/man*/*camlp4*
416 %{_mandir}/man*/*ocpp*
418 %if %{!?_without_tk:1}%{?_without_tk:0}
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_bindir}/labltk
422 %attr(755,root,root) %{_bindir}/ocamlbrowser
423 %dir %{_libdir}/%{name}/labltk
424 %{_libdir}/%{name}/labltk/*.cm*
425 %{_libdir}/%{name}/labltk/*.a
426 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
427 %{_examplesdir}/%{name}-labltk-%{version}
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
432 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
435 %if %{!?_without_x11:1}%{?_without_x11:0}
436 %files x11graphics-devel
437 %defattr(644,root,root,755)
438 %{_libdir}/%{name}/graphics*.cm*
439 %{_libdir}/%{name}/graphics.a
440 %{_libdir}/%{name}/libgraphics.a
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
447 %if %{!?_without_emacs:1}%{?_without_emacs:0}
449 %defattr(644,root,root,755)
450 %{_datadir}/emacs/site-lisp/*.el*
453 %files ocamldoc-devel
454 %defattr(644,root,root,755)
455 %{_libdir}/%{name}/ocamldoc/*.cm*
456 %{_libdir}/%{name}/ocamldoc/*.a
459 %defattr(644,root,root,755)