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