]> git.pld-linux.org Git - packages/ocaml.git/blame_incremental - ocaml.spec
- release 2 (by relup.sh)
[packages/ocaml.git] / ocaml.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without emacs # emacs subpackage
4%bcond_without x # X11 support
5%bcond_without ocaml_opt # native, optimized compiler
6
7# ppc64, sparc64 and x32 variants not supported currently
8# alpha, hppa, ia64, mips removed since 4.00
9%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
10%undefine with_ocaml_opt
11%endif
12
13%define sver 4.02
14
15Summary: The Objective Caml compiler and programming environment
16Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
17Name: ocaml
18Version: 4.02.3
19Release: 2
20Epoch: 1
21License: QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library)
22Group: Development/Languages
23Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.xz
24# Source0-md5: 9115706e30dad644f8dec9dfb459a9ab
25Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman-html.tar.gz
26# Source1-md5: 915a1949f7af7186e16354e9682dc1e5
27Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
28# Source2-md5: e85016fa23b6525d1d10da06010fd90a
29Source3: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
30# Source3-md5: 265b7db123e925e8b7b70ca2266b4206
31Source4: https://github.com/mmottl/pure-fun/archive/v1.0.13/pure-fun-1.0.13.tar.gz
32# Source4-md5: 0a6ff033df78d0880fe4883ace025ebe
33# note: dead URL
34Source5: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
35# Source5-md5: 77fa1da7375dea1393cc0b6cd802d7e1
36Patch1: %{name}-CFLAGS.patch
37Patch2: %{name}-as_needed.patch
38Patch3: x32.patch
39URL: http://caml.inria.fr/
40%{?with_x:BuildRequires: xorg-lib-libX11-devel}
41%if %{with emacs}
42BuildRequires: sed >= 4.0
43BuildRequires: emacs
44BuildRequires: emacs-common
45%endif
46Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
47Provides: ocaml-bytes-devel
48Provides: ocaml-ocamldoc
49Obsoletes: ocaml-ocamldoc
50Obsoletes: ocaml-bytes-devel
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53%define specflags -fno-strict-aliasing
54
55%description
56Objective Caml is a high-level, strongly-typed, functional and
57object-oriented programming language from the ML family of languages.
58
59This package comprises two batch compilers (a fast bytecode compiler
60and an optimizing native-code compiler), an interactive toplevel
61system, Lex&Yacc tools, a replay debugger, and a comprehensive
62library.
63
64%description -l pl.UTF-8
65OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym
66językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny
67języków ML.
68
69Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
70oraz optymalizujący kompilator do kodu natywnego), interaktywne
71środowisko pracy, narzędzia do tworzenia analizatorów leksykalnych
72oraz składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
73biblioteki.
74
75%package runtime
76Summary: Runtime system for OCaml
77Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
78Group: Libraries
79
80%description runtime
81This package contains binaries needed to run bytecode OCaml programs:
82ocamlrun bytecode interpreter, and basic dynamic link libraries.
83
84%description runtime -l pl.UTF-8
85Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
86OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun)
87oraz podstawowe biblioteki linkowane dynamicznie.
88
89%package lib-source
90Summary: Sources of OCaml standard library
91Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
92Group: Development/Languages
93Requires: %{name} = %{epoch}:%{version}-%{release}
94
95%description lib-source
96This sources come helpful during debugging of user programs with
97ocamldebug.
98
99%description lib-source -l pl.UTF-8
100Źródła te są przydatne przy odpluskwianiu programów użytkownika
101z użyciem ocamldebug.
102
103%package doc-html
104Summary: HTML documentation for OCaml
105Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
106Group: Development/Tools
107
108%description doc-html
109HTML documentation for OCaml.
110
111%description doc-html -l pl.UTF-8
112Dokumentacja dla OCamla w formacie HTML.
113
114%package doc-ps
115Summary: PostScript documentation for OCaml
116Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie PostScript
117Group: Development/Tools
118
119%description doc-ps
120PostScript documentation for OCaml.
121
122%description doc-ps -l pl.UTF-8
123Dokumentacja dla OCamla w formacie PostScript.
124
125%package doc-info
126Summary: Info documentation for OCaml
127Summary(pl.UTF-8): Dokumentacja info dla OCamla
128Group: Development/Tools
129
130%description doc-info
131Info documentation for OCaml.
132
133%description doc-info -l pl.UTF-8
134Dokumentacja info dla OCamla.
135
136%package emacs
137Summary: Emacs mode for OCaml
138Summary(pl.UTF-8): Tryb OCamla dla Emacsa
139Group: Development/Tools
140Requires: %{name} = %{epoch}:%{version}-%{release}
141
142%description emacs
143Emacs mode files for Objective Caml language.
144
145%description emacs -l pl.UTF-8
146Pliki trybu OCamla dla Emacsa.
147
148%package x11graphics
149Summary: X11 graphic output for OCaml
150Summary(pl.UTF-8): Dostęp do X11 dla OCamla
151Group: Development/Libraries
152Requires: %{name} = %{epoch}:%{version}-%{release}
153
154%description x11graphics
155x11graphics module gives OCaml program access to drawing in X11
156windows. This package contains files needed to run bytecode OCaml
157programs using x11graphics.
158
159%description x11graphics -l pl.UTF-8
160Moduł x11graphics daje programom napisanym w OCamlu możliwość
161korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
162potrzebne do uruchamiania programów używających x11graphics.
163
164%package x11graphics-devel
165Summary: X11 graphic output for OCaml
166Summary(pl.UTF-8): Dostęp do X11 dla OCamla
167Group: Development/Libraries
168Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
169
170%description x11graphics-devel
171x11graphics module gives OCaml program access to drawing in X11
172windows. This package contains files needed to develop OCaml programs
173using x11graphics.
174
175%description x11graphics-devel -l pl.UTF-8
176Moduł x11graphics daje programom napisanym w OCamlu możliwość
177korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
178niezbędne do tworzenia programów używających x11graphics.
179
180%package compiler-objects
181Summary: Compiled parts of OCaml compiler
182Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
183Group: Development/Languages
184Requires: %{name} = %{epoch}:%{version}-%{release}
185Provides: ocaml-devel
186Obsoletes: ocaml-devel
187
188%description compiler-objects
189This package contains *.cmi and *.cmo files being parts of OCaml
190compiler. They are needed to compile some programs.
191
192%description compiler-objects -l pl.UTF-8
193Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
194OCamla. Są one wymagane do kompilacji niektórych programów.
195
196%package ocamldoc-devel
197Summary: Files needed to develop programs using ocamldoc
198Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
199Group: Development/Languages
200Requires: %{name} = %{epoch}:%{version}-%{release}
201
202%description ocamldoc-devel
203You need this package if you are going to write ocamldoc front end or
204something like that.
205
206%description ocamldoc-devel -l pl.UTF-8
207Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
208dla ocamldoc lub coś podobnego.
209
210# maybe we'll want to add some more stuff here?
211%package examples
212Summary: Example source code for OCaml
213Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
214Group: Development/Languages
215Requires: %{name} = %{epoch}:%{version}-%{release}
216
217%description examples
218This packages contains sources for Okasaki's Purely Functional
219Datastructures in OCaml, along with some contributions.
220
221%description examples -l pl.UTF-8
222Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych
223autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
224
225%prep
226%setup -q -a1 -a3
227mkdir examples
228tar xzf %{SOURCE4} -C examples
229tar xzf %{SOURCE5} -C examples
230# order mess with docs somewhat
231mkdir -p docs/html
232mv htmlman docs/html/ocaml
233cp %{SOURCE2} docs/ocaml.ps.gz
234%patch1 -p1
235%patch2 -p1
236%patch3 -p1
237
238%build
239cp -f /usr/share/automake/config.sub config/gnu
240./configure \
241 -host %{_target_platform} \
242 -cc "%{__cc}" \
243 -bindir %{_bindir} \
244 -libdir %{_libdir}/%{name} \
245 -mandir %{_mandir}/man1 \
246 -with-pthread \
247 -x11lib %{_libdir}
248
249%{__make} -j1 world bootstrap %{?with_ocaml_opt:opt.opt} \
250 CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT"
251
252%{__make} -C tools objinfo \
253 CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT" -j1
254
255%install
256rm -rf $RPM_BUILD_ROOT
257install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
258install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
259
260%{__make} install \
261 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
262 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
263 MANDIR=$RPM_BUILD_ROOT%{_mandir}
264
265cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
266%{_libdir}/%{name}/stublibs
267%{_libdir}/%{name}
268EOF
269
270%if %{with emacs}
271%{__make} -C emacs install \
272 DESTDIR=$RPM_BUILD_ROOT \
273 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp" \
274 EMACS="emacs"
275%endif
276
277# symlink .opt versions of compilers (if present)
278for f in ocamlc ocamlopt ocamldoc ocamllex; do
279 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
280 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
281 $RPM_BUILD_ROOT%{_bindir}/$f.byte
282 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
283 fi
284done
285
286# move includes to the proper place
287mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
288# but leave compatibility symlink
289ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
290
291# compiled sources of compiler, needed by some programs
292for f in {asm,byte}comp parsing typing utils ; do
293 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
294 cp $f/*.{cmi,cmo} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
295 %{?with_ocaml_opt:cp $f/*.{cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f}
296done
297
298# this isn't installed by default, but is useful
299install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
300cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
301ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
302
303# shutup checkfiles
304%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
305
306# install info pages
307cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
308
309%clean
310rm -rf $RPM_BUILD_ROOT
311
312%post doc-info -p /sbin/postshell
313-/usr/sbin/fix-info-dir -c %{_infodir}
314
315%postun doc-info -p /sbin/postshell
316-/usr/sbin/fix-info-dir -c %{_infodir}
317
318%files
319%defattr(644,root,root,755)
320%doc Changes LICENSE README
321%attr(755,root,root) %{_bindir}/addlabels
322%attr(755,root,root) %{_bindir}/ocaml
323%attr(755,root,root) %{_bindir}/ocamlbuild*
324%attr(755,root,root) %{_bindir}/ocamlc
325%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.*}
326%attr(755,root,root) %{_bindir}/ocamlcp
327%attr(755,root,root) %{_bindir}/ocamldebug
328%attr(755,root,root) %{_bindir}/ocamldep*
329%attr(755,root,root) %{_bindir}/ocamldoc*
330%attr(755,root,root) %{_bindir}/ocamllex*
331%attr(755,root,root) %{_bindir}/ocamlmklib
332%attr(755,root,root) %{_bindir}/ocamlmktop
333%attr(755,root,root) %{_bindir}/ocamlobjinfo
334%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt}
335%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.*}
336%attr(755,root,root) %{_bindir}/ocamloptp
337%attr(755,root,root) %{_bindir}/ocamlprof
338%attr(755,root,root) %{_bindir}/ocamlyacc
339%attr(755,root,root) %{_bindir}/scrapelabels
340%{_includedir}/caml
341%{_libdir}/%{name}/caml
342%{_libdir}/%{name}/compiler-libs
343%{_libdir}/%{name}/threads
344%dir %{_libdir}/%{name}/vmthreads
345%dir %{_libdir}/%{name}/vmthreads/*.cm*
346%dir %{_libdir}/%{name}/vmthreads/*.a
347%{_libdir}/%{name}/*.a
348%{?with_ocaml_opt:%{_libdir}/%{name}/*.o}
349%{_libdir}/%{name}/*.cm*
350%exclude %{_libdir}/%{name}/*graphics*
351%{_libdir}/%{name}/Makefile.config
352%{_libdir}/%{name}/ld.conf
353%{_libdir}/%{name}/camlheader
354%{_libdir}/%{name}/camlheader_ur
355%{_libdir}/%{name}/ocamlbuild
356%dir %{_libdir}/%{name}/ocamldoc
357%{_libdir}/%{name}/ocamldoc/*.hva
358%attr(755,root,root) %{_libdir}/%{name}/expunge
359%attr(755,root,root) %{_libdir}/%{name}/extract_crc
360%attr(755,root,root) %{_libdir}/%{name}/objinfo_helper
361%{_mandir}/man1/ocaml*
362%exclude %{_mandir}/man1/ocamlrun.1*
363
364%files runtime
365%defattr(644,root,root,755)
366%attr(755,root,root) %{_bindir}/ocamlrun
367%dir %{_libdir}/%{name}
368%{_libdir}/%{name}/VERSION
369%dir %{_libdir}/%{name}/site-lib
370%dir %{_libdir}/%{name}/stublibs
371%attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
372%exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
373%{?with_ocaml_opt:%attr(755,root,root) %{_libdir}/%{name}/libasmrun_shared.so}
374%attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
375%{_mandir}/man1/ocamlrun.1*
376
377%files lib-source
378%defattr(644,root,root,755)
379%{_libdir}/%{name}/*.ml
380%{_libdir}/%{name}/*.mli
381%{_libdir}/%{name}/*/*.mli
382
383%files doc-html
384%defattr(644,root,root,755)
385%doc docs/html/ocaml/*
386
387%files doc-ps
388%defattr(644,root,root,755)
389%doc docs/*.ps.gz
390
391%files doc-info
392%defattr(644,root,root,755)
393%{_infodir}/ocaml.info*
394
395# they are poor, html is much better
396#%files manpages
397#%%{_mandir}/man3/*
398
399%if %{with emacs}
400%files emacs
401%defattr(644,root,root,755)
402%{_datadir}/emacs/site-lisp/*.el*
403%endif
404
405%if %{with x}
406%files x11graphics
407%defattr(644,root,root,755)
408%attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
409
410%files x11graphics-devel
411%defattr(644,root,root,755)
412%{_libdir}/%{name}/graphics*.cm*
413%{?with_ocaml_opt:%{_libdir}/%{name}/graphics.a}
414%{_libdir}/%{name}/libgraphics.a
415%endif
416
417%files compiler-objects
418%defattr(644,root,root,755)
419%{_libdir}/%{name}/compiler
420
421%files ocamldoc-devel
422%defattr(644,root,root,755)
423%{_libdir}/%{name}/ocamldoc/*.cm*
424%{?with_ocaml_opt:%{_libdir}/%{name}/ocamldoc/*.a}
425
426%files examples
427%defattr(644,root,root,755)
428%{_examplesdir}/%{name}-%{version}
This page took 0.029242 seconds and 4 git commands to generate.