3 %bcond_without emacs # without emacs subpackage
4 %bcond_without x # without X11 support
8 Summary: The Objective Caml compiler and programming environment
9 Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
14 License: QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library)
15 Group: Development/Languages
16 Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.xz
17 # Source0-md5: d74ac1b1179af362491e14349dd1958b
18 Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman-html.tar.gz
19 # Source1-md5: 915a1949f7af7186e16354e9682dc1e5
20 Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
21 # Source2-md5: e85016fa23b6525d1d10da06010fd90a
22 Source3: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
23 # Source3-md5: 265b7db123e925e8b7b70ca2266b4206
24 Source4: https://github.com/mmottl/pure-fun/archive/v1.0.13/pure-fun-1.0.13.tar.gz
25 # Source4-md5: 0a6ff033df78d0880fe4883ace025ebe
27 Source5: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
28 # Source5-md5: 77fa1da7375dea1393cc0b6cd802d7e1
29 Patch1: %{name}-CFLAGS.patch
30 Patch2: %{name}-as_needed.patch
31 URL: http://caml.inria.fr/
32 %{?with_x:BuildRequires: xorg-lib-libX11-devel}
34 BuildRequires: sed >= 4.0
36 BuildRequires: emacs-common
38 Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
39 Provides: ocaml-ocamldoc
40 Obsoletes: ocaml-ocamldoc
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define specflags -fno-strict-aliasing
46 Objective Caml is a high-level, strongly-typed, functional and
47 object-oriented programming language from the ML family of languages.
49 This package comprises two batch compilers (a fast bytecode compiler
50 and an optimizing native-code compiler), an interactive toplevel
51 system, Lex&Yacc tools, a replay debugger, and a comprehensive
54 %description -l pl.UTF-8
55 OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym
56 językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny
59 Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
60 oraz optymalizujący kompilator do kodu natywnego), interaktywne
61 środowisko pracy, narzędzia do tworzenia analizatorów leksykalnych
62 oraz składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
66 Summary: Runtime system for OCaml
67 Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
71 This package contains binaries needed to run bytecode OCaml programs:
72 ocamlrun bytecode interpreter, and basic dynamic link libraries.
74 %description runtime -l pl.UTF-8
75 Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
76 OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun)
77 oraz podstawowe biblioteki linkowane dynamicznie.
80 Summary: Sources of OCaml standard library
81 Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
82 Group: Development/Languages
83 Requires: %{name} = %{epoch}:%{version}-%{release}
85 %description lib-source
86 This sources come helpful during debugging of user programs with
89 %description lib-source -l pl.UTF-8
90 Źródła te są przydatne przy odpluskwianiu programów użytkownika
94 Summary: HTML documentation for OCaml
95 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
96 Group: Development/Tools
99 HTML documentation for OCaml.
101 %description doc-html -l pl.UTF-8
102 Dokumentacja dla OCamla w formacie HTML.
105 Summary: PostScript documentation for OCaml
106 Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie PostScript
107 Group: Development/Tools
110 PostScript documentation for OCaml.
112 %description doc-ps -l pl.UTF-8
113 Dokumentacja dla OCamla w formacie PostScript.
116 Summary: Info documentation for OCaml
117 Summary(pl.UTF-8): Dokumentacja info dla OCamla
118 Group: Development/Tools
120 %description doc-info
121 Info documentation for OCaml.
123 %description doc-info -l pl.UTF-8
124 Dokumentacja info dla OCamla.
127 Summary: Emacs mode for OCaml
128 Summary(pl.UTF-8): Tryb OCamla dla Emacsa
129 Group: Development/Tools
130 Requires: %{name} = %{epoch}:%{version}-%{release}
133 Emacs mode files for Objective Caml language.
135 %description emacs -l pl.UTF-8
136 Pliki trybu OCamla dla Emacsa.
139 Summary: X11 graphic output for OCaml
140 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
141 Group: Development/Libraries
142 Requires: %{name} = %{epoch}:%{version}-%{release}
144 %description x11graphics
145 x11graphics module gives OCaml program access to drawing in X11
146 windows. This package contains files needed to run bytecode OCaml
147 programs using x11graphics.
149 %description x11graphics -l pl.UTF-8
150 Moduł x11graphics daje programom napisanym w OCamlu możliwość
151 korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
152 potrzebne do uruchamiania programów używających x11graphics.
154 %package x11graphics-devel
155 Summary: X11 graphic output for OCaml
156 Summary(pl.UTF-8): Dostęp do X11 dla OCamla
157 Group: Development/Libraries
158 Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
160 %description x11graphics-devel
161 x11graphics module gives OCaml program access to drawing in X11
162 windows. This package contains files needed to develop OCaml programs
165 %description x11graphics-devel -l pl.UTF-8
166 Moduł x11graphics daje programom napisanym w OCamlu możliwość
167 korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
168 niezbędne do tworzenia programów używających x11graphics.
170 %package compiler-objects
171 Summary: Compiled parts of OCaml compiler
172 Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
173 Group: Development/Languages
174 Requires: %{name} = %{epoch}:%{version}-%{release}
175 Obsoletes: ocaml-devel
176 Provides: ocaml-devel
178 %description compiler-objects
179 This package contains *.cmi and *.cmo files being parts of OCaml
180 compiler. They are needed to compile some programs.
182 %description compiler-objects -l pl.UTF-8
183 Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
184 OCamla. Są one wymagane do kompilacji niektórych programów.
186 %package ocamldoc-devel
187 Summary: Files needed to develop programs using ocamldoc
188 Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
189 Group: Development/Languages
190 Requires: %{name} = %{epoch}:%{version}-%{release}
192 %description ocamldoc-devel
193 You need this package if you are going to write ocamldoc front end or
196 %description ocamldoc-devel -l pl.UTF-8
197 Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
198 dla ocamldoc lub coś podobnego.
200 # maybe we'll want to add some more stuff here?
202 Summary: Example source code for OCaml
203 Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
204 Group: Development/Languages
205 Requires: %{name} = %{epoch}:%{version}-%{release}
207 %description examples
208 This packages contains sources for Okasaki's Purely Functional
209 Datastructures in OCaml, along with some contributions.
211 %description examples -l pl.UTF-8
212 Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych
213 autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
218 tar xzf %{SOURCE4} -C examples
219 tar xzf %{SOURCE5} -C examples
220 # order mess with docs somewhat
222 mv htmlman docs/html/ocaml
223 cp %{SOURCE2} docs/ocaml.ps.gz
228 cp -f /usr/share/automake/config.sub config/gnu
232 -libdir %{_libdir}/%{name} \
233 -mandir %{_mandir}/man1 \
238 %{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT"
239 %{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT" -j1
242 rm -rf $RPM_BUILD_ROOT
243 install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
244 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
247 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
248 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
249 MANDIR=$RPM_BUILD_ROOT%{_mandir}
251 cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
252 %{_libdir}/%{name}/stublibs
257 %{__make} -C emacs install \
258 DESTDIR=$RPM_BUILD_ROOT \
259 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp" \
263 # symlink .opt versions of compilers (if present)
264 for f in ocamlc ocamlopt ocamldoc ocamllex; do
265 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
266 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
267 $RPM_BUILD_ROOT%{_bindir}/$f.byte
268 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
272 # move includes to the proper place
273 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
274 # but leave compatibility symlink
275 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
277 # compiled sources of compiler, needed by some programs
278 for f in {asm,byte}comp parsing typing utils ; do
279 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
280 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
283 # this isn't installed by default, but is useful
284 install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
285 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
286 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
289 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
292 cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
295 rm -rf $RPM_BUILD_ROOT
297 %post doc-info -p /sbin/postshell
298 -/usr/sbin/fix-info-dir -c %{_infodir}
300 %postun doc-info -p /sbin/postshell
301 -/usr/sbin/fix-info-dir -c %{_infodir}
304 %defattr(644,root,root,755)
305 %doc Changes LICENSE README
306 %attr(755,root,root) %{_bindir}/addlabels
307 %attr(755,root,root) %{_bindir}/ocaml
308 %attr(755,root,root) %{_bindir}/ocamlbuild*
309 %attr(755,root,root) %{_bindir}/ocamlc
310 %attr(755,root,root) %{_bindir}/ocamlc.*
311 %attr(755,root,root) %{_bindir}/ocamlcp
312 %attr(755,root,root) %{_bindir}/ocamldebug
313 %attr(755,root,root) %{_bindir}/ocamldep*
314 %attr(755,root,root) %{_bindir}/ocamldoc*
315 %attr(755,root,root) %{_bindir}/ocamllex*
316 %attr(755,root,root) %{_bindir}/ocamlmklib
317 %attr(755,root,root) %{_bindir}/ocamlmktop
318 %attr(755,root,root) %{_bindir}/ocamlobjinfo
319 %attr(755,root,root) %{_bindir}/ocamlopt
320 %attr(755,root,root) %{_bindir}/ocamlopt.*
321 %attr(755,root,root) %{_bindir}/ocamloptp
322 %attr(755,root,root) %{_bindir}/ocamlprof
323 %attr(755,root,root) %{_bindir}/ocamlyacc
324 %attr(755,root,root) %{_bindir}/scrapelabels
326 %{_libdir}/%{name}/caml
327 %{_libdir}/%{name}/compiler-libs
328 %{_libdir}/%{name}/threads
329 %dir %{_libdir}/%{name}/vmthreads
330 %dir %{_libdir}/%{name}/vmthreads/*.cm*
331 %dir %{_libdir}/%{name}/vmthreads/*.a
332 %{_libdir}/%{name}/*.a
333 %{_libdir}/%{name}/*.o
334 %{_libdir}/%{name}/*.cm*
335 %exclude %{_libdir}/%{name}/*graphics*
336 %{_libdir}/%{name}/Makefile.config
337 %{_libdir}/%{name}/ld.conf
338 %{_libdir}/%{name}/camlheader
339 %{_libdir}/%{name}/camlheader_ur
340 %{_libdir}/%{name}/ocamlbuild
341 %dir %{_libdir}/%{name}/ocamldoc
342 %{_libdir}/%{name}/ocamldoc/*.hva
343 %attr(755,root,root) %{_libdir}/%{name}/expunge
344 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
345 %attr(755,root,root) %{_libdir}/%{name}/objinfo_helper
346 %{_mandir}/man1/ocaml*
347 %exclude %{_mandir}/man1/ocamlrun.1*
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_bindir}/ocamlrun
352 %dir %{_libdir}/%{name}
353 %dir %{_libdir}/%{name}/site-lib
354 %dir %{_libdir}/%{name}/stublibs
355 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
356 %exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
357 %attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
358 %{_mandir}/man1/ocamlrun.1*
361 %defattr(644,root,root,755)
362 %{_libdir}/%{name}/*.ml
363 %{_libdir}/%{name}/*.mli
364 %{_libdir}/%{name}/*/*.mli
367 %defattr(644,root,root,755)
368 %doc docs/html/ocaml/*
371 %defattr(644,root,root,755)
375 %defattr(644,root,root,755)
376 %{_infodir}/ocaml.info*
378 # they are poor, html is much better
384 %defattr(644,root,root,755)
385 %{_datadir}/emacs/site-lisp/*.el*
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
393 %files x11graphics-devel
394 %defattr(644,root,root,755)
395 %{_libdir}/%{name}/graphics*.cm*
396 %{_libdir}/%{name}/graphics.a
397 %{_libdir}/%{name}/libgraphics.a
400 %files compiler-objects
401 %defattr(644,root,root,755)
402 %{_libdir}/%{name}/compiler
404 %files ocamldoc-devel
405 %defattr(644,root,root,755)
406 %{_libdir}/%{name}/ocamldoc/*.cm*
407 %{_libdir}/%{name}/ocamldoc/*.a
410 %defattr(644,root,root,755)
411 %{_examplesdir}/%{name}-%{version}