]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml.spec
- added Obsoletes: ocaml-devel for ocaml-compiler-objects; suggested
[packages/ocaml.git] / ocaml.spec
1 #
2 # Conditional build:
3 # _without_emacs        - without emacs subpackage
4 # _without_tk           - without tk support
5 # _without_x11          - without X11 support (implies --without tk)
6 # _with_db3             - use db3 instead of db 4.x
7 #
8 %{?_without_x11:%define _without_tk     1}
9
10 Summary:        The Objective Caml compiler and programming environment
11 Summary(pl):    Kompilator OCamla (Objective Caml) oraz ¶rodowisko programistyczne
12 Name:           ocaml
13 Version:        3.06
14 Release:        3
15 License:        distributable
16 Vendor:         Group of implementors <caml-light@inria.fr>
17 Group:          Development/Languages
18 Source0:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}/%{name}-%{version}.tar.gz
19 Source1:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}/%{name}-%{version}-refman.html.tar.gz
20 Source2:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}/%{name}-%{version}-refman.ps.gz
21 Source3:        ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-manual.html.tar.gz
22 Source4:        ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-manual.dvi.gz
23 Source5:        ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.html.tar.gz
24 Source6:        ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.dvi.gz
25 Source7:        http://www.oefai.at/~markus/ocaml_sources/pure-fun-1.0.4.tar.bz2
26 Source8:        http://www.oefai.at/~markus/ocaml_sources/ds-contrib.tar.gz
27 Patch0:         %{name}-build.patch
28 Patch1:         %{name}-manlinks.patch
29 Patch2:         %{name}-db3.patch
30 Patch3:         %{name}-objinfo.patch
31 Patch4:         %{name}-opt-symbols.patch
32 Patch5:         %{name}-mano.patch
33 URL:            http://caml.inria.fr/
34 Requires:       ocaml-runtime = %{version}-%{release}
35 Obsoletes:      ocaml-ocamldoc
36 Provides:       ocaml-ocamldoc
37 %{?_with_db3:BuildRequires:     db3-devel}
38 %{!?_with_db3:BuildRequires:    db-devel >= 4.1}
39 %{!?_without_tk:BuildRequires:          tk-devel}
40 %{!?_without_x11:BuildRequires:         XFree86-devel}
41 %{!?_without_emacs:BuildRequires:       xemacs}
42 %{!?_without_emacs:BuildRequires:       xemacs-common}
43 %{!?_without_emacs:BuildRequires:       xemacs-fsf-compat-pkg}
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46
47 %description
48 Objective Caml is a high-level, strongly-typed, functional and
49 object-oriented programming language from the ML family of languages.
50
51 This package comprises two batch compilers (a fast bytecode compiler
52 and an optimizing native-code compiler), an interactive toplevel
53 system, Lex&Yacc tools, a replay debugger, and a comprehensive
54 library.
55
56 %description -l pl
57 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym jêzykiem
58 wysokiego poziomu z silnym typowaniem. Nale¿y do rodziny jêzyków ML.
59
60 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
61 oraz optymalizuj±cy kompilator do kodu natywnego), interaktywne ¶rodowisko
62 pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
63 (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
64
65 %package doc-ps
66 Summary:        PostScript documentation for OCaml
67 Summary(pl):    Dokumentacja dla OCamla w formacie PostScript
68 Group:          Development/Tools
69
70 %description doc-ps
71 PostScript documentation for OCaml. HTML documentation is in main package.
72
73 %description doc-ps -l pl
74 Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
75 w g³ównym pakiecie.
76
77 %package emacs
78 Summary:        Emacs mode for OCaml
79 Summary(pl):    Tryb OCamla dla Emacsa
80 Group:          Development/Tools
81 Requires:       %{name} = %{version}
82
83 %description emacs
84 Emacs mode files for Objective Caml language.
85
86 %description emacs -l pl
87 Pliki trybu OCamla dla Emacsa.
88
89 %package runtime
90 Summary:        Runtime system for OCaml
91 Summary(pl):    ¦rodowisko uruchomieniowe dla OCamla
92 Group:          Libraries
93
94 %description runtime
95 This package contains binaries needed to run bytecode OCaml programs:
96 ocamlrun bytecode interpreter, and basic dynamic link libraries.
97
98 %description runtime -l pl
99 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
100 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) oraz
101 podstawowe bibliotki linkowane dynamicznie.
102
103 %package labltk-devel
104 Summary:        LablTk library for OCaml
105 Summary(pl):    Biblioteka LablTk dla OCamla
106 Group:          Development/Libraries
107 Requires:       %{name}-labltk = %{version}-%{release}
108
109 %description labltk-devel
110 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
111 contains files needed to develop OCaml programs using LablTk.
112
113 %description labltk-devel -l pl
114 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
115 Tcl/Tk. Pakiet ten zawiera pliki niezbêdne do tworzenia programów
116 u¿ywaj±cych LablTk.
117
118 %package labltk
119 Summary:        Runtime for LablTk library
120 Summary(pl):    ¦rodowisko uruchomieniowe dla biblioteki LablTk
121 Group:          Libraries
122 Requires:       %{name} = %{version}-%{release}
123
124 %description labltk
125 LablTk gives OCaml program access to Tcl/Tk GUI widgets. This package
126 contains files needed to run bytecode OCaml programs using LablTk.
127
128 %description labltk -l pl
129 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do widgetów
130 Tcl/Tk. Pakiet ten zawiera binaria potrzebne do uruchamiania programów
131 u¿ywaj±cych LablTk.
132
133 %package x11graphics-devel
134 Summary:        X11 graphic output for OCaml
135 Summary(pl):    Dostêp do X11 dla OCamla
136 Group:          Development/Libraries
137 Requires:       %{name}-x11graphics = %{version}-%{release}
138
139 %description x11graphics-devel
140 x11graphics module gives OCaml program access to drawing in X11
141 windows. This package contains files needed to develop OCaml programs
142 using x11graphics.
143
144 %description x11graphics-devel -l pl
145 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
146 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
147 niezbêdne do tworzenia programów u¿ywaj±cych x11graphics.
148
149 %package x11graphics
150 Summary:        X11 graphic output for OCaml
151 Summary(pl):    Dostêp do X11 dla OCamla
152 Group:          Development/Libraries
153 Requires:       %{name} = %{version}-%{release}
154
155 %description x11graphics
156 x11graphics module gives OCaml program access to drawing in X11
157 windows. This package contains files needed to run bytecode OCaml
158 programs using x11graphics.
159
160 %description x11graphics -l pl
161 Modu³ x11graphics daje programom napisanym w OCamlu mo¿liwo¶æ
162 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
163 potrzebne do uruchamiania programów u¿ywaj±cych x11graphics.
164
165 %package camlp4
166 Summary:        Objective Caml Preprocessor
167 Summary(pl):    Preprocesor OCamla
168 Group:          Development/Languages
169 Requires:       %{name} = %{version}-%{release}
170 Provides:       camlp4 = %{version}-%{release}
171 Obsoletes:      camlp4
172
173 %description camlp4
174 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
175 tools for syntax (grammars) and the ability to modify the concrete
176 syntax of the language (quotations, syntax extensions).
177
178 Camlp4 can parse normal Ocaml concrete syntax or any other
179 user-definable syntax. As an example, an alternative syntax is
180 provided, named revised, because it tries to fix some small problems
181 of the normal syntax.
182
183 Camlp4 can pretty print the normal Ocaml concrete syntax or the
184 revised one. It is therefore always possible to have a version of your
185 sources compilable by the Objective Caml compiler without
186 preprocessing.
187
188 %description camlp4 -l pl
189 Camlp4 jest preprocesorem OCamla. Oferuje narzêdzia do manipulowania
190 sk³adni± (gramatyki) oraz mo¿liwo¶æ modyfikowania oryginalnej sk³adni
191 jêzyka (cytowania, rozszerzenia).
192
193 Camlp4 mo¿e sparsowaæ oryginaln± sk³adniê Ocamla lub dowoln± inn±
194 definiowaln± przez u¿ytkownika. Jako przyk³ad podana jest alternatywna
195 sk³adnia (revised syntax), która próbuje poprawiæ drobne problemy
196 wystêpuj±ce w sk³adni oryginalnej.
197
198 Camlp4 umie ³adnie formatowaæ ¼ród³a zarówno w oryginalnej jak i
199 poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
200 sk³adni na drug±.
201
202 %package compiler-objects
203 Summary:        Compiled parts of OCaml compiler
204 Summary(pl):    Skompilowane czê¶ci kompilatora OCamla
205 Group:          Development/Languages
206 Requires:       %{name} = %{version}-%{release}
207 Obsoletes:      ocaml-devel
208
209 %description compiler-objects
210 This package contains *.cmi and *.cmo files being parts of OCaml
211 compiler. They are needed to compile some programs.
212
213 %description compiler-objects -l pl
214 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
215 OCamla. S± one wymagane do kompilacji niektórych programów.
216
217 %package ocamldoc-devel
218 Summary:        Files needed to develop programs using ocamldoc
219 Summary(pl):    Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
220 Group:          Development/Languages
221 Requires:       %{name} = %{version}-%{release}
222
223 %description ocamldoc-devel
224 You need this package if you are going to write ocamldoc front end or
225 something like that.
226
227 %description ocamldoc-devel -l pl
228 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
229 dla ocamldoc lub co¶ podobnego.
230
231 %package lib-source
232 Summary:        Sources of OCaml standard library
233 Summary(pl):    ¬ród³a biblioteki standardowej OCamla
234 Group:          Development/Languages
235 Requires:       %{name} = %{version}-%{release}
236
237 %description lib-source
238 This sources come helpful during debugging of user programs with ocamldebug.
239
240 %description lib-source -l pl
241 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
242 z u¿yciem ocamldebug.
243
244 # maybe we'll want to add some more stuff here?
245 %package examples
246 Summary:        Example source code for OCaml
247 Summary(pl):    Przyk³adowe kody ¼ród³owe w OCamlu
248 Group:          Development/Languages
249 Requires:       %{name} = %{version}-%{release}
250
251 %description examples
252 This packages contains sources for Okasaki's Purely Functional 
253 Datastructures in OCaml, along with some contributions.
254
255 %description examples -l pl
256 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
257 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
258
259 %prep
260 %setup -q -T -b 0
261 %setup -q -T -D -a 1
262 %setup -q -T -D -c -n %{name}-%{version}/examples -a 7
263 %setup -q -T -D -c -n %{name}-%{version}/examples -a 8
264 %setup -q -T -D -n %{name}-%{version} -a 3
265 %setup -q -T -D -n %{name}-%{version} -a 5
266 # order mess with docs somewhat
267 mkdir docs
268 mkdir docs/html
269 mv htmlman docs/html/ocaml
270 cp %{SOURCE2} docs/ocaml.ps.gz
271 mv camlp4-%{version}-manual.html docs/html/camlp4
272 cp %{SOURCE4} docs/camlp4.ps.gz
273 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
274 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
275 %patch0 -p1
276 %patch1 -p1
277 %patch2 -p1
278 %patch3 -p1
279 #%patch4 -p1
280 %patch5 -p1
281
282 %build
283 ./configure \
284         -cc "%{__cc} %{rpmcflags}" \
285         -bindir %{_bindir} \
286         -libdir %{_libdir}/%{name} \
287         -mandir %{_mandir}/man1 \
288         -host %{_host} \
289         %{?_without_tk:-no-tk} \
290         -with-pthread
291
292 %{__make} world bootstrap opt.opt
293 %{__make} -C tools objinfo
294
295 %install
296 rm -rf $RPM_BUILD_ROOT
297
298 %{__make} install \
299         BINDIR=$RPM_BUILD_ROOT%{_bindir} \
300         LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
301         MANDIR=$RPM_BUILD_ROOT%{_mandir}
302
303 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
304 %{_libdir}/%{name}/stublibs
305 %{_libdir}/%{name}
306 EOF
307
308 %if %{!?_without_emacs:1}%{?_without_emacs:0}
309 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
310         EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
311                 else echo xemacs; fi`" \
312         EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
313 %endif
314
315 # symlink .opt versions of compilers (if present)
316 # warning: don't do that with camlp4 (can't load extensions then)
317 for f in ocamlc ocamlopt ocamldoc ocamllex; do
318         if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
319                 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
320                         $RPM_BUILD_ROOT%{_bindir}/$f.byte
321                 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
322         fi
323 done
324
325 # move includes to the proper place
326 install -d $RPM_BUILD_ROOT%{_includedir}
327 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
328 # but leave compatibility symlink
329 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
330
331 # compiled sources of compiler, needed by some programs
332 for f in {asm,byte}comp parsing typing utils ; do
333         install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
334         cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
335 done
336
337 # this isn't installed by default, but is useful
338 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
339
340 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
341 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
342
343 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
344 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
345
346 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
347
348 # shutup checkfiles
349 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
350 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
351
352 %clean
353 rm -rf $RPM_BUILD_ROOT
354
355 %files runtime
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_bindir}/ocamlrun
358 %dir %{_libdir}/%{name}
359 %dir %{_libdir}/%{name}/stublibs
360 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
361 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
362 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlllabltk.so}
363 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlltkanim.so}
364
365 %files
366 %defattr(644,root,root,755)
367 %doc LICENSE Changes README Upgrading
368 %doc docs/html/ocaml
369 %attr(755,root,root) %{_bindir}/ocaml*
370 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
371 %exclude %{_bindir}/ocamlrun
372 %attr(755,root,root) %{_bindir}/*labels
373 %{_includedir}/caml
374 %{_libdir}/%{name}/caml
375 %{_libdir}/%{name}/threads
376 %{_libdir}/%{name}/*.a
377 %{_libdir}/%{name}/*.o
378 %{_libdir}/%{name}/*.cm*
379 %exclude %{_libdir}/%{name}/*graphics*
380 %{_libdir}/%{name}/ld.conf
381 %{_libdir}/%{name}/camlheader
382 %{_libdir}/%{name}/camlheader_ur
383 %dir %{_libdir}/%{name}/ocamldoc
384 %{_libdir}/%{name}/ocamldoc/*.sty
385 %{_libdir}/%{name}/ocamldoc/*.hva
386 %attr(755,root,root) %{_libdir}/%{name}/expunge
387 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
388 %attr(755,root,root) %{_libdir}/%{name}/*labels
389 %{_mandir}/man1/*ocaml*
390
391 %files lib-source
392 %defattr(644,root,root,755)
393 %{_libdir}/%{name}/*.ml
394 %{_libdir}/%{name}/*.mli
395
396 %files examples
397 %defattr(644,root,root,755)
398 %{_examplesdir}/%{name}-%{version}
399
400 # they are poor, html is much better
401 #%files manpages
402 #%{_mandir}/man3/*
403
404 %files compiler-objects
405 %defattr(644,root,root,755)
406 %{_libdir}/%{name}/compiler
407
408 %files camlp4
409 %defattr(644,root,root,755)
410 %doc docs/html/camlp4*
411 %attr(755,root,root) %{_bindir}/*camlp4*
412 %attr(755,root,root) %{_bindir}/ocpp
413 # Not installed since 3.05, is is needed?
414 #%attr(755,root,root) %{_bindir}/odyl
415 %{_libdir}/%{name}/camlp4
416 %{_mandir}/man*/*camlp4*
417 %{_mandir}/man*/*ocpp*
418
419 %if %{!?_without_tk:1}%{?_without_tk:0}
420 %files labltk-devel
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_bindir}/labltk
423 %attr(755,root,root) %{_bindir}/ocamlbrowser
424 %dir %{_libdir}/%{name}/labltk
425 %{_libdir}/%{name}/labltk/*.cm*
426 %{_libdir}/%{name}/labltk/*.a
427 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
428 %{_examplesdir}/%{name}-labltk-%{version}
429
430 %files labltk
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
433 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
434 %endif
435
436 %if %{!?_without_x11:1}%{?_without_x11:0}
437 %files x11graphics-devel
438 %defattr(644,root,root,755)
439 %{_libdir}/%{name}/graphics*.cm*
440 %{_libdir}/%{name}/graphics.a
441 %{_libdir}/%{name}/libgraphics.a
442
443 %files x11graphics
444 %defattr(644,root,root,755)
445 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
446 %endif
447
448 %if %{!?_without_emacs:1}%{?_without_emacs:0}
449 %files emacs
450 %defattr(644,root,root,755)
451 %{_datadir}/emacs/site-lisp/*.el*
452 %endif
453
454 %files ocamldoc-devel
455 %defattr(644,root,root,755)
456 %{_libdir}/%{name}/ocamldoc/*.cm*
457 %{_libdir}/%{name}/ocamldoc/*.a
458
459 %files doc-ps
460 %defattr(644,root,root,755)
461 %doc docs/*.ps.gz
This page took 0.097507 seconds and 4 git commands to generate.