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