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