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