]> 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 ocaml_opt # native, optimized compiler
4
5# ppc64, sparc64 and x32 variants not supported currently
6# alpha, hppa, ia64, mips removed since 4.00
7%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
8%undefine with_ocaml_opt
9%endif
10
11%define sver 4.12
12
13Summary: The Objective Caml compiler and programming environment
14Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
15Name: ocaml
16Version: 4.12.0
17Release: 2
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/ocaml-%{sver}/%{name}-%{version}.tar.xz
22# Source0-md5: 7343cd398d477001db2c3f2ac92e12ea
23Source1: http://caml.inria.fr/distrib/ocaml-%{sver}/%{name}-%{sver}-refman-html.tar.gz
24# Source1-md5: 1bda3d0a46328a985c817d551423e2c6
25Source3: http://caml.inria.fr/distrib/ocaml-%{sver}/%{name}-%{sver}-refman.info.tar.gz
26# Source3-md5: c808dbbe35a6cc5d14da6c3b2f175d2c
27Source4: https://github.com/mmottl/pure-fun/archive/v1.0.13/pure-fun-1.0.13.tar.gz
28# Source4-md5: 0a6ff033df78d0880fe4883ace025ebe
29# note: dead URL
30Source5: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
31# Source5-md5: 77fa1da7375dea1393cc0b6cd802d7e1
32URL: https://www.ocaml.org/
33Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
34Provides: ocaml-bytes-devel
35Provides: ocaml-ocamldoc
36Obsoletes: ocaml-bytes-devel
37Obsoletes: ocaml-doc-ps < 4.12
38Obsoletes: ocaml-emacs < 4.12
39Obsoletes: ocaml-ocamldoc
40Obsoletes: ocaml-x11graphics < 4.12
41Obsoletes: ocaml-x11graphics-devel < 4.12
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%define specflags -fno-strict-aliasing
45
46%description
47Objective Caml is a high-level, strongly-typed, functional and
48object-oriented programming language from the ML family of languages.
49
50This package comprises two batch compilers (a fast bytecode compiler
51and an optimizing native-code compiler), an interactive toplevel
52system, Lex&Yacc tools, a replay debugger, and a comprehensive
53library.
54
55%description -l pl.UTF-8
56OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym
57językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny
58języków ML.
59
60Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu oraz
61optymalizujący kompilator do kodu natywnego), interaktywne środowisko
62pracy, narzędzia do tworzenia analizatorów leksykalnych oraz
63składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
64biblioteki.
65
66%package runtime
67Summary: Runtime system for OCaml
68Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
69Group: Libraries
70
71%description runtime
72This package contains binaries needed to run bytecode OCaml programs:
73ocamlrun bytecode interpreter, and basic dynamic link libraries.
74
75%description runtime -l pl.UTF-8
76Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
77OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun)
78oraz podstawowe biblioteki linkowane dynamicznie.
79
80%package lib-source
81Summary: Sources of OCaml standard library
82Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
83Group: Development/Languages
84Requires: %{name} = %{epoch}:%{version}-%{release}
85
86%description lib-source
87This sources come helpful during debugging of user programs with
88ocamldebug.
89
90%description lib-source -l pl.UTF-8
91Źródła te są przydatne przy odpluskwianiu programów użytkownika z
92użyciem ocamldebug.
93
94%package doc-html
95Summary: HTML documentation for OCaml
96Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
97Group: Development/Tools
98
99%description doc-html
100HTML documentation for OCaml.
101
102%description doc-html -l pl.UTF-8
103Dokumentacja dla OCamla w formacie HTML.
104
105%package doc-info
106Summary: Info documentation for OCaml
107Summary(pl.UTF-8): Dokumentacja info dla OCamla
108Group: Development/Tools
109
110%description doc-info
111Info documentation for OCaml.
112
113%description doc-info -l pl.UTF-8
114Dokumentacja info dla OCamla.
115
116%package compiler-objects
117Summary: Compiled parts of OCaml compiler
118Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
119Group: Development/Languages
120Requires: %{name} = %{epoch}:%{version}-%{release}
121Provides: ocaml-devel
122Obsoletes: ocaml-devel
123
124%description compiler-objects
125This package contains *.cmi and *.cmo files being parts of OCaml
126compiler. They are needed to compile some programs.
127
128%description compiler-objects -l pl.UTF-8
129Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
130OCamla. Są one wymagane do kompilacji niektórych programów.
131
132%package ocamldoc-devel
133Summary: Files needed to develop programs using ocamldoc
134Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
135Group: Development/Languages
136Requires: %{name} = %{epoch}:%{version}-%{release}
137
138%description ocamldoc-devel
139You need this package if you are going to write ocamldoc front end or
140something like that.
141
142%description ocamldoc-devel -l pl.UTF-8
143Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
144dla ocamldoc lub coś podobnego.
145
146# maybe we'll want to add some more stuff here?
147%package examples
148Summary: Example source code for OCaml
149Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
150Group: Development/Languages
151Requires: %{name} = %{epoch}:%{version}-%{release}
152
153%description examples
154This packages contains sources for Okasaki's Purely Functional
155Datastructures in OCaml, along with some contributions.
156
157%description examples -l pl.UTF-8
158Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych autorstwa
159Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
160
161%prep
162%setup -q -a1 -a3
163mkdir examples
164tar xzf %{SOURCE4} -C examples
165tar xzf %{SOURCE5} -C examples
166# order mess with docs somewhat
167mkdir -p docs/html
168mv htmlman docs/html/ocaml
169
170%build
171%configure \
172 AS=%{__as} \
173 ASPP="%{__cc} -c" \
174 --libdir=%{_libdir}/ocaml \
175 %{!?with_ocaml_opt:--disable-native-compiler}
176
177%{__make} world
178%{__make} bootstrap
179%if %{with ocaml_opt}
180%{__make} opt
181%{__make} opt.opt
182%endif
183
184%install
185rm -rf $RPM_BUILD_ROOT
186install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
187install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
188
189%{__make} install \
190 DESTDIR=$RPM_BUILD_ROOT
191
192cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
193%{_libdir}/%{name}/stublibs
194%{_libdir}/%{name}
195EOF
196
197# move includes to the proper place
198%{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/caml $RPM_BUILD_ROOT%{_includedir}/caml
199# but leave compatibility symlink
200ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/ocaml/caml
201
202# compiled sources of compiler, needed by some programs
203for f in %{?with_ocaml_opt:asmcomp} bytecomp parsing typing utils ; do
204 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
205 cp $f/*.{cmi,cmo} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
206 %{?with_ocaml_opt:cp $f/*.{cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f}
207done
208
209cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
210ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
211
212# shutup checkfiles
213%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
214
215# install info pages
216cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
217
218%clean
219rm -rf $RPM_BUILD_ROOT
220
221%post doc-info -p /sbin/postshell
222-/usr/sbin/fix-info-dir -c %{_infodir}
223
224%postun doc-info -p /sbin/postshell
225-/usr/sbin/fix-info-dir -c %{_infodir}
226
227%files
228%defattr(644,root,root,755)
229%doc Changes LICENSE README.adoc
230%attr(755,root,root) %{_bindir}/addlabels
231%attr(755,root,root) %{_bindir}/ocaml
232%attr(755,root,root) %{_bindir}/ocamlc
233%attr(755,root,root) %{_bindir}/ocamlc.byte
234%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.opt}
235%attr(755,root,root) %{_bindir}/ocamlcmt
236%attr(755,root,root) %{_bindir}/ocamlcp
237%attr(755,root,root) %{_bindir}/ocamlcp.byte
238%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlcp.opt}
239%attr(755,root,root) %{_bindir}/ocamldebug
240%attr(755,root,root) %{_bindir}/ocamldep
241%attr(755,root,root) %{_bindir}/ocamldep.byte
242%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldep.opt}
243%attr(755,root,root) %{_bindir}/ocamldoc
244%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.opt}
245%attr(755,root,root) %{_bindir}/ocamllex
246%attr(755,root,root) %{_bindir}/ocamllex.byte
247%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamllex.opt}
248%attr(755,root,root) %{_bindir}/ocamlmklib
249%attr(755,root,root) %{_bindir}/ocamlmklib.byte
250%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmklib.opt}
251%attr(755,root,root) %{_bindir}/ocamlmktop
252%attr(755,root,root) %{_bindir}/ocamlmktop.byte
253%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmktop.opt}
254%attr(755,root,root) %{_bindir}/ocamlobjinfo
255%attr(755,root,root) %{_bindir}/ocamlobjinfo.byte
256%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlobjinfo.opt}
257%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt}
258%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.byte}
259%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.opt}
260%attr(755,root,root) %{_bindir}/ocamloptp
261%attr(755,root,root) %{_bindir}/ocamloptp.byte
262%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamloptp.opt}
263%attr(755,root,root) %{_bindir}/ocamlprof
264%attr(755,root,root) %{_bindir}/ocamlprof.byte
265%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlprof.opt}
266%attr(755,root,root) %{_bindir}/ocamlyacc
267%attr(755,root,root) %{_bindir}/scrapelabels
268%{_includedir}/caml
269%{_libdir}/%{name}/caml
270%{_libdir}/%{name}/compiler-libs
271%{_libdir}/%{name}/threads
272%{_libdir}/%{name}/*.a
273%{?with_ocaml_opt:%{_libdir}/%{name}/*.o}
274%{_libdir}/%{name}/*.cm*
275%{_libdir}/%{name}/Makefile.config
276%{_libdir}/%{name}/ld.conf
277%{_libdir}/%{name}/camlheader
278%{_libdir}/%{name}/camlheaderd
279%{_libdir}/%{name}/camlheaderi
280%{_libdir}/%{name}/camlheader_ur
281%dir %{_libdir}/%{name}/ocamldoc
282%{_libdir}/%{name}/ocamldoc/*.hva
283%attr(755,root,root) %{_libdir}/%{name}/expunge
284%attr(755,root,root) %{_libdir}/%{name}/extract_crc
285%{_mandir}/man1/ocaml*
286%exclude %{_mandir}/man1/ocamlrun.1*
287
288%files runtime
289%defattr(644,root,root,755)
290%attr(755,root,root) %{_bindir}/ocamlrun
291%attr(755,root,root) %{_bindir}/ocamlrund
292%attr(755,root,root) %{_bindir}/ocamlruni
293%dir %{_libdir}/%{name}
294%dir %{_libdir}/%{name}/site-lib
295%dir %{_libdir}/%{name}/stublibs
296%{_libdir}/%{name}/eventlog_metadata
297%attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
298%{?with_ocaml_opt:%attr(755,root,root) %{_libdir}/%{name}/libasmrun_shared.so}
299%attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
300%{_mandir}/man1/ocamlrun.1*
301
302%files lib-source
303%defattr(644,root,root,755)
304%{_libdir}/%{name}/*.ml
305%{_libdir}/%{name}/*.mli
306%{_libdir}/%{name}/*/*.mli
307
308%files doc-html
309%defattr(644,root,root,755)
310%doc docs/html/ocaml/*
311
312%files doc-info
313%defattr(644,root,root,755)
314%{_infodir}/ocaml.info*
315
316%files compiler-objects
317%defattr(644,root,root,755)
318%{_libdir}/%{name}/compiler
319
320%files ocamldoc-devel
321%defattr(644,root,root,755)
322%{_libdir}/%{name}/ocamldoc/*.cm*
323%{?with_ocaml_opt:%{_libdir}/%{name}/ocamldoc/*.a}
324
325%files examples
326%defattr(644,root,root,755)
327%{_examplesdir}/%{name}-%{version}
This page took 0.032594 seconds and 4 git commands to generate.