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