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