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