3 %bcond_without emacs # without emacs subpackage
4 %bcond_without x # without X11 support
5 %bcond_without opt # don't build native, optimized compiler
13 Summary: The Objective Caml compiler and programming environment
14 Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
19 License: QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library)
20 Group: Development/Languages
21 Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.xz
22 # Source0-md5: d74ac1b1179af362491e14349dd1958b
23 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman-html.tar.gz
24 # Source1-md5: 915a1949f7af7186e16354e9682dc1e5
25 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
26 # Source2-md5: e85016fa23b6525d1d10da06010fd90a
27 Source3: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
28 # Source3-md5: 265b7db123e925e8b7b70ca2266b4206
29 Source4: https://github.com/mmottl/pure-fun/archive/v1.0.13/pure-fun-1.0.13.tar.gz
30 # Source4-md5: 0a6ff033df78d0880fe4883ace025ebe
32 Source5: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
33 # Source5-md5: 77fa1da7375dea1393cc0b6cd802d7e1
34 Patch1: %{name}-CFLAGS.patch
35 Patch2: %{name}-as_needed.patch
37 URL: http://caml.inria.fr/
38 %{?with_x:BuildRequires: xorg-lib-libX11-devel}
40 BuildRequires: sed >= 4.0
42 BuildRequires: emacs-common
44 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
45 Provides: ocaml-bytes-devel
46 Provides: ocaml-ocamldoc
47 Obsoletes: ocaml-ocamldoc
48 Obsoletes: ocaml-bytes-devel
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 %define specflags -fno-strict-aliasing
54 Objective Caml is a high-level, strongly-typed, functional and
55 object-oriented programming language from the ML family of languages.
57 This package comprises two batch compilers (a fast bytecode compiler
58 and an optimizing native-code compiler), an interactive toplevel
59 system, Lex&Yacc tools, a replay debugger, and a comprehensive
62 %description -l pl.UTF-8
63 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym
64 językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny
67 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
68 oraz optymalizujący kompilator do kodu natywnego), interaktywne
69 środowisko pracy, narzędzia do tworzenia analizatorów leksykalnych
70 oraz składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
74 Summary: Runtime system for OCaml
75 Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
79 This package contains binaries needed to run bytecode OCaml programs:
80 ocamlrun bytecode interpreter, and basic dynamic link libraries.
82 %description runtime -l pl.UTF-8
83 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
84 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun)
85 oraz podstawowe biblioteki linkowane dynamicznie.
88 Summary: Sources of OCaml standard library
89 Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
90 Group: Development/Languages
91 Requires: %{name} = %{epoch}:%{version}-%{release}
93 %description lib-source
94 This sources come helpful during debugging of user programs with
97 %description lib-source -l pl.UTF-8
98 Źródła te są przydatne przy odpluskwianiu programów użytkownika
102 Summary: HTML documentation for OCaml
103 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
104 Group: Development/Tools
106 %description doc-html
107 HTML documentation for OCaml.
109 %description doc-html -l pl.UTF-8
110 Dokumentacja dla OCamla w formacie HTML.
113 Summary: PostScript documentation for OCaml
114 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie PostScript
115 Group: Development/Tools
118 PostScript documentation for OCaml.
120 %description doc-ps -l pl.UTF-8
121 Dokumentacja dla OCamla w formacie PostScript.
124 Summary: Info documentation for OCaml
125 Summary(pl.UTF-8): Dokumentacja info dla OCamla
126 Group: Development/Tools
128 %description doc-info
129 Info documentation for OCaml.
131 %description doc-info -l pl.UTF-8
132 Dokumentacja info dla OCamla.
135 Summary: Emacs mode for OCaml
136 Summary(pl.UTF-8): Tryb OCamla dla Emacsa
137 Group: Development/Tools
138 Requires: %{name} = %{epoch}:%{version}-%{release}
141 Emacs mode files for Objective Caml language.
143 %description emacs -l pl.UTF-8
144 Pliki trybu OCamla dla Emacsa.
147 Summary: X11 graphic output for OCaml
148 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
149 Group: Development/Libraries
150 Requires: %{name} = %{epoch}:%{version}-%{release}
152 %description x11graphics
153 x11graphics module gives OCaml program access to drawing in X11
154 windows. This package contains files needed to run bytecode OCaml
155 programs using x11graphics.
157 %description x11graphics -l pl.UTF-8
158 Moduł x11graphics daje programom napisanym w OCamlu możliwość
159 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
160 potrzebne do uruchamiania programów używających x11graphics.
162 %package x11graphics-devel
163 Summary: X11 graphic output for OCaml
164 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
165 Group: Development/Libraries
166 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
168 %description x11graphics-devel
169 x11graphics module gives OCaml program access to drawing in X11
170 windows. This package contains files needed to develop OCaml programs
173 %description x11graphics-devel -l pl.UTF-8
174 Moduł x11graphics daje programom napisanym w OCamlu możliwość
175 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
176 niezbędne do tworzenia programów używających x11graphics.
178 %package compiler-objects
179 Summary: Compiled parts of OCaml compiler
180 Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
181 Group: Development/Languages
182 Requires: %{name} = %{epoch}:%{version}-%{release}
183 Obsoletes: ocaml-devel
184 Provides: ocaml-devel
186 %description compiler-objects
187 This package contains *.cmi and *.cmo files being parts of OCaml
188 compiler. They are needed to compile some programs.
190 %description compiler-objects -l pl.UTF-8
191 Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
192 OCamla. Są one wymagane do kompilacji niektórych programów.
194 %package ocamldoc-devel
195 Summary: Files needed to develop programs using ocamldoc
196 Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
197 Group: Development/Languages
198 Requires: %{name} = %{epoch}:%{version}-%{release}
200 %description ocamldoc-devel
201 You need this package if you are going to write ocamldoc front end or
204 %description ocamldoc-devel -l pl.UTF-8
205 Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
206 dla ocamldoc lub coś podobnego.
208 # maybe we'll want to add some more stuff here?
210 Summary: Example source code for OCaml
211 Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
212 Group: Development/Languages
213 Requires: %{name} = %{epoch}:%{version}-%{release}
215 %description examples
216 This packages contains sources for Okasaki's Purely Functional
217 Datastructures in OCaml, along with some contributions.
219 %description examples -l pl.UTF-8
220 Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych
221 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
226 tar xzf %{SOURCE4} -C examples
227 tar xzf %{SOURCE5} -C examples
228 # order mess with docs somewhat
230 mv htmlman docs/html/ocaml
231 cp %{SOURCE2} docs/ocaml.ps.gz
237 cp -f /usr/share/automake/config.sub config/gnu
239 -host %{_target_platform} \
242 -libdir %{_libdir}/%{name} \
243 -mandir %{_mandir}/man1 \
247 %{__make} -j1 world bootstrap %{?with_opt:opt.opt} \
248 CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT"
250 %{__make} -C tools objinfo \
251 CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT" -j1
254 rm -rf $RPM_BUILD_ROOT
255 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
256 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
259 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
260 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
261 MANDIR=$RPM_BUILD_ROOT%{_mandir}
263 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
264 %{_libdir}/%{name}/stublibs
269 %{__make} -C emacs install \
270 DESTDIR=$RPM_BUILD_ROOT \
271 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp" \
275 # symlink .opt versions of compilers (if present)
276 for 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
284 # move includes to the proper place
285 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
286 # but leave compatibility symlink
287 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
289 # compiled sources of compiler, needed by some programs
290 for 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}
296 # this isn't installed by default, but is useful
297 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
298 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
299 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
302 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
305 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
308 rm -rf $RPM_BUILD_ROOT
310 %post doc-info -p /sbin/postshell
311 -/usr/sbin/fix-info-dir -c %{_infodir}
313 %postun doc-info -p /sbin/postshell
314 -/usr/sbin/fix-info-dir -c %{_infodir}
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
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*
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*
374 %defattr(644,root,root,755)
375 %{_libdir}/%{name}/*.ml
376 %{_libdir}/%{name}/*.mli
377 %{_libdir}/%{name}/*/*.mli
380 %defattr(644,root,root,755)
381 %doc docs/html/ocaml/*
384 %defattr(644,root,root,755)
388 %defattr(644,root,root,755)
389 %{_infodir}/ocaml.info*
391 # they are poor, html is much better
397 %defattr(644,root,root,755)
398 %{_datadir}/emacs/site-lisp/*.el*
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
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
413 %files compiler-objects
414 %defattr(644,root,root,755)
415 %{_libdir}/%{name}/compiler
417 %files ocamldoc-devel
418 %defattr(644,root,root,755)
419 %{_libdir}/%{name}/ocamldoc/*.cm*
420 %{?with_opt:%{_libdir}/%{name}/ocamldoc/*.a}
423 %defattr(644,root,root,755)
424 %{_examplesdir}/%{name}-%{version}