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