5 # --without x11 (implies --without tk)
7 %{?_without_x11:%define _without_tk 1}
9 Summary: The Objective Caml compiler and programming environment
10 Summary(pl): Kompilator Objektowego Camla oraz ¶rodowisko programistyczne
14 License: distributable
15 Vendor: Group of implementors <caml-light@inria.fr>
16 Group: Development/Languages
17 Source0: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}.tar.gz
18 Source1: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.html.tar.gz
19 Source2: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.ps.gz
20 Source3: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-manual.html.tar.gz
21 Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-manual.dvi.gz
22 Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.html.tar.gz
23 Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.dvi.gz
24 Patch0: %{name}-build.patch
25 Patch1: %{name}-DESTDIR.patch
26 Patch2: %{name}-manlinks.patch
27 Patch3: %{name}-db3.patch
28 Patch4: %{name}-objinfo.patch
29 Patch5: %{name}-opt-symbols.patch
30 Patch6: %{name}-mano.patch
31 URL: http://caml.inria.fr/
32 Requires: ocaml-runtime = %{version}-%{release}
33 BuildRequires: db3-devel
34 %{!?_without_tk:BuildRequires: tk-devel}
35 %{!?_without_x11:BuildRequires: XFree86-devel}
36 %{!?_without_emacs:BuildRequires: xemacs}
37 %{!?_without_emacs:BuildRequires: xemacs-common}
38 %{!?_without_emacs:BuildRequires: xemacs-fsf-compat-pkg}
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 Objective Caml is a high-level, strongly-typed, functional and
44 object-oriented programming language from the ML family of languages.
46 This package comprises two batch compilers (a fast bytecode compiler
47 and an optimizing native-code compiler), an interactive toplevel
48 system, Lex&Yacc tools, a replay debugger, and a comprehensive
52 Objektowy Caml jest funkcjonalnym, obiektowo zorientowanym jêzykiem
53 wysokiego poziomu z rodziny jêzyków ML.
55 Ten pakiet zawiera dwa kompilatory (szybki kompilator bytecode oraz
56 zoptymalizowany natywny kompilator), interaktywny g³ówny system,
57 narzêdzia Lex&Yacc, odpluskwiacz i biblioteki.
60 Summary: PostScript documentation for OCaml
61 Summary(pl): Dokumentacja dla OCaml-a w formacie PostSript
62 Group: Development/Tools
65 PostScript documentation for OCaml. HTML documentation is in main package.
67 %description doc-ps -l pl
68 Dokumentacja dla OCamla w formacie PostSript. Dokumentacja HTML jest
72 Summary: Emacs mode for OCaml
73 Summary(pl): Tryb Emacsa dla OCaml
74 Group: Development/Tools
75 Requires: %{name} = %{version}
78 Emacs mode files for Objective Caml language.
80 %description emacs -l pl
81 Pliki trybu Emacsa dla jêzyka Objektowego Camla.
84 Summary: Runtime system for OCaml
85 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
89 This package contains binaries needed to run bytecode OCaml programs:
90 ocamlrun bytecode interpreter, and basic dynamic link libraries.
92 %description runtime -l pl
93 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
94 OCamlu skompilowanych do bytecodu: interpreter bytecodu ocamlrun oraz
95 podstawowe bibliotki linkowane dynamicznie.
98 Summary: LabelTk library for OCaml
99 Summary(pl): Biblioteka LablTk dla OCamla
100 Group: Development/Libraries
101 Requires: %{name}-labltk = %{version}-%{release}
103 %description labltk-devel
104 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
105 contains files needed to develop OCaml programs using LablTk.
107 %description labltk-devel -l pl
108 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
109 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
113 Summary: Runtime for LabelTk library
114 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
116 Requires: %{name} = %{version}-%{release}
119 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
120 contains files needed to run bytecode OCaml programs using LablTk.
122 %description labltk -l pl
123 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
124 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
127 %package x11graphics-devel
128 Summary: X11 graphic output for OCaml
129 Summary(pl): Iksowe wyj¶cie graficzne dla OCamla
130 Group: Development/Libraries
131 Requires: %{name}-x11graphics = %{version}-%{release}
133 %description x11graphics-devel
134 x11graphics module gives OCaml program access to drawing in X11
135 windows. This package contains files needed to develop OCaml programs
138 %description x11graphics-devel -l pl
139 Modu³ x11graphics daje programom napisanym w OCamlu dostêp do
140 rysowania po oknach X11. Pakiet ten zawiera pliki niezbêdne do
141 tworzenia programów u¿ywaj±cych x11graphics.
144 Summary: X11 graphic output for OCaml
145 Summary(pl): Iksowe wyj¶cie graficzne dla OCamla
146 Group: Development/Libraries
147 Requires: %{name} = %{version}-%{release}
149 %description x11graphics
150 x11graphics module gives OCaml program access to drawing in X11
151 windows. This package contains files needed to run bytecode OCaml
152 programs using x11graphics.
154 %description x11graphics -l pl
155 Modu³ x11graphics daje programom napisanym w OCamlu dostêp do
156 rysowania po oknach X11. Pakiet ten zawiera binaria potrzebne do
157 uruchamiania programów u¿ywaj±cych x11graphics.
160 Summary: Objective Caml Preprocessor
161 Summary(pl): Preprocesor Ocamla
162 Group: Development/Languages
163 Requires: %{name} = %{version}-%{release}
164 Provides: camlp4 = %{version}-%{release}
168 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
169 tools for syntax (grammars) and the ability to modify the concrete
170 syntax of the language (quotations, syntax extensions).
172 Camlp4 can parse normal Ocaml concrete syntax or any other
173 user-definable syntax. As an example, an alternative syntax is
174 provided, named revised, because it tries to fix some small problems
175 of the normal syntax.
177 Camlp4 can pretty print the normal Ocaml concrete syntax or the
178 revised one. It is therefore always possible to have a version of your
179 sources compilable by the compiler Objective Caml without
182 %description camlp4 -l pl
183 Camlp4 jest preprocesorem dla Ocamla. Oferuje narzêdzia do sk³adni
184 (gramatyki) oraz umiejêtno¶æ modyfikowania konkretnej sk³adni jêzyka
185 (cytowania, rozszerzenia).
187 Camlp4 mo¿e sparsowaæ normaln± sk³adniê Ocamla lub inn± dowoln±
188 definiowaln± przez u¿ytkownika. Jako przyk³ad jest podana alternatywna
189 sk³adnia, nazwana "poprawiona", poniewa¿ próbuje poprawiæ drobne
190 problemy ze zwyk³± sk³adni±.
192 Camlp4 umie ³adnie wypisaæ normaln± sk³adniê Camla lub "poprawion±".
193 Dziêki temu jest mo¿liwe posiadanie wersji swoich ¼róde³
194 kompilowalnych przez kompilatora Ocamla bez preprocesingu.
197 Summary: Compiled parts of OCaml compiler
198 Summary(pl): Skompilowane kawa³ki kompilatora OCamla
199 Group: Development/Languages
200 Requires: %{name} = %{version}-%{release}
203 This package contains *.cmi and *.cmo files being parts of OCaml
204 compiler. They are needed to compile some programs.
206 %description devel -l pl
207 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
208 OCamla. S± one wymagane do kompilacji niektórych programów.
210 %package ocamldoc-devel
211 Summary: Files needed to develop programs using ocamldoc
212 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
213 Group: Development/Languages
214 Requires: %{name} = %{version}-%{release}
216 %description ocamldoc-devel
217 You need this package if you are going to write ocamldoc front end or
220 %description ocamldoc-devel -l pl
221 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasza pisaæ front end
222 dla ocamldoc lub co¶ podobnego.
225 Summary: Sources of OCaml standard library
226 Summary(pl): ¬ród³a biblioteki standardowej OCamla
227 Group: Development/Languages
228 Requires: %{name} = %{version}-%{release}
230 %description lib-source
231 This sources come helpful during debugging of user programs with ocamldebug.
233 %description lib-source -l pl
234 ¬ród³a te co¶ przydatne przy odpluskwianiu programów u¿ytkownika
235 z u¿yciem ocamldebug.
240 # order mess with docs somewhat
243 mv htmlman docs/html/ocaml
244 cp %{SOURCE2} docs/ocaml.ps.gz
246 mv camlp4-%{version}-refman.html docs/html/camlp4
247 cp %{SOURCE4} docs/camlp4.ps.gz
249 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
250 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
260 -cc "%{__cc} %{rpmcflags}" \
262 -libdir %{_libdir}/%{name} \
263 -mandir %{_mandir}/man1 \
265 %{?_without_tk:-notk} \
268 %{__make} world bootstrap opt.opt
269 %{__make} -C tools objinfo
272 rm -rf $RPM_BUILD_ROOT
275 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
276 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
277 MANDIR=$RPM_BUILD_ROOT%{_mandir}
279 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
280 %{_libdir}/%{name}/stublibs
284 %if %{!?_without_emacs:1}%{?_without_emacs:0}
285 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
286 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
287 else echo xemacs; fi`" \
288 EMACSDIR="$RPM_BUILD_ROOT%{_libdir}/emacs/site-lisp"
291 # symlink .opt versions of compilers (if present)
292 # warning: don't do that with camlp4 (can't load extensions then)
293 for f in ocamlc ocamlopt ocamldoc ocamllex; do
294 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
295 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
296 $RPM_BUILD_ROOT%{_bindir}/$f.byte
297 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
301 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.mli
302 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*/*.ml{,i}
304 # move includes to the proper place
305 install -d $RPM_BUILD_ROOT%{_includedir}
306 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
307 # but leave compatibility symlink
308 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
310 # compiled sources of compiler, needed by some programs
311 for f in {asm,byte}comp parsing typing utils ; do
312 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
313 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
316 # this isn't installed by default, but is useful
317 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
319 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
320 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
322 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
325 #rm -f $RPM_BUILD_ROOT%{_mandir}/man3
326 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
329 rm -rf $RPM_BUILD_ROOT
332 %defattr(644,root,root,755)
333 %attr(755,root,root) %{_bindir}/ocamlrun
334 %dir %{_libdir}/%{name}
335 %dir %{_libdir}/%{name}/stublibs
336 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
337 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
338 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
339 %exclude %{_libdir}/%{name}/stublibs/dlltkanim.so
342 %defattr(644,root,root,755)
343 %doc LICENSE Changes README Upgrading
345 %attr(755,root,root) %{_bindir}/ocaml*
346 %exclude %{_bindir}/ocamlbrowser
347 %exclude %{_bindir}/ocamlrun
348 %attr(755,root,root) %{_bindir}/*labels
350 %{_libdir}/%{name}/caml
351 %{_libdir}/%{name}/threads
352 %{_libdir}/%{name}/*.a
353 %{_libdir}/%{name}/*.o
354 %{_libdir}/%{name}/*.cm*
355 %exclude %{_libdir}/%{name}/*graphics*
356 %{_libdir}/%{name}/ld.conf
357 %{_libdir}/%{name}/camlheader
358 %{_libdir}/%{name}/camlheader_ur
359 %dir %{_libdir}/%{name}/ocamldoc
360 %{_libdir}/%{name}/ocamldoc/*.sty
361 %{_libdir}/%{name}/ocamldoc/*.hva
362 %attr(755,root,root) %{_libdir}/%{name}/expunge
363 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
364 %attr(755,root,root) %{_libdir}/%{name}/*labels
365 %{_mandir}/man1/*ocaml*
368 %defattr(644,root,root,755)
369 %{_libdir}/%{name}/*.ml
371 # they are poor, html is much better
376 %defattr(644,root,root,755)
377 %{_libdir}/%{name}/compiler
380 %defattr(644,root,root,755)
381 %doc docs/html/camlp4*
382 %attr(755,root,root) %{_bindir}/*camlp4*
383 %attr(755,root,root) %{_bindir}/ocpp
384 # Not installed since 3.05, is is needed?
385 #%attr(755,root,root) %{_bindir}/odyl
386 %{_libdir}/%{name}/camlp4
387 %{_mandir}/man*/*camlp4*
388 %{_mandir}/man*/*ocpp*
390 %if %{!?_without_tk:1}%{?_without_tk:0}
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_bindir}/labltk
394 %attr(755,root,root) %{_bindir}/ocamlbrowser
395 %dir %{_libdir}/%{name}/labltk
396 %{_libdir}/%{name}/labltk/*.cm*
397 %{_libdir}/%{name}/labltk/*.a
398 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
399 %{_examplesdir}/%{name}-labltk-%{version}
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
404 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
407 %if %{!?_without_x11:1}%{?_without_x11:0}
408 %files x11graphics-devel
409 %defattr(644,root,root,755)
410 %{_libdir}/%{name}/graphics*.cm*
411 %{_libdir}/%{name}/libgraphics.a
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
418 %if %{!?_without_emacs:1}%{?_without_emacs:0}
420 %defattr(644,root,root,755)
421 %{_libdir}/emacs/site-lisp/*.el*
424 %files ocamldoc-devel
425 %defattr(644,root,root,755)
426 %{_libdir}/%{name}/ocamldoc/*.cm*
427 %{_libdir}/%{name}/ocamldoc/*.a
430 %defattr(644,root,root,755)