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