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