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}/%{name}-%{version}.tar.gz
18 Source1: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}/%{name}-%{version}-refman.html.tar.gz
19 Source2: ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}/%{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 Source7: http://www.oefai.at/~markus/ocaml_sources/pure-fun-1.0.4.tar.bz2
25 Source8: http://www.oefai.at/~markus/ocaml_sources/ds-contrib.tar.gz
26 Patch0: %{name}-build.patch
27 Patch1: %{name}-manlinks.patch
28 Patch2: %{name}-db3.patch
29 Patch3: %{name}-objinfo.patch
30 Patch4: %{name}-opt-symbols.patch
31 Patch5: %{name}-mano.patch
32 URL: http://caml.inria.fr/
33 Requires: ocaml-runtime = %{version}-%{release}
34 Obsoletes: ocaml-ocamldoc
35 Provides: ocaml-ocamldoc
36 BuildRequires: db3-devel
37 %{!?_without_tk:BuildRequires: tk-devel}
38 %{!?_without_x11:BuildRequires: XFree86-devel}
39 %{!?_without_emacs:BuildRequires: xemacs}
40 %{!?_without_emacs:BuildRequires: xemacs-common}
41 %{!?_without_emacs:BuildRequires: xemacs-fsf-compat-pkg}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Objective Caml is a high-level, strongly-typed, functional and
47 object-oriented programming language from the ML family of languages.
49 This package comprises two batch compilers (a fast bytecode compiler
50 and an optimizing native-code compiler), an interactive toplevel
51 system, Lex&Yacc tools, a replay debugger, and a comprehensive
55 Objektowy Caml jest funkcjonalnym, obiektowo zorientowanym jêzykiem
56 wysokiego poziomu z rodziny jêzyków ML.
58 Ten pakiet zawiera dwa kompilatory (szybki kompilator bytecode oraz
59 zoptymalizowany natywny kompilator), interaktywny g³ówny system,
60 narzêdzia Lex&Yacc, odpluskwiacz i biblioteki.
63 Summary: PostScript documentation for OCaml
64 Summary(pl): Dokumentacja dla OCaml-a w formacie PostSript
65 Group: Development/Tools
68 PostScript documentation for OCaml. HTML documentation is in main package.
70 %description doc-ps -l pl
71 Dokumentacja dla OCamla w formacie PostSript. Dokumentacja HTML jest
75 Summary: Emacs mode for OCaml
76 Summary(pl): Tryb Emacsa dla OCaml
77 Group: Development/Tools
78 Requires: %{name} = %{version}
81 Emacs mode files for Objective Caml language.
83 %description emacs -l pl
84 Pliki trybu Emacsa dla jêzyka Objektowego Camla.
87 Summary: Runtime system for OCaml
88 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
92 This package contains binaries needed to run bytecode OCaml programs:
93 ocamlrun bytecode interpreter, and basic dynamic link libraries.
95 %description runtime -l pl
96 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
97 OCamlu skompilowanych do bytecodu: interpreter bytecodu ocamlrun oraz
98 podstawowe bibliotki linkowane dynamicznie.
100 %package labltk-devel
101 Summary: LabelTk library for OCaml
102 Summary(pl): Biblioteka LablTk dla OCamla
103 Group: Development/Libraries
104 Requires: %{name}-labltk = %{version}-%{release}
106 %description labltk-devel
107 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
108 contains files needed to develop OCaml programs using LablTk.
110 %description labltk-devel -l pl
111 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
112 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
116 Summary: Runtime for LabelTk library
117 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
119 Requires: %{name} = %{version}-%{release}
122 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
123 contains files needed to run bytecode OCaml programs using LablTk.
125 %description labltk -l pl
126 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
127 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
130 %package x11graphics-devel
131 Summary: X11 graphic output for OCaml
132 Summary(pl): Iksowe wyj¶cie graficzne dla OCamla
133 Group: Development/Libraries
134 Requires: %{name}-x11graphics = %{version}-%{release}
136 %description x11graphics-devel
137 x11graphics module gives OCaml program access to drawing in X11
138 windows. This package contains files needed to develop OCaml programs
141 %description x11graphics-devel -l pl
142 Modu³ x11graphics daje programom napisanym w OCamlu dostêp do
143 rysowania po oknach X11. Pakiet ten zawiera pliki niezbêdne do
144 tworzenia programów u¿ywaj±cych x11graphics.
147 Summary: X11 graphic output for OCaml
148 Summary(pl): Iksowe wyj¶cie graficzne dla OCamla
149 Group: Development/Libraries
150 Requires: %{name} = %{version}-%{release}
152 %description x11graphics
153 x11graphics module gives OCaml program access to drawing in X11
154 windows. This package contains files needed to run bytecode OCaml
155 programs using x11graphics.
157 %description x11graphics -l pl
158 Modu³ x11graphics daje programom napisanym w OCamlu dostêp do
159 rysowania po oknach X11. Pakiet ten zawiera binaria potrzebne do
160 uruchamiania programów u¿ywaj±cych x11graphics.
163 Summary: Objective Caml Preprocessor
164 Summary(pl): Preprocesor Ocamla
165 Group: Development/Languages
166 Requires: %{name} = %{version}-%{release}
167 Provides: camlp4 = %{version}-%{release}
171 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
172 tools for syntax (grammars) and the ability to modify the concrete
173 syntax of the language (quotations, syntax extensions).
175 Camlp4 can parse normal Ocaml concrete syntax or any other
176 user-definable syntax. As an example, an alternative syntax is
177 provided, named revised, because it tries to fix some small problems
178 of the normal syntax.
180 Camlp4 can pretty print the normal Ocaml concrete syntax or the
181 revised one. It is therefore always possible to have a version of your
182 sources compilable by the compiler Objective Caml without
185 %description camlp4 -l pl
186 Camlp4 jest preprocesorem dla Ocamla. Oferuje narzêdzia do sk³adni
187 (gramatyki) oraz umiejêtno¶æ modyfikowania konkretnej sk³adni jêzyka
188 (cytowania, rozszerzenia).
190 Camlp4 mo¿e sparsowaæ normaln± sk³adniê Ocamla lub inn± dowoln±
191 definiowaln± przez u¿ytkownika. Jako przyk³ad jest podana alternatywna
192 sk³adnia, nazwana "poprawiona", poniewa¿ próbuje poprawiæ drobne
193 problemy ze zwyk³± sk³adni±.
195 Camlp4 umie ³adnie wypisaæ normaln± sk³adniê Camla lub "poprawion±".
196 Dziêki temu jest mo¿liwe posiadanie wersji swoich ¼róde³
197 kompilowalnych przez kompilatora Ocamla bez preprocesingu.
200 Summary: Compiled parts of OCaml compiler
201 Summary(pl): Skompilowane kawa³ki kompilatora OCamla
202 Group: Development/Languages
203 Requires: %{name} = %{version}-%{release}
206 This package contains *.cmi and *.cmo files being parts of OCaml
207 compiler. They are needed to compile some programs.
209 %description devel -l pl
210 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
211 OCamla. S± one wymagane do kompilacji niektórych programów.
213 %package ocamldoc-devel
214 Summary: Files needed to develop programs using ocamldoc
215 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
216 Group: Development/Languages
217 Requires: %{name} = %{version}-%{release}
219 %description ocamldoc-devel
220 You need this package if you are going to write ocamldoc front end or
223 %description ocamldoc-devel -l pl
224 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasza pisaæ front end
225 dla ocamldoc lub co¶ podobnego.
228 Summary: Sources of OCaml standard library
229 Summary(pl): ¬ród³a biblioteki standardowej OCamla
230 Group: Development/Languages
231 Requires: %{name} = %{version}-%{release}
233 %description lib-source
234 This sources come helpful during debugging of user programs with ocamldebug.
236 %description lib-source -l pl
237 ¬ród³a te co¶ przydatne przy odpluskwianiu programów u¿ytkownika
238 z u¿yciem ocamldebug.
240 # maybe we'll want to add some more stuff here?
242 Summary: Example source code for OCaml
243 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
244 Group: Development/Languages
245 Requires: %{name} = %{version}-%{release}
247 %description examples
248 This packages contains sources for Okasaki's Purely Functional
249 Datastructures in OCaml, along with some contributions.
251 %description examples -l pl
252 Pakiet ten zawiera ¼ród³a Czysto-Funkcjonalnych Struktur Danych
253 Okasaki'ego, prze³o¿one na OCamla, wraz z dodatkami.
258 %setup -q -T -D -c -n %{name}-%{version}/examples -a 7
259 %setup -q -T -D -c -n %{name}-%{version}/examples -a 8
260 %setup -q -T -D -n %{name}-%{version} -a 3
261 %setup -q -T -D -n %{name}-%{version} -a 5
262 # order mess with docs somewhat
265 mv htmlman docs/html/ocaml
266 cp %{SOURCE2} docs/ocaml.ps.gz
267 mv camlp4-%{version}-manual.html docs/html/camlp4
268 cp %{SOURCE4} docs/camlp4.ps.gz
269 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
270 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
280 -cc "%{__cc} %{rpmcflags}" \
282 -libdir %{_libdir}/%{name} \
283 -mandir %{_mandir}/man1 \
285 %{?_without_tk:-notk} \
288 %{__make} world bootstrap opt.opt
289 %{__make} -C tools objinfo
292 rm -rf $RPM_BUILD_ROOT
295 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
296 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
297 MANDIR=$RPM_BUILD_ROOT%{_mandir}
299 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
300 %{_libdir}/%{name}/stublibs
304 %if %{!?_without_emacs:1}%{?_without_emacs:0}
305 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
306 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
307 else echo xemacs; fi`" \
308 EMACSDIR="$RPM_BUILD_ROOT%{_libdir}/emacs/site-lisp"
311 # symlink .opt versions of compilers (if present)
312 # warning: don't do that with camlp4 (can't load extensions then)
313 for f in ocamlc ocamlopt ocamldoc ocamllex; do
314 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
315 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
316 $RPM_BUILD_ROOT%{_bindir}/$f.byte
317 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
321 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.mli
322 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*/*.ml{,i}
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 %exclude %{_libdir}/%{name}/stublibs/dlllabltk.so
362 %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 %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
395 %{_examplesdir}/%{name}-%{version}
397 # they are poor, html is much better
402 %defattr(644,root,root,755)
403 %{_libdir}/%{name}/compiler
406 %defattr(644,root,root,755)
407 %doc docs/html/camlp4*
408 %attr(755,root,root) %{_bindir}/*camlp4*
409 %attr(755,root,root) %{_bindir}/ocpp
410 # Not installed since 3.05, is is needed?
411 #%attr(755,root,root) %{_bindir}/odyl
412 %{_libdir}/%{name}/camlp4
413 %{_mandir}/man*/*camlp4*
414 %{_mandir}/man*/*ocpp*
416 %if %{!?_without_tk:1}%{?_without_tk:0}
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_bindir}/labltk
420 %attr(755,root,root) %{_bindir}/ocamlbrowser
421 %dir %{_libdir}/%{name}/labltk
422 %{_libdir}/%{name}/labltk/*.cm*
423 %{_libdir}/%{name}/labltk/*.a
424 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
425 %{_examplesdir}/%{name}-labltk-%{version}
428 %defattr(644,root,root,755)
429 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
430 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
433 %if %{!?_without_x11:1}%{?_without_x11:0}
434 %files x11graphics-devel
435 %defattr(644,root,root,755)
436 %{_libdir}/%{name}/graphics*.cm*
437 %{_libdir}/%{name}/graphics.a
438 %{_libdir}/%{name}/libgraphics.a
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
445 %if %{!?_without_emacs:1}%{?_without_emacs:0}
447 %defattr(644,root,root,755)
448 %{_libdir}/emacs/site-lisp/*.el*
451 %files ocamldoc-devel
452 %defattr(644,root,root,755)
453 %{_libdir}/%{name}/ocamldoc/*.cm*
454 %{_libdir}/%{name}/ocamldoc/*.a
457 %defattr(644,root,root,755)