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