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
19 License: distributable
20 Vendor: Group of implementors <caml-light@inria.fr>
21 Group: Development/Languages
22 Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.gz
23 # Source0-md5: 8a32dd665d0d8fc08a027e1b8f68a001
24 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.html.tar.gz
25 # Source1-md5: 0daee5643db6960682c1a7d84467885f
26 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
27 # Source2-md5: 35a5d4318456c0982e72ee3f33364bf5
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 # needs update for ocaml 3.08
45 #Patch4: %{name}-unused-var-warning.patch
46 URL: http://caml.inria.fr/
47 %{?with_x:BuildRequires: XFree86-devel}
48 %{?with_db3:BuildRequires: db3-devel}
49 %{!?with_db3:BuildRequires: db-devel >= 4.1}
50 %{?with_tk:BuildRequires: tk-devel}
53 BuildRequires: xemacs-common
54 BuildRequires: xemacs-fsf-compat-pkg
56 Requires: ocaml-runtime = %{version}-%{release}
57 Provides: ocaml-ocamldoc
58 Obsoletes: ocaml-ocamldoc
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 Objective Caml is a high-level, strongly-typed, functional and
63 object-oriented programming language from the ML family of languages.
65 This package comprises two batch compilers (a fast bytecode compiler
66 and an optimizing native-code compiler), an interactive toplevel
67 system, Lex&Yacc tools, a replay debugger, and a comprehensive
71 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
72 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
74 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
75 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
76 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
77 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
80 Summary: PostScript documentation for OCaml
81 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
82 Group: Development/Tools
85 PostScript documentation for OCaml. HTML documentation is in main package.
87 %description doc-ps -l pl
88 Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
92 Summary: Emacs mode for OCaml
93 Summary(pl): Tryb OCamla dla Emacsa
94 Group: Development/Tools
95 Requires: %{name} = %{version}-%{release}
98 Emacs mode files for Objective Caml language.
100 %description emacs -l pl
101 Pliki trybu OCamla dla Emacsa.
104 Summary: Runtime system for OCaml
105 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
109 This package contains binaries needed to run bytecode OCaml programs:
110 ocamlrun bytecode interpreter, and basic dynamic link libraries.
112 %description runtime -l pl
113 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
114 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
115 podstawowe bibliotki linkowane dynamicznie.
117 %package labltk-devel
118 Summary: LablTk library for OCaml
119 Summary(pl): Biblioteka LablTk dla OCamla
120 Group: Development/Libraries
121 Requires: %{name}-labltk = %{version}-%{release}
123 %description labltk-devel
124 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
125 contains files needed to develop OCaml programs using LablTk.
127 %description labltk-devel -l pl
128 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
129 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
133 Summary: Runtime for LablTk library
134 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
136 Requires: %{name} = %{version}-%{release}
139 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
140 contains files needed to run bytecode OCaml programs using LablTk.
142 %description labltk -l pl
143 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
144 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
147 %package x11graphics-devel
148 Summary: X11 graphic output for OCaml
149 Summary(pl): Dostêp do X11 dla OCamla
150 Group: Development/Libraries
151 Requires: %{name}-x11graphics = %{version}-%{release}
153 %description x11graphics-devel
154 x11graphics module gives OCaml program access to drawing in X11
155 windows. This package contains files needed to develop OCaml programs
158 %description x11graphics-devel -l pl
159 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
160 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
161 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
164 Summary: X11 graphic output for OCaml
165 Summary(pl): Dostêp do X11 dla OCamla
166 Group: Development/Libraries
167 Requires: %{name} = %{version}-%{release}
169 %description x11graphics
170 x11graphics module gives OCaml program access to drawing in X11
171 windows. This package contains files needed to run bytecode OCaml
172 programs using x11graphics.
174 %description x11graphics -l pl
175 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
176 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
177 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
180 Summary: Objective Caml Preprocessor
181 Summary(pl): Preprocesor OCamla
182 Group: Development/Languages
183 Requires: %{name} = %{version}-%{release}
184 Provides: camlp4 = %{version}-%{release}
188 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
189 tools for syntax (grammars) and the ability to modify the concrete
190 syntax of the language (quotations, syntax extensions).
192 Camlp4 can parse normal Ocaml concrete syntax or any other
193 user-definable syntax. As an example, an alternative syntax is
194 provided, named revised, because it tries to fix some small problems
195 of the normal syntax.
197 Camlp4 can pretty print the normal Ocaml concrete syntax or the
198 revised one. It is therefore always possible to have a version of your
199 sources compilable by the Objective Caml compiler without
202 %description camlp4 -l pl
203 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
204 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
205 jêzyka (cytowania, rozszerzenia).
207 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
208 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
209 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
210 wystêpuj±ce w sk³adni oryginalnej.
212 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
213 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
216 %package compiler-objects
217 Summary: Compiled parts of OCaml compiler
218 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
219 Group: Development/Languages
220 Requires: %{name} = %{version}-%{release}
221 Obsoletes: ocaml-devel
222 Provides: ocaml-devel
224 %description compiler-objects
225 This package contains *.cmi and *.cmo files being parts of OCaml
226 compiler. They are needed to compile some programs.
228 %description compiler-objects -l pl
229 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
230 OCamla. S± one wymagane do kompilacji niektórych programów.
232 %package ocamldoc-devel
233 Summary: Files needed to develop programs using ocamldoc
234 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
235 Group: Development/Languages
236 Requires: %{name} = %{version}-%{release}
238 %description ocamldoc-devel
239 You need this package if you are going to write ocamldoc front end or
242 %description ocamldoc-devel -l pl
243 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
244 dla ocamldoc lub co¶ podobnego.
247 Summary: Sources of OCaml standard library
248 Summary(pl): ¬ród³a biblioteki standardowej OCamla
249 Group: Development/Languages
250 Requires: %{name} = %{version}-%{release}
252 %description lib-source
253 This sources come helpful during debugging of user programs with ocamldebug.
255 %description lib-source -l pl
256 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
257 z u¿yciem ocamldebug.
259 # maybe we'll want to add some more stuff here?
261 Summary: Example source code for OCaml
262 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
263 Group: Development/Languages
264 Requires: %{name} = %{version}-%{release}
266 %description examples
267 This packages contains sources for Okasaki's Purely Functional
268 Datastructures in OCaml, along with some contributions.
270 %description examples -l pl
271 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
272 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
275 %setup -q -a1 -a3 -a5
277 tar xjf %{SOURCE7} -C examples
278 tar xzf %{SOURCE8} -C examples
279 # order mess with docs somewhat
282 mv htmlman docs/html/ocaml
283 cp %{SOURCE2} docs/ocaml.ps.gz
284 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
285 cp %{SOURCE4} docs/camlp4.ps.gz
286 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
287 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
295 cp -f /usr/share/automake/config.sub config/gnu
297 -cc "%{__cc} %{rpmcflags}" \
299 -libdir %{_libdir}/%{name} \
300 -mandir %{_mandir}/man1 \
302 %{!?with_tk:-no-tk} \
304 -x11lib /usr/X11R6/%{_lib}
306 %{__make} world bootstrap opt.opt
307 %{__make} -C tools objinfo
310 rm -rf $RPM_BUILD_ROOT
311 install -d $RPM_BUILD_ROOT{%{_includedir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
314 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
315 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
316 MANDIR=$RPM_BUILD_ROOT%{_mandir}
318 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
319 %{_libdir}/%{name}/stublibs
324 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
325 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
326 else echo xemacs; fi`" \
327 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
330 # symlink .opt versions of compilers (if present)
331 # warning: don't do that with camlp4 (can't load extensions then)
332 for f in ocamlc ocamlopt ocamldoc ocamllex; do
333 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
334 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
335 $RPM_BUILD_ROOT%{_bindir}/$f.byte
336 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
340 # move includes to the proper place
341 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
342 # but leave compatibility symlink
343 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
345 # compiled sources of compiler, needed by some programs
346 for f in {asm,byte}comp parsing typing utils ; do
347 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
348 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
351 # this isn't installed by default, but is useful
352 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
353 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
354 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
355 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
358 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
359 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
362 rm -rf $RPM_BUILD_ROOT
365 %defattr(644,root,root,755)
366 %attr(755,root,root) %{_bindir}/ocamlrun
367 %dir %{_libdir}/%{name}
368 %dir %{_libdir}/%{name}/stublibs
369 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
370 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
372 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
373 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
377 %defattr(644,root,root,755)
378 %doc LICENSE Changes README Upgrading
380 %attr(755,root,root) %{_bindir}/ocaml*
381 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
382 %exclude %{_bindir}/ocamlrun
383 %attr(755,root,root) %{_bindir}/*labels
385 %{_libdir}/%{name}/caml
386 %{_libdir}/%{name}/threads
387 %dir %{_libdir}/%{name}/vmthreads
388 %dir %{_libdir}/%{name}/vmthreads/*.cm*
389 %dir %{_libdir}/%{name}/vmthreads/*.a
390 %{_libdir}/%{name}/*.a
391 %{_libdir}/%{name}/*.o
392 %{_libdir}/%{name}/*.cm*
393 %exclude %{_libdir}/%{name}/*graphics*
394 %{_libdir}/%{name}/ld.conf
395 %{_libdir}/%{name}/camlheader
396 %{_libdir}/%{name}/camlheader_ur
397 %dir %{_libdir}/%{name}/ocamldoc
398 %{_libdir}/%{name}/ocamldoc/*.hva
399 %attr(755,root,root) %{_libdir}/%{name}/expunge
400 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
401 %attr(755,root,root) %{_libdir}/%{name}/*labels
402 %{_mandir}/man1/*ocaml*
405 %defattr(644,root,root,755)
406 %{_libdir}/%{name}/*.ml
407 %{_libdir}/%{name}/*.mli
408 %{_libdir}/%{name}/*/*.mli
411 %defattr(644,root,root,755)
412 %{_examplesdir}/%{name}-%{version}
414 # they are poor, html is much better
418 %files compiler-objects
419 %defattr(644,root,root,755)
420 %{_libdir}/%{name}/compiler
423 %defattr(644,root,root,755)
424 %doc docs/html/camlp4*
425 %attr(755,root,root) %{_bindir}/*camlp4*
426 %attr(755,root,root) %{_bindir}/ocpp
427 # Not installed since 3.05, is is needed?
428 #%attr(755,root,root) %{_bindir}/odyl
429 %{_libdir}/%{name}/camlp4
430 %{_mandir}/man*/*camlp4*
431 %{_mandir}/man*/*ocpp*
435 %defattr(644,root,root,755)
436 %attr(755,root,root) %{_bindir}/labltk
437 %attr(755,root,root) %{_bindir}/ocamlbrowser
438 %dir %{_libdir}/%{name}/labltk
439 %{_libdir}/%{name}/labltk/*.cm*
440 %{_libdir}/%{name}/labltk/*.a
441 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
442 %{_examplesdir}/%{name}-labltk-%{version}
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
447 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
451 %files x11graphics-devel
452 %defattr(644,root,root,755)
453 %{_libdir}/%{name}/graphics*.cm*
454 %{_libdir}/%{name}/graphics.a
455 %{_libdir}/%{name}/libgraphics.a
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
464 %defattr(644,root,root,755)
465 %{_datadir}/emacs/site-lisp/*.el*
468 %files ocamldoc-devel
469 %defattr(644,root,root,755)
470 %{_libdir}/%{name}/ocamldoc/*.cm*
471 %{_libdir}/%{name}/ocamldoc/*.a
474 %defattr(644,root,root,755)