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 OCamla (Objective Caml) 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 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
56 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
58 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
59 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
60 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
61 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
64 Summary: PostScript documentation for OCaml
65 Summary(pl): Dokumentacja dla OCamla w formacie PostScript
66 Group: Development/Tools
69 PostScript documentation for OCaml. HTML documentation is in main package.
71 %description doc-ps -l pl
72 Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
76 Summary: Emacs mode for OCaml
77 Summary(pl): Tryb OCamla dla Emacsa
78 Group: Development/Tools
79 Requires: %{name} = %{version}
82 Emacs mode files for Objective Caml language.
84 %description emacs -l pl
85 Pliki trybu OCamla dla Emacsa.
88 Summary: Runtime system for OCaml
89 Summary(pl): ¦rodowisko uruchomieniowe dla OCamla
93 This package contains binaries needed to run bytecode OCaml programs:
94 ocamlrun bytecode interpreter, and basic dynamic link libraries.
96 %description runtime -l pl
97 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
98 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
99 podstawowe bibliotki linkowane dynamicznie.
101 %package labltk-devel
102 Summary: LablTk library for OCaml
103 Summary(pl): Biblioteka LablTk dla OCamla
104 Group: Development/Libraries
105 Requires: %{name}-labltk = %{version}-%{release}
107 %description labltk-devel
108 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
109 contains files needed to develop OCaml programs using LablTk.
111 %description labltk-devel -l pl
112 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
113 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
117 Summary: Runtime for LablTk library
118 Summary(pl): ¦rodowisko uruchomieniowe dla biblioteki LablTk
120 Requires: %{name} = %{version}-%{release}
123 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
124 contains files needed to run bytecode OCaml programs using LablTk.
126 %description labltk -l pl
127 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
128 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
131 %package x11graphics-devel
132 Summary: X11 graphic output for OCaml
133 Summary(pl): Dostêp do X11 dla OCamla
134 Group: Development/Libraries
135 Requires: %{name}-x11graphics = %{version}-%{release}
137 %description x11graphics-devel
138 x11graphics module gives OCaml program access to drawing in X11
139 windows. This package contains files needed to develop OCaml programs
142 %description x11graphics-devel -l pl
143 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
144 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
145 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
148 Summary: X11 graphic output for OCaml
149 Summary(pl): Dostêp do X11 dla OCamla
150 Group: Development/Libraries
151 Requires: %{name} = %{version}-%{release}
153 %description x11graphics
154 x11graphics module gives OCaml program access to drawing in X11
155 windows. This package contains files needed to run bytecode OCaml
156 programs using x11graphics.
158 %description x11graphics -l pl
159 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
160 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
161 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
164 Summary: Objective Caml Preprocessor
165 Summary(pl): Preprocesor OCamla
166 Group: Development/Languages
167 Requires: %{name} = %{version}-%{release}
168 Provides: camlp4 = %{version}-%{release}
172 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
173 tools for syntax (grammars) and the ability to modify the concrete
174 syntax of the language (quotations, syntax extensions).
176 Camlp4 can parse normal Ocaml concrete syntax or any other
177 user-definable syntax. As an example, an alternative syntax is
178 provided, named revised, because it tries to fix some small problems
179 of the normal syntax.
181 Camlp4 can pretty print the normal Ocaml concrete syntax or the
182 revised one. It is therefore always possible to have a version of your
183 sources compilable by the Objective Caml compiler without
186 %description camlp4 -l pl
187 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
188 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
189 jêzyka (cytowania, rozszerzenia).
191 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
192 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
193 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
194 wystêpuj±ce w sk³adni oryginalnej.
196 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
197 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
201 Summary: Compiled parts of OCaml compiler
202 Summary(pl): Skompilowane czê¶ci kompilatora OCamla
203 Group: Development/Languages
204 Requires: %{name} = %{version}-%{release}
207 This package contains *.cmi and *.cmo files being parts of OCaml
208 compiler. They are needed to compile some programs.
210 %description devel -l pl
211 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
212 OCamla. S± one wymagane do kompilacji niektórych programów.
214 %package ocamldoc-devel
215 Summary: Files needed to develop programs using ocamldoc
216 Summary(pl): Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
217 Group: Development/Languages
218 Requires: %{name} = %{version}-%{release}
220 %description ocamldoc-devel
221 You need this package if you are going to write ocamldoc front end or
224 %description ocamldoc-devel -l pl
225 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
226 dla ocamldoc lub co¶ podobnego.
229 Summary: Sources of OCaml standard library
230 Summary(pl): ¬ród³a biblioteki standardowej OCamla
231 Group: Development/Languages
232 Requires: %{name} = %{version}-%{release}
234 %description lib-source
235 This sources come helpful during debugging of user programs with ocamldebug.
237 %description lib-source -l pl
238 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
239 z u¿yciem ocamldebug.
241 # maybe we'll want to add some more stuff here?
243 Summary: Example source code for OCaml
244 Summary(pl): Przyk³adowe kody ¼ród³owe w OCamlu
245 Group: Development/Languages
246 Requires: %{name} = %{version}-%{release}
248 %description examples
249 This packages contains sources for Okasaki's Purely Functional
250 Datastructures in OCaml, along with some contributions.
252 %description examples -l pl
253 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
254 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
259 %setup -q -T -D -c -n %{name}-%{version}/examples -a 7
260 %setup -q -T -D -c -n %{name}-%{version}/examples -a 8
261 %setup -q -T -D -n %{name}-%{version} -a 3
262 %setup -q -T -D -n %{name}-%{version} -a 5
263 # order mess with docs somewhat
266 mv htmlman docs/html/ocaml
267 cp %{SOURCE2} docs/ocaml.ps.gz
268 mv camlp4-%{version}-manual.html docs/html/camlp4
269 cp %{SOURCE4} docs/camlp4.ps.gz
270 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
271 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
281 -cc "%{__cc} %{rpmcflags}" \
283 -libdir %{_libdir}/%{name} \
284 -mandir %{_mandir}/man1 \
286 %{?_without_tk:-no-tk} \
289 %{__make} world bootstrap opt.opt
290 %{__make} -C tools objinfo
293 rm -rf $RPM_BUILD_ROOT
296 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
297 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
298 MANDIR=$RPM_BUILD_ROOT%{_mandir}
300 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
301 %{_libdir}/%{name}/stublibs
305 %if %{!?_without_emacs:1}%{?_without_emacs:0}
306 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
307 EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
308 else echo xemacs; fi`" \
309 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
312 # symlink .opt versions of compilers (if present)
313 # warning: don't do that with camlp4 (can't load extensions then)
314 for f in ocamlc ocamlopt ocamldoc ocamllex; do
315 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
316 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
317 $RPM_BUILD_ROOT%{_bindir}/$f.byte
318 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
322 # move includes to the proper place
323 install -d $RPM_BUILD_ROOT%{_includedir}
324 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
325 # but leave compatibility symlink
326 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
328 # compiled sources of compiler, needed by some programs
329 for f in {asm,byte}comp parsing typing utils ; do
330 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
331 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
334 # this isn't installed by default, but is useful
335 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
337 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
338 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
340 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
341 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
343 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
346 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
347 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
350 rm -rf $RPM_BUILD_ROOT
353 %defattr(644,root,root,755)
354 %attr(755,root,root) %{_bindir}/ocamlrun
355 %dir %{_libdir}/%{name}
356 %dir %{_libdir}/%{name}/stublibs
357 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
358 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
359 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlllabltk.so}
360 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlltkanim.so}
363 %defattr(644,root,root,755)
364 %doc LICENSE Changes README Upgrading
366 %attr(755,root,root) %{_bindir}/ocaml*
367 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
368 %exclude %{_bindir}/ocamlrun
369 %attr(755,root,root) %{_bindir}/*labels
371 %{_libdir}/%{name}/caml
372 %{_libdir}/%{name}/threads
373 %{_libdir}/%{name}/*.a
374 %{_libdir}/%{name}/*.o
375 %{_libdir}/%{name}/*.cm*
376 %exclude %{_libdir}/%{name}/*graphics*
377 %{_libdir}/%{name}/ld.conf
378 %{_libdir}/%{name}/camlheader
379 %{_libdir}/%{name}/camlheader_ur
380 %dir %{_libdir}/%{name}/ocamldoc
381 %{_libdir}/%{name}/ocamldoc/*.sty
382 %{_libdir}/%{name}/ocamldoc/*.hva
383 %attr(755,root,root) %{_libdir}/%{name}/expunge
384 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
385 %attr(755,root,root) %{_libdir}/%{name}/*labels
386 %{_mandir}/man1/*ocaml*
389 %defattr(644,root,root,755)
390 %{_libdir}/%{name}/*.ml
391 %{_libdir}/%{name}/*.mli
394 %defattr(644,root,root,755)
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 %{_datadir}/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)