]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml.spec
- mass commit: cosmetics (removed trailing white spaces)
[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/INRIA/caml-light/%{name}-%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5:  51530ed183b511ce19fed325c8ab1b43
20 Source1:        ftp://ftp.inria.fr/INRIA/caml-light/%{name}-%{version}/%{name}-%{version}-refman.html.tar.gz
21 # Source1-md5:  2b555271d2630698fcd3a9b9acfd1440
22 Source2:        ftp://ftp.inria.fr/INRIA/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 Patch6:         %{name}-tk8.4.patch
43 URL:            http://caml.inria.fr/
44 Requires:       ocaml-runtime = %{version}-%{release}
45 Obsoletes:      ocaml-ocamldoc
46 Provides:       ocaml-ocamldoc
47 %{!?_without_x11:BuildRequires:         XFree86-devel}
48 %{?_with_db3:BuildRequires:     db3-devel}
49 %{!?_with_db3:BuildRequires:    db-devel >= 4.1}
50 %{!?_without_tk:BuildRequires:          tk-devel >= 8.4.3}
51 %{!?_without_emacs:BuildRequires:       xemacs}
52 %{!?_without_emacs:BuildRequires:       xemacs-common}
53 %{!?_without_emacs:BuildRequires:       xemacs-fsf-compat-pkg}
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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 -a1 -a3 -a5
270 mkdir examples
271 tar xjf %{SOURCE7} -C examples
272 tar xzf %{SOURCE8} -C examples
273 # order mess with docs somewhat
274 mkdir docs
275 mkdir docs/html
276 mv htmlman docs/html/ocaml
277 cp %{SOURCE2} docs/ocaml.ps.gz
278 mv camlp4-%{version}-manual.html docs/html/camlp4
279 cp %{SOURCE4} docs/camlp4.ps.gz
280 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
281 cp %{SOURCE6} docs/camlp4-tutorial.ps.gz
282 %patch0 -p1
283 %patch1 -p1
284 %patch2 -p1
285 %patch3 -p1
286 #%patch4 -p1
287 %patch5 -p1
288 %patch6 -p1
289
290 %build
291 ./configure \
292         -cc "%{__cc} %{rpmcflags}" \
293         -bindir %{_bindir} \
294         -libdir %{_libdir}/%{name} \
295         -mandir %{_mandir}/man1 \
296         -host %{_host} \
297         %{?_without_tk:-no-tk} \
298         -with-pthread
299
300 %{__make} world bootstrap opt.opt
301 %{__make} -C tools objinfo
302
303 %install
304 rm -rf $RPM_BUILD_ROOT
305
306 %{__make} install \
307         BINDIR=$RPM_BUILD_ROOT%{_bindir} \
308         LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
309         MANDIR=$RPM_BUILD_ROOT%{_mandir}
310
311 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
312 %{_libdir}/%{name}/stublibs
313 %{_libdir}/%{name}
314 EOF
315
316 %if %{!?_without_emacs:1}%{?_without_emacs:0}
317 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
318         EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
319                 else echo xemacs; fi`" \
320         EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp"
321 %endif
322
323 # symlink .opt versions of compilers (if present)
324 # warning: don't do that with camlp4 (can't load extensions then)
325 for f in ocamlc ocamlopt ocamldoc ocamllex; do
326         if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
327                 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
328                         $RPM_BUILD_ROOT%{_bindir}/$f.byte
329                 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
330         fi
331 done
332
333 # move includes to the proper place
334 install -d $RPM_BUILD_ROOT%{_includedir}
335 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
336 # but leave compatibility symlink
337 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
338
339 # compiled sources of compiler, needed by some programs
340 for f in {asm,byte}comp parsing typing utils ; do
341         install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
342         cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
343 done
344
345 # this isn't installed by default, but is useful
346 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
347
348 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
349 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
350
351 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
352 cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version}
353
354 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
355
356 # shutup checkfiles
357 rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
358 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
359
360 %clean
361 rm -rf $RPM_BUILD_ROOT
362
363 %files runtime
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_bindir}/ocamlrun
366 %dir %{_libdir}/%{name}
367 %dir %{_libdir}/%{name}/stublibs
368 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
369 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
370 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlllabltk.so}
371 %{!?_without_tk:%exclude %{_libdir}/%{name}/stublibs/dlltkanim.so}
372
373 %files
374 %defattr(644,root,root,755)
375 %doc LICENSE Changes README Upgrading
376 %doc docs/html/ocaml
377 %attr(755,root,root) %{_bindir}/ocaml*
378 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
379 %exclude %{_bindir}/ocamlrun
380 %attr(755,root,root) %{_bindir}/*labels
381 %{_includedir}/caml
382 %{_libdir}/%{name}/caml
383 %{_libdir}/%{name}/threads
384 %{_libdir}/%{name}/*.a
385 %{_libdir}/%{name}/*.o
386 %{_libdir}/%{name}/*.cm*
387 %exclude %{_libdir}/%{name}/*graphics*
388 %{_libdir}/%{name}/ld.conf
389 %{_libdir}/%{name}/camlheader
390 %{_libdir}/%{name}/camlheader_ur
391 %dir %{_libdir}/%{name}/ocamldoc
392 %{_libdir}/%{name}/ocamldoc/*.sty
393 %{_libdir}/%{name}/ocamldoc/*.hva
394 %attr(755,root,root) %{_libdir}/%{name}/expunge
395 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
396 %attr(755,root,root) %{_libdir}/%{name}/*labels
397 %{_mandir}/man1/*ocaml*
398
399 %files lib-source
400 %defattr(644,root,root,755)
401 %{_libdir}/%{name}/*.ml
402 %{_libdir}/%{name}/*.mli
403
404 %files examples
405 %defattr(644,root,root,755)
406 %{_examplesdir}/%{name}-%{version}
407
408 # they are poor, html is much better
409 #%files manpages
410 #%%{_mandir}/man3/*
411
412 %files compiler-objects
413 %defattr(644,root,root,755)
414 %{_libdir}/%{name}/compiler
415
416 %files camlp4
417 %defattr(644,root,root,755)
418 %doc docs/html/camlp4*
419 %attr(755,root,root) %{_bindir}/*camlp4*
420 %attr(755,root,root) %{_bindir}/ocpp
421 # Not installed since 3.05, is is needed?
422 #%attr(755,root,root) %{_bindir}/odyl
423 %{_libdir}/%{name}/camlp4
424 %{_mandir}/man*/*camlp4*
425 %{_mandir}/man*/*ocpp*
426
427 %if %{!?_without_tk:1}%{?_without_tk:0}
428 %files labltk-devel
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_bindir}/labltk
431 %attr(755,root,root) %{_bindir}/ocamlbrowser
432 %dir %{_libdir}/%{name}/labltk
433 %{_libdir}/%{name}/labltk/*.cm*
434 %{_libdir}/%{name}/labltk/*.a
435 %attr(755,root,root) %{_libdir}/%{name}/labltk/tkcompiler
436 %{_examplesdir}/%{name}-labltk-%{version}
437
438 %files labltk
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlllabltk.so
441 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dlltkanim.so
442 %endif
443
444 %if %{!?_without_x11:1}%{?_without_x11:0}
445 %files x11graphics-devel
446 %defattr(644,root,root,755)
447 %{_libdir}/%{name}/graphics*.cm*
448 %{_libdir}/%{name}/graphics.a
449 %{_libdir}/%{name}/libgraphics.a
450
451 %files x11graphics
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
454 %endif
455
456 %if %{!?_without_emacs:1}%{?_without_emacs:0}
457 %files emacs
458 %defattr(644,root,root,755)
459 %{_datadir}/emacs/site-lisp/*.el*
460 %endif
461
462 %files ocamldoc-devel
463 %defattr(644,root,root,755)
464 %{_libdir}/%{name}/ocamldoc/*.cm*
465 %{_libdir}/%{name}/ocamldoc/*.a
466
467 %files doc-ps
468 %defattr(644,root,root,755)
469 %doc docs/*.ps.gz
This page took 0.074332 seconds and 4 git commands to generate.