]>
Commit | Line | Data |
---|---|---|
3105856a JB |
1 | # |
2 | # Conditional build: | |
543c01fb JB |
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 | |
5d260c4d | 7 | %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 |
543c01fb | 8 | %undefine with_ocaml_opt |
dc9de8a5 | 9 | %endif |
4797676b | 10 | |
7ad45ad7 | 11 | %define sver 4.12 |
db184753 | 12 | |
65fbc6c7 | 13 | Summary: The Objective Caml compiler and programming environment |
6e95eae7 | 14 | Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne |
65fbc6c7 | 15 | Name: ocaml |
7ad45ad7 | 16 | Version: 4.12.0 |
cbbbaf27 | 17 | Release: 5 |
4694cc06 | 18 | Epoch: 1 |
e091ab7c | 19 | License: QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library) |
65fbc6c7 | 20 | Group: Development/Languages |
7ad45ad7 JR |
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 | |
e091ab7c JB |
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 | |
c9597d78 | 32 | Patch0: %{name}-10266.patch |
019c10ee | 33 | Patch1: %{name}-info.patch |
7ad45ad7 | 34 | URL: https://www.ocaml.org/ |
4e386054 | 35 | Requires: %{name}-runtime = %{epoch}:%{version}-%{release} |
c9701af2 | 36 | Provides: ocaml-bytes-devel |
5a1e52bf | 37 | Provides: ocaml-ocamldoc |
4d6fe9cb | 38 | Obsoletes: ocaml-bytes-devel < 1.4 |
cbbbaf27 JR |
39 | Obsoletes: ocaml-doc-ps < 1:4.12 |
40 | Obsoletes: ocaml-emacs < 1:4.12 | |
4d6fe9cb | 41 | Obsoletes: ocaml-ocamldoc <= pre4 |
cbbbaf27 JR |
42 | Obsoletes: ocaml-x11graphics < 1:4.12 |
43 | Obsoletes: ocaml-x11graphics-devel < 1:4.12 | |
151fbae6 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
65fbc6c7 | 45 | |
0053154a PS |
46 | %define specflags -fno-strict-aliasing |
47 | ||
619d6a22 JR |
48 | %if %{without ocaml_opt} |
49 | %define _noautoreq Backend_intf Inlining_decision_intf Simplify_boxed_integer_ops_intf | |
50 | %endif | |
51 | ||
65fbc6c7 AM |
52 | %description |
53 | Objective Caml is a high-level, strongly-typed, functional and | |
54 | object-oriented programming language from the ML family of languages. | |
55 | ||
56 | This package comprises two batch compilers (a fast bytecode compiler | |
5ca6b9fb MP |
57 | and an optimizing native-code compiler), an interactive toplevel |
58 | system, Lex&Yacc tools, a replay debugger, and a comprehensive | |
59 | library. | |
65fbc6c7 | 60 | |
3f556f71 | 61 | %description -l pl.UTF-8 |
e091ab7c JB |
62 | OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym |
63 | językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny | |
64 | języków ML. | |
65fbc6c7 | 65 | |
7ad45ad7 JR |
66 | Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu oraz |
67 | optymalizujący kompilator do kodu natywnego), interaktywne środowisko | |
68 | pracy, narzędzia do tworzenia analizatorów leksykalnych oraz | |
69 | składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i | |
e091ab7c | 70 | biblioteki. |
65fbc6c7 | 71 | |
79502218 JB |
72 | %package runtime |
73 | Summary: Runtime system for OCaml | |
6e95eae7 | 74 | Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla |
79502218 JB |
75 | Group: Libraries |
76 | ||
77 | %description runtime | |
78 | This package contains binaries needed to run bytecode OCaml programs: | |
79 | ocamlrun bytecode interpreter, and basic dynamic link libraries. | |
80 | ||
3f556f71 JR |
81 | %description runtime -l pl.UTF-8 |
82 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów w | |
e091ab7c JB |
83 | OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun) |
84 | oraz podstawowe biblioteki linkowane dynamicznie. | |
79502218 JB |
85 | |
86 | %package lib-source | |
87 | Summary: Sources of OCaml standard library | |
6e95eae7 | 88 | Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla |
79502218 JB |
89 | Group: Development/Languages |
90 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
91 | ||
92 | %description lib-source | |
e091ab7c JB |
93 | This sources come helpful during debugging of user programs with |
94 | ocamldebug. | |
79502218 | 95 | |
3f556f71 | 96 | %description lib-source -l pl.UTF-8 |
7ad45ad7 JR |
97 | Źródła te są przydatne przy odpluskwianiu programów użytkownika z |
98 | użyciem ocamldebug. | |
79502218 | 99 | |
69735a4b | 100 | %package doc-html |
101 | Summary: HTML documentation for OCaml | |
6e95eae7 | 102 | Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML |
69735a4b | 103 | Group: Development/Tools |
104 | ||
105 | %description doc-html | |
106 | HTML documentation for OCaml. | |
107 | ||
3f556f71 | 108 | %description doc-html -l pl.UTF-8 |
69735a4b | 109 | Dokumentacja dla OCamla w formacie HTML. |
110 | ||
69735a4b | 111 | %package doc-info |
112 | Summary: Info documentation for OCaml | |
6e95eae7 | 113 | Summary(pl.UTF-8): Dokumentacja info dla OCamla |
69735a4b | 114 | Group: Development/Tools |
115 | ||
116 | %description doc-info | |
117 | Info documentation for OCaml. | |
118 | ||
3f556f71 | 119 | %description doc-info -l pl.UTF-8 |
69735a4b | 120 | Dokumentacja info dla OCamla. |
4797676b | 121 | |
6dfc0e1a | 122 | %package compiler-objects |
981ff793 | 123 | Summary: Compiled parts of OCaml compiler |
6e95eae7 | 124 | Summary(pl.UTF-8): Skompilowane części kompilatora OCamla |
981ff793 | 125 | Group: Development/Languages |
4694cc06 | 126 | Requires: %{name} = %{epoch}:%{version}-%{release} |
6adc6dd7 | 127 | Provides: ocaml-devel |
4d6fe9cb | 128 | Obsoletes: ocaml-devel < 3.06-3 |
981ff793 | 129 | |
6dfc0e1a | 130 | %description compiler-objects |
981ff793 MM |
131 | This package contains *.cmi and *.cmo files being parts of OCaml |
132 | compiler. They are needed to compile some programs. | |
133 | ||
3f556f71 JR |
134 | %description compiler-objects -l pl.UTF-8 |
135 | Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora | |
136 | OCamla. Są one wymagane do kompilacji niektórych programów. | |
981ff793 | 137 | |
13b509d1 MM |
138 | %package ocamldoc-devel |
139 | Summary: Files needed to develop programs using ocamldoc | |
6e95eae7 | 140 | Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc |
13b509d1 | 141 | Group: Development/Languages |
4694cc06 | 142 | Requires: %{name} = %{epoch}:%{version}-%{release} |
13b509d1 MM |
143 | |
144 | %description ocamldoc-devel | |
145 | You need this package if you are going to write ocamldoc front end or | |
146 | something like that. | |
147 | ||
3f556f71 JR |
148 | %description ocamldoc-devel -l pl.UTF-8 |
149 | Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end | |
150 | dla ocamldoc lub coś podobnego. | |
13b509d1 | 151 | |
53fbd845 MM |
152 | # maybe we'll want to add some more stuff here? |
153 | %package examples | |
154 | Summary: Example source code for OCaml | |
6e95eae7 | 155 | Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu |
53fbd845 | 156 | Group: Development/Languages |
4694cc06 | 157 | Requires: %{name} = %{epoch}:%{version}-%{release} |
53fbd845 MM |
158 | |
159 | %description examples | |
63004413 | 160 | This packages contains sources for Okasaki's Purely Functional |
53fbd845 MM |
161 | Datastructures in OCaml, along with some contributions. |
162 | ||
3f556f71 | 163 | %description examples -l pl.UTF-8 |
7ad45ad7 JR |
164 | Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych autorstwa |
165 | Okasaki'ego, napisane w OCamlu, wraz z dodatkami. | |
53fbd845 | 166 | |
65fbc6c7 | 167 | %prep |
e091ab7c | 168 | %setup -q -a1 -a3 |
c9597d78 | 169 | %patch0 -p1 |
019c10ee JB |
170 | gunzip infoman/ocaml.info.gz |
171 | %patch1 -p1 | |
c9597d78 | 172 | |
19e77905 | 173 | mkdir examples |
e091ab7c JB |
174 | tar xzf %{SOURCE4} -C examples |
175 | tar xzf %{SOURCE5} -C examples | |
56260732 | 176 | # order mess with docs somewhat |
69735a4b | 177 | mkdir -p docs/html |
c9597d78 | 178 | %{__mv} htmlman docs/html/ocaml |
69735a4b | 179 | |
5d260c4d | 180 | %build |
7ad45ad7 JR |
181 | %configure \ |
182 | AS=%{__as} \ | |
183 | ASPP="%{__cc} -c" \ | |
71958823 JR |
184 | --libdir=%{_libdir}/ocaml \ |
185 | %{!?with_ocaml_opt:--disable-native-compiler} | |
7ad45ad7 | 186 | |
71958823 JR |
187 | %{__make} world |
188 | %{__make} bootstrap | |
189 | %if %{with ocaml_opt} | |
16483873 JR |
190 | %{__make} opt |
191 | %{__make} opt.opt | |
71958823 | 192 | %endif |
dc9de8a5 | 193 | |
65fbc6c7 | 194 | %install |
5ca6b9fb | 195 | rm -rf $RPM_BUILD_ROOT |
e091ab7c | 196 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}} |
e42e1457 | 197 | |
7ae05805 | 198 | %{__make} install \ |
7ad45ad7 | 199 | DESTDIR=$RPM_BUILD_ROOT |
13b509d1 MM |
200 | |
201 | cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF | |
202 | %{_libdir}/%{name}/stublibs | |
203 | %{_libdir}/%{name} | |
204 | EOF | |
4797676b | 205 | |
981ff793 | 206 | # move includes to the proper place |
7ad45ad7 | 207 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/caml $RPM_BUILD_ROOT%{_includedir}/caml |
981ff793 | 208 | # but leave compatibility symlink |
7ad45ad7 | 209 | ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/ocaml/caml |
981ff793 | 210 | |
360c386d | 211 | # compiled sources of compiler, needed by some programs |
71958823 | 212 | for f in %{?with_ocaml_opt:asmcomp} bytecomp parsing typing utils ; do |
360c386d | 213 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f |
dc9de8a5 | 214 | cp $f/*.{cmi,cmo} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f |
543c01fb | 215 | %{?with_ocaml_opt:cp $f/*.{cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f} |
360c386d | 216 | done |
981ff793 | 217 | |
53fbd845 | 218 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
56260732 MM |
219 | ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir} |
220 | ||
13b509d1 | 221 | # shutup checkfiles |
9de25172 | 222 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3 |
13b509d1 | 223 | |
69735a4b | 224 | # install info pages |
019c10ee JB |
225 | cp -p infoman/ocaml.info $RPM_BUILD_ROOT%{_infodir} |
226 | cp -p infoman/ocaml.info.body-*.gz $RPM_BUILD_ROOT%{_infodir} | |
69735a4b | 227 | |
65fbc6c7 AM |
228 | %clean |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
9de25172 | 231 | %post doc-info -p /sbin/postshell |
4a452533 | 232 | -/usr/sbin/fix-info-dir -c %{_infodir} |
69735a4b | 233 | |
9de25172 | 234 | %postun doc-info -p /sbin/postshell |
4a452533 | 235 | -/usr/sbin/fix-info-dir -c %{_infodir} |
69735a4b | 236 | |
65fbc6c7 AM |
237 | %files |
238 | %defattr(644,root,root,755) | |
fa136354 | 239 | %doc Changes LICENSE README.adoc |
9de25172 | 240 | %attr(755,root,root) %{_bindir}/addlabels |
e091ab7c | 241 | %attr(755,root,root) %{_bindir}/ocaml |
e091ab7c | 242 | %attr(755,root,root) %{_bindir}/ocamlc |
b359bfa3 JR |
243 | %attr(755,root,root) %{_bindir}/ocamlc.byte |
244 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.opt} | |
7ad45ad7 | 245 | %attr(755,root,root) %{_bindir}/ocamlcmt |
e091ab7c | 246 | %attr(755,root,root) %{_bindir}/ocamlcp |
b359bfa3 JR |
247 | %attr(755,root,root) %{_bindir}/ocamlcp.byte |
248 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlcp.opt} | |
e091ab7c | 249 | %attr(755,root,root) %{_bindir}/ocamldebug |
fa136354 | 250 | %attr(755,root,root) %{_bindir}/ocamldep |
b359bfa3 JR |
251 | %attr(755,root,root) %{_bindir}/ocamldep.byte |
252 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldep.opt} | |
fa136354 | 253 | %attr(755,root,root) %{_bindir}/ocamldoc |
b359bfa3 | 254 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.opt} |
fa136354 | 255 | %attr(755,root,root) %{_bindir}/ocamllex |
b359bfa3 JR |
256 | %attr(755,root,root) %{_bindir}/ocamllex.byte |
257 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamllex.opt} | |
e091ab7c | 258 | %attr(755,root,root) %{_bindir}/ocamlmklib |
b359bfa3 JR |
259 | %attr(755,root,root) %{_bindir}/ocamlmklib.byte |
260 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmklib.opt} | |
e091ab7c | 261 | %attr(755,root,root) %{_bindir}/ocamlmktop |
b359bfa3 JR |
262 | %attr(755,root,root) %{_bindir}/ocamlmktop.byte |
263 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmktop.opt} | |
e091ab7c | 264 | %attr(755,root,root) %{_bindir}/ocamlobjinfo |
b359bfa3 JR |
265 | %attr(755,root,root) %{_bindir}/ocamlobjinfo.byte |
266 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlobjinfo.opt} | |
543c01fb | 267 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt} |
b359bfa3 JR |
268 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.byte} |
269 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.opt} | |
e091ab7c | 270 | %attr(755,root,root) %{_bindir}/ocamloptp |
b359bfa3 JR |
271 | %attr(755,root,root) %{_bindir}/ocamloptp.byte |
272 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamloptp.opt} | |
e091ab7c | 273 | %attr(755,root,root) %{_bindir}/ocamlprof |
b359bfa3 JR |
274 | %attr(755,root,root) %{_bindir}/ocamlprof.byte |
275 | %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlprof.opt} | |
e091ab7c | 276 | %attr(755,root,root) %{_bindir}/ocamlyacc |
9de25172 | 277 | %attr(755,root,root) %{_bindir}/scrapelabels |
ba35c88b | 278 | %{_includedir}/caml |
530dec71 | 279 | %{_libdir}/%{name}/caml |
4d6fe9cb JB |
280 | %dir %{_libdir}/%{name}/compiler-libs |
281 | %{_libdir}/%{name}/compiler-libs/*.cm* | |
282 | %{_libdir}/%{name}/compiler-libs/ocaml*.a | |
283 | %{?with_ocaml_opt:%{_libdir}/%{name}/compiler-libs/*.o} | |
284 | %dir %{_libdir}/%{name}/ocamldoc | |
285 | %{_libdir}/%{name}/ocamldoc/*.hva | |
286 | %dir %{_libdir}/%{name}/threads | |
287 | %{_libdir}/%{name}/threads/*.cm* | |
288 | %{_libdir}/%{name}/threads/threads.a | |
13b509d1 | 289 | %{_libdir}/%{name}/*.a |
543c01fb | 290 | %{?with_ocaml_opt:%{_libdir}/%{name}/*.o} |
13b509d1 | 291 | %{_libdir}/%{name}/*.cm* |
dd90c8d9 | 292 | %{_libdir}/%{name}/Makefile.config |
4251bfb1 | 293 | %{_libdir}/%{name}/ld.conf |
56260732 | 294 | %{_libdir}/%{name}/camlheader |
7ad45ad7 JR |
295 | %{_libdir}/%{name}/camlheaderd |
296 | %{_libdir}/%{name}/camlheaderi | |
56260732 | 297 | %{_libdir}/%{name}/camlheader_ur |
13b509d1 MM |
298 | %attr(755,root,root) %{_libdir}/%{name}/expunge |
299 | %attr(755,root,root) %{_libdir}/%{name}/extract_crc | |
4d6fe9cb JB |
300 | %{_mandir}/man1/ocaml.1* |
301 | %{_mandir}/man1/ocamlc.1* | |
302 | %{?with_ocaml_opt:%{_mandir}/man1/ocamlc.opt.1*} | |
303 | %{_mandir}/man1/ocamlcp.1* | |
304 | %{_mandir}/man1/ocamldebug.1* | |
305 | %{_mandir}/man1/ocamldep.1* | |
306 | %{_mandir}/man1/ocamldoc.1* | |
307 | %{_mandir}/man1/ocamllex.1* | |
308 | %{_mandir}/man1/ocamlmktop.1* | |
309 | %{?with_ocaml_opt:%{_mandir}/man1/ocamlopt.1*} | |
310 | %{?with_ocaml_opt:%{_mandir}/man1/ocamlopt.opt.1*} | |
311 | %{_mandir}/man1/ocamloptp.1* | |
312 | %{_mandir}/man1/ocamlprof.1* | |
313 | %{_mandir}/man1/ocamlyacc.1* | |
13b509d1 | 314 | |
79502218 JB |
315 | %files runtime |
316 | %defattr(644,root,root,755) | |
317 | %attr(755,root,root) %{_bindir}/ocamlrun | |
7ad45ad7 JR |
318 | %attr(755,root,root) %{_bindir}/ocamlrund |
319 | %attr(755,root,root) %{_bindir}/ocamlruni | |
79502218 | 320 | %dir %{_libdir}/%{name} |
7ad45ad7 | 321 | %{_libdir}/%{name}/eventlog_metadata |
6cd4c8e4 | 322 | %{?with_ocaml_opt:%attr(755,root,root) %{_libdir}/%{name}/libasmrun_shared.so} |
4d6fe9cb JB |
323 | %dir %{_libdir}/%{name}/stublibs |
324 | %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllcamlstr.so | |
325 | %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllthreads.so | |
326 | %attr(755,root,root) %{_libdir}/%{name}/stublibs/dllunix.so | |
42946d4f | 327 | %attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so |
9de25172 | 328 | %{_mandir}/man1/ocamlrun.1* |
79502218 | 329 | |
13b509d1 MM |
330 | %files lib-source |
331 | %defattr(644,root,root,755) | |
332 | %{_libdir}/%{name}/*.ml | |
8151bf1e | 333 | %{_libdir}/%{name}/*.mli |
4d6fe9cb JB |
334 | %{_libdir}/%{name}/compiler-libs/*.mli |
335 | %{_libdir}/%{name}/ocamldoc/*.mli | |
336 | %{_libdir}/%{name}/threads/*.mli | |
13b509d1 | 337 | |
79502218 | 338 | %files doc-html |
763b9075 | 339 | %defattr(644,root,root,755) |
79502218 JB |
340 | %doc docs/html/ocaml/* |
341 | ||
79502218 JB |
342 | %files doc-info |
343 | %defattr(644,root,root,755) | |
344 | %{_infodir}/ocaml.info* | |
53fbd845 | 345 | |
79502218 | 346 | %files compiler-objects |
69735a4b | 347 | %defattr(644,root,root,755) |
79502218 | 348 | %{_libdir}/%{name}/compiler |
69735a4b | 349 | |
79502218 | 350 | %files ocamldoc-devel |
73a93122 | 351 | %defattr(644,root,root,755) |
79502218 | 352 | %{_libdir}/%{name}/ocamldoc/*.cm* |
543c01fb | 353 | %{?with_ocaml_opt:%{_libdir}/%{name}/ocamldoc/*.a} |
69735a4b | 354 | |
79502218 | 355 | %files examples |
69735a4b | 356 | %defattr(644,root,root,755) |
79502218 | 357 | %{_examplesdir}/%{name}-%{version} |