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