3 %bcond_without emacs # without emacs subpackage
4 %bcond_without x # without X11 support
5 %bcond_without tk # without Tcl/Tk support
7 # --without x11 implies --without tk
8 %{!?with_x:%undefine with_tk}
13 Summary: The Objective Caml compiler and programming environment
14 Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
19 License: distributable
20 Group: Development/Languages
21 Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.bz2
22 # Source0-md5: bd92c8970767f412bc1e9a6c625b5ccf
23 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.html.tar.gz
24 # Source1-md5: 93cd91f525441eb7e94cc49b9b64bab0
25 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
26 # Source2-md5: a9c17db6ffd400c5ea00c6d51cbf56bf
27 Source3: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
28 # Source3-md5: 8cf24c4f69c6f9c9f9cc1edb9b18f6cb
29 Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.html.tar.gz
30 # Source4-md5: 21370bae4e7f6435b38aeb21db7ce8bb
31 Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-manual.dvi.gz
32 # Source5-md5: 035915d1a530aa7ec9b194d9a7d258eb
33 Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.html.tar.gz
34 # Source6-md5: 96d8eb4ca5abd58c9a280ba59f73b192
35 Source7: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{p4ver}-tutorial.dvi.gz
36 # Source7-md5: fcd87c235109364242a0c9ccf176dff8
37 Source8: http://www.ocaml.info/ocaml_sources/pure-fun-1.0.6.tar.bz2
38 # Source8-md5: 94eac3fa1ac51b8ada344b04839cb43c
39 Source9: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
40 # Source9-md5: 77fa1da7375dea1393cc0b6cd802d7e1
41 Patch0: %{name}-db3.patch
42 Patch1: %{name}-CFLAGS.patch
43 Patch2: %{name}-as_needed.patch
44 Patch3: %{name}-gas.patch
45 URL: http://caml.inria.fr/
46 BuildRequires: db-devel >= 4.1
47 %{?with_tk:BuildRequires: tk-devel}
48 %{?with_x:BuildRequires: xorg-lib-libX11-devel}
50 BuildRequires: sed >= 4.0
52 BuildRequires: xemacs-common
53 BuildRequires: xemacs-fsf-compat-pkg
55 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
56 Provides: ocaml-ocamldoc
57 Obsoletes: ocaml-ocamldoc
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 %define specflags -fno-strict-aliasing
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
71 %description -l pl.UTF-8
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: Runtime system for OCaml
82 Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
86 This package contains binaries needed to run bytecode OCaml programs:
87 ocamlrun bytecode interpreter, and basic dynamic link libraries.
89 %description runtime -l pl.UTF-8
90 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
91 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
92 podstawowe biblioteki linkowane dynamicznie.
95 Summary: Sources of OCaml standard library
96 Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
97 Group: Development/Languages
98 Requires: %{name} = %{epoch}:%{version}-%{release}
100 %description lib-source
101 This sources come helpful during debugging of user programs with ocamldebug.
103 %description lib-source -l pl.UTF-8
104 Źródła te są przydatne przy odpluskwianiu programów użytkownika
105 z użyciem ocamldebug.
108 Summary: HTML documentation for OCaml
109 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
110 Group: Development/Tools
112 %description doc-html
113 HTML documentation for OCaml.
115 %description doc-html -l pl.UTF-8
116 Dokumentacja dla OCamla w formacie HTML.
119 Summary: PostScript documentation for OCaml
120 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie PostScript
121 Group: Development/Tools
124 PostScript documentation for OCaml.
126 %description doc-ps -l pl.UTF-8
127 Dokumentacja dla OCamla w formacie PostScript.
130 Summary: Info documentation for OCaml
131 Summary(pl.UTF-8): Dokumentacja info dla OCamla
132 Group: Development/Tools
134 %description doc-info
135 Info documentation for OCaml.
137 %description doc-info -l pl.UTF-8
138 Dokumentacja info dla OCamla.
141 Summary: Emacs mode for OCaml
142 Summary(pl.UTF-8): Tryb OCamla dla Emacsa
143 Group: Development/Tools
144 Requires: %{name} = %{epoch}:%{version}-%{release}
147 Emacs mode files for Objective Caml language.
149 %description emacs -l pl.UTF-8
150 Pliki trybu OCamla dla Emacsa.
153 Summary: Runtime for LablTk library
154 Summary(pl.UTF-8): Środowisko uruchomieniowe dla biblioteki LablTk
156 Requires: %{name} = %{epoch}:%{version}-%{release}
159 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
160 contains files needed to run bytecode OCaml programs using LablTk.
162 %description labltk -l pl.UTF-8
163 Biblioteka LablTk daje programom napisanym w OCamlu dostęp do widgetów
164 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
167 %package labltk-devel
168 Summary: LablTk library for OCaml
169 Summary(pl.UTF-8): Biblioteka LablTk dla OCamla
170 Group: Development/Libraries
171 Requires: %{name}-labltk = %{epoch}:%{version}-%{release}
173 %description labltk-devel
174 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
175 contains files needed to develop OCaml programs using LablTk.
177 %description labltk-devel -l pl.UTF-8
178 Biblioteka LablTk daje programom napisanym w OCamlu dostęp do widgetów
179 Tcl/Tk. Pakiet ten zawiera pliki niezbędne do tworzenia programów
183 Summary: X11 graphic output for OCaml
184 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
185 Group: Development/Libraries
186 Requires: %{name} = %{epoch}:%{version}-%{release}
188 %description x11graphics
189 x11graphics module gives OCaml program access to drawing in X11
190 windows. This package contains files needed to run bytecode OCaml
191 programs using x11graphics.
193 %description x11graphics -l pl.UTF-8
194 Moduł x11graphics daje programom napisanym w OCamlu możliwość
195 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
196 potrzebne do uruchamiania programów używających x11graphics.
198 %package x11graphics-devel
199 Summary: X11 graphic output for OCaml
200 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
201 Group: Development/Libraries
202 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
204 %description x11graphics-devel
205 x11graphics module gives OCaml program access to drawing in X11
206 windows. This package contains files needed to develop OCaml programs
209 %description x11graphics-devel -l pl.UTF-8
210 Moduł x11graphics daje programom napisanym w OCamlu możliwość
211 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
212 niezbędne do tworzenia programów używających x11graphics.
215 Summary: Objective Caml Preprocessor
216 Summary(pl.UTF-8): Preprocesor OCamla
217 Group: Development/Languages
218 Requires: %{name} = %{epoch}:%{version}-%{release}
219 Provides: camlp4 = %{epoch}:%{version}-%{release}
223 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
224 tools for syntax (grammars) and the ability to modify the concrete
225 syntax of the language (quotations, syntax extensions).
227 Camlp4 can parse normal Ocaml concrete syntax or any other
228 user-definable syntax. As an example, an alternative syntax is
229 provided, named revised, because it tries to fix some small problems
230 of the normal syntax.
232 Camlp4 can pretty print the normal Ocaml concrete syntax or the
233 revised one. It is therefore always possible to have a version of your
234 sources compilable by the Objective Caml compiler without
237 %description camlp4 -l pl.UTF-8
238 Camlp4 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania
239 składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni
240 języka (cytowania, rozszerzenia).
242 Camlp4 może sparsować oryginalną składnię Ocamla lub dowolną inną
243 definiowalną przez użytkownika. Jako przykład podana jest alternatywna
244 składnia (revised syntax), która próbuje poprawić drobne problemy
245 występujące w składni oryginalnej.
247 Camlp4 umie ładnie formatować źródła zarówno w oryginalnej jak i
248 poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej
251 %package camlp4-doc-html
252 Summary: Objective Caml Preprocessor - HTML documentation
253 Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja HTML
254 Group: Development/Languages
256 %description camlp4-doc-html
257 Objective Caml Preprocessor - HTML documentation.
259 %description camlp4-doc-html -l pl.UTF-8
260 Preprocesor OCamla - dokumentacja HTML.
262 %package compiler-objects
263 Summary: Compiled parts of OCaml compiler
264 Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
265 Group: Development/Languages
266 Requires: %{name} = %{epoch}:%{version}-%{release}
267 Obsoletes: ocaml-devel
268 Provides: ocaml-devel
270 %description compiler-objects
271 This package contains *.cmi and *.cmo files being parts of OCaml
272 compiler. They are needed to compile some programs.
274 %description compiler-objects -l pl.UTF-8
275 Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
276 OCamla. Są one wymagane do kompilacji niektórych programów.
278 %package ocamldoc-devel
279 Summary: Files needed to develop programs using ocamldoc
280 Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
281 Group: Development/Languages
282 Requires: %{name} = %{epoch}:%{version}-%{release}
284 %description ocamldoc-devel
285 You need this package if you are going to write ocamldoc front end or
288 %description ocamldoc-devel -l pl.UTF-8
289 Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
290 dla ocamldoc lub coś podobnego.
292 # maybe we'll want to add some more stuff here?
294 Summary: Example source code for OCaml
295 Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
296 Group: Development/Languages
297 Requires: %{name} = %{epoch}:%{version}-%{release}
299 %description examples
300 This packages contains sources for Okasaki's Purely Functional
301 Datastructures in OCaml, along with some contributions.
303 %description examples -l pl.UTF-8
304 Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych
305 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
308 %setup -q -a1 -a3 -a4 -a6
310 tar xjf %{SOURCE8} -C examples
311 tar xzf %{SOURCE9} -C examples
312 # order mess with docs somewhat
314 mv htmlman docs/html/ocaml
315 cp %{SOURCE2} docs/ocaml.ps.gz
316 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
317 cp %{SOURCE5} docs/camlp4.ps.gz
318 mv camlp4-%{p4ver}-tutorial.html docs/html/camlp4-tutorial
319 cp %{SOURCE7} docs/camlp4-tutorial.ps.gz
326 cp -f /usr/share/automake/config.sub config/gnu
330 -libdir %{_libdir}/%{name} \
331 -mandir %{_mandir}/man1 \
333 %{!?with_tk:-no-tk} \
337 %{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall"
338 %{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall" -j1
340 # broken build system
341 sed -e 's,LIBDIR,%{_libdir},' camlp4/man/camlp4.1.tpl > camlp4/man/camlp4.1
344 rm -rf $RPM_BUILD_ROOT
345 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
346 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
349 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
350 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
351 MANDIR=$RPM_BUILD_ROOT%{_mandir}
353 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
354 %{_libdir}/%{name}/stublibs
359 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
360 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
361 else echo xemacs; fi`" \
362 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
365 # symlink .opt versions of compilers (if present)
366 # warning: don't do that with camlp4 (can't load extensions then)
367 for f in ocamlc ocamlopt ocamldoc ocamllex; do
368 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
369 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
370 $RPM_BUILD_ROOT%{_bindir}/$f.byte
371 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
375 # move includes to the proper place
376 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
377 # but leave compatibility symlink
378 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
380 # compiled sources of compiler, needed by some programs
381 for f in {asm,byte}comp parsing typing utils ; do
382 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
383 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
386 # this isn't installed by default, but is useful
387 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
388 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
389 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
390 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
393 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
394 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
397 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
399 # broken build system
400 install camlp4/man/camlp4.1 $RPM_BUILD_ROOT%{_mandir}/man1
401 for f in camlp4o.1 camlp4r.1 mkcamlp4.1 camlp4o.opt.1 camlp4r.opt.1 ; do
402 echo '.so camlp4.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f
406 rm -rf $RPM_BUILD_ROOT
408 %post doc-info -p /sbin/postshell
409 -/usr/sbin/fix-info-dir -c %{_infodir}
411 %postun doc-info -p /sbin/postshell
412 -/usr/sbin/fix-info-dir -c %{_infodir}
415 %defattr(644,root,root,755)
416 %doc LICENSE Changes README Upgrading
417 %attr(755,root,root) %{_bindir}/addlabels
418 %attr(755,root,root) %{_bindir}/ocaml*
419 %attr(755,root,root) %{_bindir}/scrapelabels
420 %{?with_tk:%exclude %{_bindir}/ocamlbrowser}
421 %exclude %{_bindir}/ocamlrun
423 %{_libdir}/%{name}/caml
424 %{_libdir}/%{name}/threads
425 %dir %{_libdir}/%{name}/vmthreads
426 %dir %{_libdir}/%{name}/vmthreads/*.cm*
427 %dir %{_libdir}/%{name}/vmthreads/*.a
428 %{_libdir}/%{name}/*.a
429 %{_libdir}/%{name}/*.o
430 %{_libdir}/%{name}/*.cm*
431 %exclude %{_libdir}/%{name}/*graphics*
432 %{_libdir}/%{name}/Makefile.config
433 %{_libdir}/%{name}/ld.conf
434 %{_libdir}/%{name}/camlheader
435 %{_libdir}/%{name}/camlheader_ur
436 %{_libdir}/%{name}/ocamlbuild
437 %dir %{_libdir}/%{name}/ocamldoc
438 %{_libdir}/%{name}/ocamldoc/*.hva
439 %attr(755,root,root) %{_libdir}/%{name}/expunge
440 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
441 %attr(755,root,root) %{_libdir}/%{name}/objinfo_helper
442 %{_mandir}/man1/ocaml*
443 %exclude %{_mandir}/man1/ocamlrun.1*
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_bindir}/ocamlrun
448 %dir %{_libdir}/%{name}
449 %dir %{_libdir}/%{name}/site-lib
450 %dir %{_libdir}/%{name}/stublibs
451 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
452 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
453 %attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
455 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
457 %{_mandir}/man1/ocamlrun.1*
460 %defattr(644,root,root,755)
461 %{_libdir}/%{name}/*.ml
462 %{_libdir}/%{name}/*.mli
463 %{_libdir}/%{name}/*/*.mli
466 %defattr(644,root,root,755)
467 %doc docs/html/ocaml/*
470 %defattr(644,root,root,755)
474 %defattr(644,root,root,755)
475 %{_infodir}/ocaml.info*
477 # they are poor, html is much better
483 %defattr(644,root,root,755)
484 %{_datadir}/emacs/site-lisp/*.el*
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
493 %defattr(644,root,root,755)
494 %attr(755,root,root) %{_bindir}/labltk
495 %attr(755,root,root) %{_bindir}/ocamlbrowser
496 %dir %{_libdir}/%{name}/labltk
497 %{_libdir}/%{name}/labltk/*.cm*
498 %{_libdir}/%{name}/labltk/*.a
499 %{_libdir}/%{name}/labltk/*.o
500 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
501 %{_examplesdir}/%{name}-labltk-%{version}
506 %defattr(644,root,root,755)
507 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
509 %files x11graphics-devel
510 %defattr(644,root,root,755)
511 %{_libdir}/%{name}/graphics*.cm*
512 %{_libdir}/%{name}/graphics.a
513 %{_libdir}/%{name}/libgraphics.a
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_bindir}/camlp4*
519 %attr(755,root,root) %{_bindir}/mkcamlp4
520 %{_libdir}/%{name}/camlp4
521 %{_mandir}/man1/camlp4*.1*
522 %{_mandir}/man1/mkcamlp4.1*
524 %files camlp4-doc-html
525 %defattr(644,root,root,755)
526 %doc docs/html/camlp4*
528 %files compiler-objects
529 %defattr(644,root,root,755)
530 %{_libdir}/%{name}/compiler
532 %files ocamldoc-devel
533 %defattr(644,root,root,755)
534 %{_libdir}/%{name}/ocamldoc/*.cm*
535 %{_libdir}/%{name}/ocamldoc/*.a
538 %defattr(644,root,root,755)
539 %{_examplesdir}/%{name}-%{version}