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