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.info.tar.gz
19 Source2: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.html.tar.gz
20 Source3: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.ps.gz
21 Source4: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-refman.html.tar.gz
22 Source5: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-refman.ps.gz
23 Source6: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.html.tar.gz
24 Source7: ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.ps.gz
25 Patch0: %{name}-build.patch
26 Patch1: %{name}-DESTDIR.patch
27 Patch2: %{name}-manlinks.patch
28 Patch3: %{name}-db3.patch
29 Patch4: %{name}-powerpcfix.patch
30 Patch5: %{name}-objinfo.patch
31 Patch6: %{name}-opt-symbols.patch
32 URL: http://caml.inria.fr/
33 Requires: ocaml-runtime = %{version}-%{release}
34 BuildRequires: db3-devel
35 %{!?_without_tk:BuildRequires: tk-devel}
36 %{!?_without_x11:BuildRequires: XFree86-devel}
37 %{!?_without_emacs:BuildRequires: xemacs}
38 %{!?_without_emacs:BuildRequires: xemacs-common}
39 %{!?_without_emacs:BuildRequires: xemacs-fsf-compat-pkg}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 Objective Caml is a high-level, strongly-typed, functional and
45 object-oriented programming language from the ML family of languages.
47 This package comprises two batch compilers (a fast bytecode compiler
48 and an optimizing native-code compiler), an interactive toplevel
49 system, Lex&Yacc tools, a replay debugger, and a comprehensive
53 Objektowy Caml jest funkcjonalnym, obiektowo zorientowanym jêzykiem
54 wysokiego poziomu z rodziny jêzyków ML.
56 Ten pakiet zawiera dwa kompilatory (szybki kompilator bytecode oraz
57 zoptymalizowany natywny kompilator), interaktywny g³ówny system,
58 narzêdzia Lex&Yacc, odpluskwiacz i biblioteki.
61 Summary: PostScript documentation for OCaml
62 Summary(pl): Dokumentacja dla OCaml-a w formacie PostSript
63 Group: Development/Tools
66 PostScript documentation for OCaml.
68 %description doc-ps -l pl
69 Dokumentacja dla OCamla w formacie PostSript.
72 Summary: HTML documentation for OCaml
73 Summary(pl): Dokumentacja dla OCaml-a w formacie HTML
74 Group: Development/Tools
77 HTML documentation for OCaml.
79 %description doc-html -l pl
80 Dokumentacja dla OCaml-a w formacie HTML.
83 Summary: Emacs mode for OCaml
84 Summary(pl): Tryb Emacsa dla OCaml
85 Group: Development/Tools
86 Requires: %{name} = %{version}
89 Emacs mode files for Objective Caml language.
91 %description emacs -l pl
92 Pliki trybu Emacsa dla jêzyka Objektowego Camla.
95 Summary: Runtime system for OCaml
96 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
100 This package contains binaries needed to run bytecode OCaml programs:
101 ocamlrun bytecode interpreter, and basic dynamic link libraries.
103 %description runtime -l pl
104 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
105 OCamlu skompilowanych do bytecodu: interpreter bytecodu ocamlrun oraz
106 podstawowe bibliotki linkowane dynamicznie.
108 %package labltk-devel
109 Summary: LabelTk library for OCaml
110 Summary(pl): Biblioteka LablTk dla OCamla
111 Group: Development/Libraries
112 Requires: %{name}-labltk = %{version}-%{release}
114 %description labltk-devel
115 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
116 contains files needed to develop OCaml programs using LablTk.
118 %description labltk-devel -l pl
119 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
120 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
124 Summary: Runtime for LabelTk library
125 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
127 Requires: %{name} = %{version}-%{release}
130 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
131 contains files needed to run bytecode OCaml programs using LablTk.
133 %description labltk -l pl
134 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
135 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
138 %package x11graphics-devel
139 Summary: X11 graphic output for OCaml
140 Summary(pl): Iksowe wyj¶cie graficzne dla OCamla
141 Group: Development/Libraries
142 Requires: %{name}-x11graphics = %{version}-%{release}
144 %description x11graphics-devel
145 x11graphics module gives OCaml program access to drawing in X11
146 windows. This package contains files needed to develop OCaml programs
149 %description x11graphics-devel -l pl
150 Modu³ x11graphics daje programom napisanym w OCamlu dostêp do
151 rysowania po oknach X11. Pakiet ten zawiera pliki niezbêdne do
152 tworzenia programów u¿ywaj±cych x11graphics.
155 Summary: X11 graphic output for OCaml
156 Summary(pl): Iksowe wyj¶cie graficzne dla OCamla
157 Group: Development/Libraries
158 Requires: %{name} = %{version}-%{release}
160 %description x11graphics
161 x11graphics module gives OCaml program access to drawing in X11
162 windows. This package contains files needed to run bytecode OCaml
163 programs using x11graphics.
165 %description x11graphics -l pl
166 Modu³ x11graphics daje programom napisanym w OCamlu dostêp do
167 rysowania po oknach X11. Pakiet ten zawiera binaria potrzebne do
168 uruchamiania programów u¿ywaj±cych x11graphics.
171 Summary: Objective Caml Preprocessor
172 Summary(pl): Preprocesor Ocamla
173 Group: Development/Languages
174 Requires: %{name} = %{version}-%{release}
175 Provides: camlp4 = %{version}-%{release}
179 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
180 tools for syntax (grammars) and the ability to modify the concrete
181 syntax of the language (quotations, syntax extensions).
183 Camlp4 can parse normal Ocaml concrete syntax or any other
184 user-definable syntax. As an example, an alternative syntax is
185 provided, named revised, because it tries to fix some small problems
186 of the normal syntax.
188 Camlp4 can pretty print the normal Ocaml concrete syntax or the
189 revised one. It is therefore always possible to have a version of your
190 sources compilable by the compiler Objective Caml without
193 %description camlp4 -l pl
194 Camlp4 jest preprocesorem dla Ocamla. Oferuje narzêdzia do sk³adni
195 (gramatyki) oraz umiejêtno¶æ modyfikowania konkretnej sk³adni jêzyka
196 (cytowania, rozszerzenia).
198 Camlp4 mo¿e sparsowaæ normaln± sk³adniê Ocamla lub inn± dowoln±
199 definiowaln± przez u¿ytkownika. Jako przyk³ad jest podana alternatywna
200 sk³adnia, nazwana "poprawiona", poniewa¿ próbuje poprawiæ drobne
201 problemy ze zwyk³± sk³adni±.
203 Camlp4 umie ³adnie wypisaæ normaln± sk³adniê Camla lub "poprawion±".
204 Dziêki temu jest mo¿liwe posiadanie wersji swoich ¼róde³
205 kompilowalnych przez kompilatora Ocamla bez preprocesingu.
208 Summary: Compiled parts of OCaml compiler
209 Summary(pl): Skompilowane kawa³ki kompilatora OCamla
210 Group: Development/Languages
211 Requires: %{name} = %{version}-%{release}
214 This package contains *.cmi and *.cmo files being parts of OCaml
215 compiler. They are needed to compile some programs.
217 %description devel -l pl
218 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
219 OCamla. S± one wymagane do kompilacji niektórych programów.
225 # order mess with docs somewhat
228 mv htmlman docs/html/ocaml
229 cp %{SOURCE3} docs/ocaml.ps.gz
231 mv camlp4-%{version}-refman.html docs/html/camlp4
232 cp %{SOURCE5} docs/camlp4.ps.gz
234 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
235 cp %{SOURCE7} docs/camlp4-tutorial.ps.gz
249 -cc "%{__cc} %{rpmcflags}" \
251 -libdir %{_libdir}/%{name} \
252 -mandir %{_mandir}/man1 \
254 %{?_without_tk:-notk} \
257 # this is crude hack (works in addition to ocaml-db3.patch)
258 cp config/Makefile config/Makefile.tmp
259 sed -e 's|-ldb1|-ldb|; s|-I%{_includedir}/db1||' < config/Makefile.tmp > config/Makefile
261 %{__make} world bootstrap opt ocamlc.opt ocamlopt.opt
262 %{__make} -C camlp4 optp4
263 %{__make} -C tools objinfo
265 # hack info pages to contain dir entry
266 cat <<EOF >infoman/ocaml.info
267 INFO-DIR-SECTION Programming Languages:
269 * Ocaml: (ocaml). The Ocaml language
272 zcat infoman/ocaml.info.gz >> infoman/ocaml.info
274 gzip -9nf infoman/ocaml.info
277 rm -rf $RPM_BUILD_ROOT
278 install -d $RPM_BUILD_ROOT%{_infodir}
280 %{__make} install DESTDIR=$RPM_BUILD_ROOT
282 %if %{!?_without_emacs:1}%{?_without_emacs:0}
283 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
284 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
285 else echo xemacs; fi`" \
286 EMACSDIR="%{_libdir}/emacs/site-lisp"
289 # symlink .opt versions of compilers (if present)
290 for f in ocamlc ocamlopt; do
291 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
292 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
293 $RPM_BUILD_ROOT%{_bindir}/$f.byte
294 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
298 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.ml{,i}
299 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*/*.ml{,i}
301 # move includes to the proper place
302 install -d $RPM_BUILD_ROOT%{_includedir}
303 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
304 # but leave compatibility symlink
305 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
307 # compiled sources of compiler, needed by some programs
308 for f in {asm,byte}comp parsing typing utils ; do
309 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
310 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
313 # this isn't installed by default, but is useful
314 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
316 # instead of adding new directories to ld.conf, we use single dirctory
317 # for dlls comming from other packages, they should be symlinked here
318 echo %{_libdir}/%{name} > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf
320 %{!?_without_tk:(cd $RPM_BUILD_ROOT%{_libdir}/%{name} && ln -s labltk/dll*.so .)}
322 install -d $RPM_BUILD_ROOT%{_examplesdir}
323 mv otherlibs/labltk/example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
325 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
327 install infoman/*info* $RPM_BUILD_ROOT%{_infodir}
329 gzip -9nf LICENSE Changes README Upgrading
332 rm -rf $RPM_BUILD_ROOT
335 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
338 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_bindir}/ocamlrun
344 %attr(755,root,root) %{_libdir}/%{name}/dll[bmnstu]*.so
347 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_bindir}/ocaml
350 %attr(755,root,root) %{_bindir}/ocaml[cmdlopy]*
351 %attr(755,root,root) %{_bindir}/*labels
353 %{_libdir}/%{name}/caml
354 %{_libdir}/%{name}/threads
355 %{_libdir}/%{name}/[abefhimnopqrstuw]*.*
356 %{_libdir}/%{name}/callback.*
357 %{_libdir}/%{name}/char.*
358 %{_libdir}/%{name}/dbm.*
359 %{_libdir}/%{name}/digest.*
360 %{_libdir}/%{name}/dynlink.*
361 %{_libdir}/%{name}/g[ce]*.*
362 %{_libdir}/%{name}/l*.cm*
363 %{_libdir}/%{name}/lib[abc]*.a
364 %{_libdir}/%{name}/libmldbm.a
365 %{_libdir}/%{name}/lib[nstu]*.a
366 %{_libdir}/%{name}/ld.conf
367 %attr(755,root,root) %{_libdir}/%{name}/expunge
368 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
369 %{_libdir}/%{name}/camlheader
370 %{_libdir}/%{name}/camlheader_ur
371 %attr(755,root,root) %{_libdir}/%{name}/*labels
372 %{_mandir}/man*/*ocaml*
376 %defattr(644,root,root,755)
377 %{_libdir}/%{name}/compiler
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_bindir}/*camlp4*
382 %attr(755,root,root) %{_bindir}/ocpp
383 %attr(755,root,root) %{_bindir}/odyl
384 %{_libdir}/%{name}/camlp4
385 %{_mandir}/man*/*camlp4*
386 %{_mandir}/man*/*ocpp*
388 %if %{!?_without_tk:1}%{?_without_tk:0}
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/labltk
392 %attr(755,root,root) %{_bindir}/ocamlbrowser
393 %dir %{_libdir}/%{name}/labltk
394 %{_libdir}/%{name}/labltk/*.cm*
395 %{_libdir}/%{name}/labltk/*.a
396 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
397 %{_examplesdir}/%{name}-labltk-%{version}
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_libdir}/%{name}/labltk/dlllabltk*
402 %{_libdir}/%{name}/dlllabltk*
405 %if %{!?_without_x11:1}%{?_without_x11:0}
406 %files x11graphics-devel
407 %defattr(644,root,root,755)
408 %{_libdir}/%{name}/graphics*
409 %{_libdir}/%{name}/libgraphics.a
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_libdir}/%{name}/dllgraphics.so
416 %if %{!?_without_emacs:1}%{?_without_emacs:0}
418 %defattr(644,root,root,755)
419 %{_libdir}/emacs/site-lisp/*.el
423 %defattr(644,root,root,755)
427 %defattr(644,root,root,755)