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