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