]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml.spec
- renamed ocaml-devel to ocaml-compiler-objects; this subpackage isn't
[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
208 %description compiler-objects
209 This package contains *.cmi and *.cmo files being parts of OCaml
210 compiler. They are needed to compile some programs.
211
212 %description compiler-objects -l pl
213 Pakiet ten zawiera pliki *.cmi oraz *.cmo bêd±ce cze¶ciami kompilatora
214 OCamla. S± one wymagane do kompilacji niektórych programów.
215
216 %package ocamldoc-devel
217 Summary:        Files needed to develop programs using ocamldoc
218 Summary(pl):    Pliki potrzebne do tworzenia programów u¿ywaj±cych ocamldoc
219 Group:          Development/Languages
220 Requires:       %{name} = %{version}-%{release}
221
222 %description ocamldoc-devel
223 You need this package if you are going to write ocamldoc front end or
224 something like that.
225
226 %description ocamldoc-devel -l pl
227 Bêdziesz potrzebowaæ tego pakietu, je¶li zamierzasz pisaæ front end
228 dla ocamldoc lub co¶ podobnego.
229
230 %package lib-source
231 Summary:        Sources of OCaml standard library
232 Summary(pl):    ¬ród³a biblioteki standardowej OCamla
233 Group:          Development/Languages
234 Requires:       %{name} = %{version}-%{release}
235
236 %description lib-source
237 This sources come helpful during debugging of user programs with ocamldebug.
238
239 %description lib-source -l pl
240 ¬ród³a te s± przydatne przy odpluskwianiu programów u¿ytkownika
241 z u¿yciem ocamldebug.
242
243 # maybe we'll want to add some more stuff here?
244 %package examples
245 Summary:        Example source code for OCaml
246 Summary(pl):    Przyk³adowe kody ¼ród³owe w OCamlu
247 Group:          Development/Languages
248 Requires:       %{name} = %{version}-%{release}
249
250 %description examples
251 This packages contains sources for Okasaki's Purely Functional 
252 Datastructures in OCaml, along with some contributions.
253
254 %description examples -l pl
255 Pakiet ten zawiera ¼ród³a Czysto Funkcyjnych Struktur Danych
256 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
257
258 %prep
259 %setup -q -T -b 0
260 %setup -q -T -D -a 1
261 %setup -q -T -D -c -n %{name}-%{version}/examples -a 7
262 %setup -q -T -D -c -n %{name}-%{version}/examples -a 8
263 %setup -q -T -D -n %{name}-%{version} -a 3
264 %setup -q -T -D -n %{name}-%{version} -a 5
265 # order mess with docs somewhat
266 mkdir docs
267 mkdir docs/html
268 mv htmlman docs/html/ocaml
269 cp %{SOURCE2} docs/ocaml.ps.gz
270 mv camlp4-%{version}-manual.html docs/html/camlp4
271 cp %{SOURCE4} docs/camlp4.ps.gz
272 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
273 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
274 %patch0 -p1
275 %patch1 -p1
276 %patch2 -p1
277 %patch3 -p1
278 #%patch4 -p1
279 %patch5 -p1
280
281 %build
282 ./configure \
283         -cc "%{__cc} %{rpmcflags}" \
284         -bindir %{_bindir} \
285         -libdir %{_libdir}/%{name} \
286         -mandir %{_mandir}/man1 \
287         -host %{_host} \
288         %{?_without_tk:-no-tk} \
289         -with-pthread
290
291 %{__make} world bootstrap opt.opt
292 %{__make} -C tools objinfo
293
294 %install
295 rm -rf $RPM_BUILD_ROOT
296
297 %{__make} install \
298         BINDIR=$RPM_BUILD_ROOT%{_bindir} \
299         LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
300         MANDIR=$RPM_BUILD_ROOT%{_mandir}
301
302 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
303 %{_libdir}/%{name}/stublibs
304 %{_libdir}/%{name}
305 EOF
306
307 %if %{!?_without_emacs:1}%{?_without_emacs:0}
308 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
309         EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
310                 else echo xemacs; fi`" \
311         EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
312 %endif
313
314 # symlink .opt versions of compilers (if present)
315 # warning: don't do that with camlp4 (can't load extensions then)
316 for f in ocamlc ocamlopt ocamldoc ocamllex; do
317         if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
318                 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
319                         $RPM_BUILD_ROOT%{_bindir}/$f.byte
320                 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
321         fi
322 done
323
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
329
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
334 done
335
336 # this isn't installed by default, but is useful
337 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
338
339 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
340 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
341
342 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
343 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
344
345 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
346
347 # shutup checkfiles
348 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
349 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
350
351 %clean
352 rm -rf $RPM_BUILD_ROOT
353
354 %files runtime
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 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlllabltk.so}
362 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlltkanim.so}
363
364 %files
365 %defattr(644,root,root,755)
366 %doc LICENSE Changes README Upgrading
367 %doc docs/html/ocaml
368 %attr(755,root,root) %{_bindir}/ocaml*
369 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
370 %exclude %{_bindir}/ocamlrun
371 %attr(755,root,root) %{_bindir}/*labels
372 %{_includedir}/caml
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*
389
390 %files lib-source
391 %defattr(644,root,root,755)
392 %{_libdir}/%{name}/*.ml
393 %{_libdir}/%{name}/*.mli
394
395 %files examples
396 %defattr(644,root,root,755)
397 %{_examplesdir}/%{name}-%{version}
398
399 # they are poor, html is much better
400 #%files manpages
401 #%{_mandir}/man3/*
402
403 %files compiler-objects
404 %defattr(644,root,root,755)
405 %{_libdir}/%{name}/compiler
406
407 %files camlp4
408 %defattr(644,root,root,755)
409 %doc docs/html/camlp4*
410 %attr(755,root,root) %{_bindir}/*camlp4*
411 %attr(755,root,root) %{_bindir}/ocpp
412 # Not installed since 3.05, is is needed?
413 #%attr(755,root,root) %{_bindir}/odyl
414 %{_libdir}/%{name}/camlp4
415 %{_mandir}/man*/*camlp4*
416 %{_mandir}/man*/*ocpp*
417
418 %if %{!?_without_tk:1}%{?_without_tk:0}
419 %files labltk-devel
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_bindir}/labltk
422 %attr(755,root,root) %{_bindir}/ocamlbrowser
423 %dir %{_libdir}/%{name}/labltk
424 %{_libdir}/%{name}/labltk/*.cm*
425 %{_libdir}/%{name}/labltk/*.a
426 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
427 %{_examplesdir}/%{name}-labltk-%{version}
428
429 %files labltk
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
432 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
433 %endif
434
435 %if %{!?_without_x11:1}%{?_without_x11:0}
436 %files x11graphics-devel
437 %defattr(644,root,root,755)
438 %{_libdir}/%{name}/graphics*.cm*
439 %{_libdir}/%{name}/graphics.a
440 %{_libdir}/%{name}/libgraphics.a
441
442 %files x11graphics
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
445 %endif
446
447 %if %{!?_without_emacs:1}%{?_without_emacs:0}
448 %files emacs
449 %defattr(644,root,root,755)
450 %{_datadir}/emacs/site-lisp/*.el*
451 %endif
452
453 %files ocamldoc-devel
454 %defattr(644,root,root,755)
455 %{_libdir}/%{name}/ocamldoc/*.cm*
456 %{_libdir}/%{name}/ocamldoc/*.a
457
458 %files doc-ps
459 %defattr(644,root,root,755)
460 %doc docs/*.ps.gz
This page took 0.090635 seconds and 4 git commands to generate.