]> git.pld-linux.org Git - packages/ocaml.git/blame - ocaml.spec
- P+O: ocaml-bytes-devel
[packages/ocaml.git] / ocaml.spec
CommitLineData
3105856a
JB
1#
2# Conditional build:
b552f088
JB
3%bcond_without emacs # without emacs subpackage
4%bcond_without x # without X11 support
4797676b 5
e091ab7c 6%define sver 4.02
db184753 7
65fbc6c7 8Summary: The Objective Caml compiler and programming environment
6e95eae7 9Summary(pl.UTF-8): Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
65fbc6c7 10Name: ocaml
e091ab7c
JB
11Version: 4.02.1
12Release: 1
4694cc06 13Epoch: 1
e091ab7c 14License: QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library)
65fbc6c7 15Group: Development/Languages
e091ab7c
JB
16Source0: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{version}.tar.xz
17# Source0-md5: d74ac1b1179af362491e14349dd1958b
18Source1: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman-html.tar.gz
19# Source1-md5: 915a1949f7af7186e16354e9682dc1e5
307e1de8 20Source2: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.ps.gz
e091ab7c 21# Source2-md5: e85016fa23b6525d1d10da06010fd90a
9de25172 22Source3: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
e091ab7c
JB
23# Source3-md5: 265b7db123e925e8b7b70ca2266b4206
24Source4: https://github.com/mmottl/pure-fun/archive/v1.0.13/pure-fun-1.0.13.tar.gz
25# Source4-md5: 0a6ff033df78d0880fe4883ace025ebe
26# note: dead URL
27Source5: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
28# Source5-md5: 77fa1da7375dea1393cc0b6cd802d7e1
9de25172
JB
29Patch1: %{name}-CFLAGS.patch
30Patch2: %{name}-as_needed.patch
8b0de54e 31URL: http://caml.inria.fr/
3232e3f5 32%{?with_x:BuildRequires: xorg-lib-libX11-devel}
f4710e3c 33%if %{with emacs}
69735a4b 34BuildRequires: sed >= 4.0
3889f6d2
JR
35BuildRequires: emacs
36BuildRequires: emacs-common
f4710e3c 37%endif
4e386054 38Requires: %{name}-runtime = %{epoch}:%{version}-%{release}
c9701af2 39Provides: ocaml-bytes-devel
5a1e52bf
PG
40Provides: ocaml-ocamldoc
41Obsoletes: ocaml-ocamldoc
c9701af2 42Obsoletes: ocaml-bytes-devel
151fbae6 43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65fbc6c7 44
0053154a
PS
45%define specflags -fno-strict-aliasing
46
65fbc6c7
AM
47%description
48Objective Caml is a high-level, strongly-typed, functional and
49object-oriented programming language from the ML family of languages.
50
51This package comprises two batch compilers (a fast bytecode compiler
5ca6b9fb
MP
52and an optimizing native-code compiler), an interactive toplevel
53system, Lex&Yacc tools, a replay debugger, and a comprehensive
54library.
65fbc6c7 55
3f556f71 56%description -l pl.UTF-8
e091ab7c
JB
57OCaml (Objective Caml) jest funkcyjnym, obiektowo zorientowanym
58językiem wysokiego poziomu z silnym typowaniem. Należy do rodziny
59języków ML.
65fbc6c7 60
8151bf1e 61Ten pakiet zawiera dwa kompilatory (szybki kompilator do bajtkodu
e091ab7c
JB
62oraz optymalizujący kompilator do kodu natywnego), interaktywne
63środowisko pracy, narzędzia do tworzenia analizatorów leksykalnych
64oraz składniowych (ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i
65biblioteki.
65fbc6c7 66
79502218
JB
67%package runtime
68Summary: Runtime system for OCaml
6e95eae7 69Summary(pl.UTF-8): Środowisko uruchomieniowe dla OCamla
79502218
JB
70Group: Libraries
71
72%description runtime
73This package contains binaries needed to run bytecode OCaml programs:
74ocamlrun bytecode interpreter, and basic dynamic link libraries.
75
3f556f71
JR
76%description runtime -l pl.UTF-8
77Pakiet ten zawiera binaria potrzebne do uruchamiania programów w
e091ab7c
JB
78OCamlu skompilowanych do bajtkodu: interpreter bajtkodu (ocamlrun)
79oraz podstawowe biblioteki linkowane dynamicznie.
79502218
JB
80
81%package lib-source
82Summary: Sources of OCaml standard library
6e95eae7 83Summary(pl.UTF-8): Źródła biblioteki standardowej OCamla
79502218
JB
84Group: Development/Languages
85Requires: %{name} = %{epoch}:%{version}-%{release}
86
87%description lib-source
e091ab7c
JB
88This sources come helpful during debugging of user programs with
89ocamldebug.
79502218 90
3f556f71
JR
91%description lib-source -l pl.UTF-8
92Źródła te są przydatne przy odpluskwianiu programów użytkownika
93z użyciem ocamldebug.
79502218 94
69735a4b 95%package doc-html
96Summary: HTML documentation for OCaml
6e95eae7 97Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie HTML
69735a4b 98Group: Development/Tools
99
100%description doc-html
101HTML documentation for OCaml.
102
3f556f71 103%description doc-html -l pl.UTF-8
69735a4b 104Dokumentacja dla OCamla w formacie HTML.
105
13b509d1 106%package doc-ps
4797676b 107Summary: PostScript documentation for OCaml
6e95eae7 108Summary(pl.UTF-8): Dokumentacja dla OCamla w formacie PostScript
4797676b 109Group: Development/Tools
4797676b 110
13b509d1 111%description doc-ps
69735a4b 112PostScript documentation for OCaml.
4797676b 113
3f556f71 114%description doc-ps -l pl.UTF-8
69735a4b 115Dokumentacja dla OCamla w formacie PostScript.
116
117%package doc-info
118Summary: Info documentation for OCaml
6e95eae7 119Summary(pl.UTF-8): Dokumentacja info dla OCamla
69735a4b 120Group: Development/Tools
121
122%description doc-info
123Info documentation for OCaml.
124
3f556f71 125%description doc-info -l pl.UTF-8
69735a4b 126Dokumentacja info dla OCamla.
4797676b 127
65fbc6c7 128%package emacs
c4a5fbda 129Summary: Emacs mode for OCaml
6e95eae7 130Summary(pl.UTF-8): Tryb OCamla dla Emacsa
65fbc6c7 131Group: Development/Tools
4694cc06 132Requires: %{name} = %{epoch}:%{version}-%{release}
65fbc6c7
AM
133
134%description emacs
981ff793 135Emacs mode files for Objective Caml language.
65fbc6c7 136
3f556f71 137%description emacs -l pl.UTF-8
8151bf1e 138Pliki trybu OCamla dla Emacsa.
56260732 139
79502218
JB
140%package x11graphics
141Summary: X11 graphic output for OCaml
6e95eae7 142Summary(pl.UTF-8): Dostęp do X11 dla OCamla
79502218 143Group: Development/Libraries
4694cc06 144Requires: %{name} = %{epoch}:%{version}-%{release}
56260732 145
79502218
JB
146%description x11graphics
147x11graphics module gives OCaml program access to drawing in X11
148windows. This package contains files needed to run bytecode OCaml
149programs using x11graphics.
56260732 150
3f556f71
JR
151%description x11graphics -l pl.UTF-8
152Moduł x11graphics daje programom napisanym w OCamlu możliwość
79502218 153korzystania z interfejsu graficznego X11. Pakiet ten zawiera binaria
3f556f71 154potrzebne do uruchamiania programów używających x11graphics.
981ff793
MM
155
156%package x11graphics-devel
157Summary: X11 graphic output for OCaml
6e95eae7 158Summary(pl.UTF-8): Dostęp do X11 dla OCamla
981ff793 159Group: Development/Libraries
4694cc06 160Requires: %{name}-x11graphics = %{epoch}:%{version}-%{release}
981ff793
MM
161
162%description x11graphics-devel
163x11graphics module gives OCaml program access to drawing in X11
164windows. This package contains files needed to develop OCaml programs
165using x11graphics.
166
3f556f71
JR
167%description x11graphics-devel -l pl.UTF-8
168Moduł x11graphics daje programom napisanym w OCamlu możliwość
8151bf1e 169korzystania z interfejsu graficznego X11. Pakiet ten zawiera pliki
3f556f71 170niezbędne do tworzenia programów używających x11graphics.
56260732 171
6dfc0e1a 172%package compiler-objects
981ff793 173Summary: Compiled parts of OCaml compiler
6e95eae7 174Summary(pl.UTF-8): Skompilowane części kompilatora OCamla
981ff793 175Group: Development/Languages
4694cc06 176Requires: %{name} = %{epoch}:%{version}-%{release}
68076664 177Obsoletes: ocaml-devel
6adc6dd7 178Provides: ocaml-devel
981ff793 179
6dfc0e1a 180%description compiler-objects
981ff793
MM
181This package contains *.cmi and *.cmo files being parts of OCaml
182compiler. They are needed to compile some programs.
183
3f556f71
JR
184%description compiler-objects -l pl.UTF-8
185Pakiet ten zawiera pliki *.cmi oraz *.cmo będące częściami kompilatora
186OCamla. Są one wymagane do kompilacji niektórych programów.
981ff793 187
13b509d1
MM
188%package ocamldoc-devel
189Summary: Files needed to develop programs using ocamldoc
6e95eae7 190Summary(pl.UTF-8): Pliki potrzebne do tworzenia programów używających ocamldoc
13b509d1 191Group: Development/Languages
4694cc06 192Requires: %{name} = %{epoch}:%{version}-%{release}
13b509d1
MM
193
194%description ocamldoc-devel
195You need this package if you are going to write ocamldoc front end or
196something like that.
197
3f556f71
JR
198%description ocamldoc-devel -l pl.UTF-8
199Będziesz potrzebować tego pakietu, jeśli zamierzasz pisać front end
200dla ocamldoc lub coś podobnego.
13b509d1 201
53fbd845
MM
202# maybe we'll want to add some more stuff here?
203%package examples
204Summary: Example source code for OCaml
6e95eae7 205Summary(pl.UTF-8): Przykładowe kody źródłowe w OCamlu
53fbd845 206Group: Development/Languages
4694cc06 207Requires: %{name} = %{epoch}:%{version}-%{release}
53fbd845
MM
208
209%description examples
63004413 210This packages contains sources for Okasaki's Purely Functional
53fbd845
MM
211Datastructures in OCaml, along with some contributions.
212
3f556f71
JR
213%description examples -l pl.UTF-8
214Pakiet ten zawiera źródła Czysto Funkcyjnych Struktur Danych
8151bf1e 215autorstwa Okasaki'ego, napisane w OCamlu, wraz z dodatkami.
53fbd845 216
65fbc6c7 217%prep
e091ab7c 218%setup -q -a1 -a3
19e77905 219mkdir examples
e091ab7c
JB
220tar xzf %{SOURCE4} -C examples
221tar xzf %{SOURCE5} -C examples
56260732 222# order mess with docs somewhat
69735a4b 223mkdir -p docs/html
56260732 224mv htmlman docs/html/ocaml
fa4b2219 225cp %{SOURCE2} docs/ocaml.ps.gz
4c1e0f62 226%patch1 -p1
56260732 227%patch2 -p1
69735a4b 228
229%build
ed19172f 230cp -f /usr/share/automake/config.sub config/gnu
65fbc6c7 231./configure \
69735a4b 232 -cc "%{__cc}" \
65fbc6c7
AM
233 -bindir %{_bindir} \
234 -libdir %{_libdir}/%{name} \
235 -mandir %{_mandir}/man1 \
530dec71 236 -host %{_host} \
2e6ceb74 237 -with-pthread \
0053154a 238 -x11lib %{_libdir}
65fbc6c7 239
0d424b76
AM
240%{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT"
241%{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall -DUSE_INTERP_RESULT" -j1
65fbc6c7
AM
242
243%install
5ca6b9fb 244rm -rf $RPM_BUILD_ROOT
e091ab7c 245install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-%{version}}
7ff0f82f 246install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib
e42e1457 247
7ae05805 248%{__make} install \
13b509d1
MM
249 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
250 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \
251 MANDIR=$RPM_BUILD_ROOT%{_mandir}
252
253cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF
254%{_libdir}/%{name}/stublibs
255%{_libdir}/%{name}
256EOF
4797676b 257
f4710e3c 258%if %{with emacs}
3889f6d2
JR
259%{__make} -C emacs install \
260 DESTDIR=$RPM_BUILD_ROOT \
261 EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp" \
262 EMACS="emacs"
56260732
MM
263%endif
264
981ff793 265# symlink .opt versions of compilers (if present)
13b509d1 266for f in ocamlc ocamlopt ocamldoc ocamllex; do
067af37d
MM
267 if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
268 mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
269 $RPM_BUILD_ROOT%{_bindir}/$f.byte
270 ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
271 fi
1511bcd5 272done
65fbc6c7 273
981ff793 274# move includes to the proper place
ba35c88b 275mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
981ff793 276# but leave compatibility symlink
379cf672 277ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
981ff793 278
360c386d
MM
279# compiled sources of compiler, needed by some programs
280for f in {asm,byte}comp parsing typing utils ; do
281 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
282 cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f
283done
981ff793
MM
284
285# this isn't installed by default, but is useful
286install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
53fbd845 287cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
56260732
MM
288ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
289
13b509d1 290# shutup checkfiles
9de25172 291%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man3
13b509d1 292
69735a4b 293# install info pages
294cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
295
65fbc6c7
AM
296%clean
297rm -rf $RPM_BUILD_ROOT
298
9de25172 299%post doc-info -p /sbin/postshell
4a452533 300-/usr/sbin/fix-info-dir -c %{_infodir}
69735a4b 301
9de25172 302%postun doc-info -p /sbin/postshell
4a452533 303-/usr/sbin/fix-info-dir -c %{_infodir}
69735a4b 304
65fbc6c7
AM
305%files
306%defattr(644,root,root,755)
e091ab7c 307%doc Changes LICENSE README
9de25172 308%attr(755,root,root) %{_bindir}/addlabels
e091ab7c
JB
309%attr(755,root,root) %{_bindir}/ocaml
310%attr(755,root,root) %{_bindir}/ocamlbuild*
311%attr(755,root,root) %{_bindir}/ocamlc
312%attr(755,root,root) %{_bindir}/ocamlc.*
313%attr(755,root,root) %{_bindir}/ocamlcp
314%attr(755,root,root) %{_bindir}/ocamldebug
315%attr(755,root,root) %{_bindir}/ocamldep*
316%attr(755,root,root) %{_bindir}/ocamldoc*
317%attr(755,root,root) %{_bindir}/ocamllex*
318%attr(755,root,root) %{_bindir}/ocamlmklib
319%attr(755,root,root) %{_bindir}/ocamlmktop
320%attr(755,root,root) %{_bindir}/ocamlobjinfo
321%attr(755,root,root) %{_bindir}/ocamlopt
322%attr(755,root,root) %{_bindir}/ocamlopt.*
323%attr(755,root,root) %{_bindir}/ocamloptp
324%attr(755,root,root) %{_bindir}/ocamlprof
325%attr(755,root,root) %{_bindir}/ocamlyacc
9de25172 326%attr(755,root,root) %{_bindir}/scrapelabels
ba35c88b 327%{_includedir}/caml
530dec71 328%{_libdir}/%{name}/caml
e091ab7c 329%{_libdir}/%{name}/compiler-libs
530dec71 330%{_libdir}/%{name}/threads
4c1e0f62
MM
331%dir %{_libdir}/%{name}/vmthreads
332%dir %{_libdir}/%{name}/vmthreads/*.cm*
333%dir %{_libdir}/%{name}/vmthreads/*.a
13b509d1
MM
334%{_libdir}/%{name}/*.a
335%{_libdir}/%{name}/*.o
336%{_libdir}/%{name}/*.cm*
337%exclude %{_libdir}/%{name}/*graphics*
dd90c8d9 338%{_libdir}/%{name}/Makefile.config
4251bfb1 339%{_libdir}/%{name}/ld.conf
56260732
MM
340%{_libdir}/%{name}/camlheader
341%{_libdir}/%{name}/camlheader_ur
7ff0f82f 342%{_libdir}/%{name}/ocamlbuild
13b509d1 343%dir %{_libdir}/%{name}/ocamldoc
13b509d1
MM
344%{_libdir}/%{name}/ocamldoc/*.hva
345%attr(755,root,root) %{_libdir}/%{name}/expunge
346%attr(755,root,root) %{_libdir}/%{name}/extract_crc
9de25172
JB
347%attr(755,root,root) %{_libdir}/%{name}/objinfo_helper
348%{_mandir}/man1/ocaml*
349%exclude %{_mandir}/man1/ocamlrun.1*
13b509d1 350
79502218
JB
351%files runtime
352%defattr(644,root,root,755)
353%attr(755,root,root) %{_bindir}/ocamlrun
354%dir %{_libdir}/%{name}
7ff0f82f 355%dir %{_libdir}/%{name}/site-lib
79502218
JB
356%dir %{_libdir}/%{name}/stublibs
357%attr(755,root,root) %{_libdir}/%{name}/stublibs/dll*.so
358%exclude %{_libdir}/%{name}/stublibs/dllgraphics.so
42946d4f 359%attr(755,root,root) %{_libdir}/%{name}/libcamlrun_shared.so
9de25172 360%{_mandir}/man1/ocamlrun.1*
79502218 361
13b509d1
MM
362%files lib-source
363%defattr(644,root,root,755)
364%{_libdir}/%{name}/*.ml
8151bf1e 365%{_libdir}/%{name}/*.mli
4c1e0f62 366%{_libdir}/%{name}/*/*.mli
13b509d1 367
79502218 368%files doc-html
763b9075 369%defattr(644,root,root,755)
79502218
JB
370%doc docs/html/ocaml/*
371
372%files doc-ps
373%defattr(644,root,root,755)
374%doc docs/*.ps.gz
375
376%files doc-info
377%defattr(644,root,root,755)
378%{_infodir}/ocaml.info*
53fbd845 379
13b509d1
MM
380# they are poor, html is much better
381#%files manpages
e68873d9 382#%%{_mandir}/man3/*
65fbc6c7 383
79502218
JB
384%if %{with emacs}
385%files emacs
56260732 386%defattr(644,root,root,755)
79502218
JB
387%{_datadir}/emacs/site-lisp/*.el*
388%endif
56260732 389
b552f088 390%if %{with x}
79502218
JB
391%files x11graphics
392%defattr(644,root,root,755)
393%attr(755,root,root) %{_libdir}/%{name}/stublibs/dllgraphics.so
394
981ff793 395%files x11graphics-devel
56260732 396%defattr(644,root,root,755)
13b509d1 397%{_libdir}/%{name}/graphics*.cm*
f442d039 398%{_libdir}/%{name}/graphics.a
56260732 399%{_libdir}/%{name}/libgraphics.a
56260732
MM
400%endif
401
79502218 402%files compiler-objects
69735a4b 403%defattr(644,root,root,755)
79502218 404%{_libdir}/%{name}/compiler
69735a4b 405
79502218 406%files ocamldoc-devel
73a93122 407%defattr(644,root,root,755)
79502218
JB
408%{_libdir}/%{name}/ocamldoc/*.cm*
409%{_libdir}/%{name}/ocamldoc/*.a
69735a4b 410
79502218 411%files examples
69735a4b 412%defattr(644,root,root,755)
79502218 413%{_examplesdir}/%{name}-%{version}
This page took 0.263507 seconds and 4 git commands to generate.