]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml.spec
- updated to 3.04
[packages/ocaml.git] / ocaml.spec
1
2 # conditional build:
3 # --without emacs
4 # --without tk
5 # --without x11  (use only with --without tk)
6
7 Summary:        The Objective Caml compiler and programming environment
8 Summary(pl):    Kompilator Objektowego Caml oraz ¶rodowisko programistyczne
9 Name:           ocaml
10 Version:        3.04
11 Release:        1
12 License:        distributable
13 Vendor:         Group of implementors <caml-light@inria.fr>
14 Group:          Development/Languages
15 Group(de):      Entwicklung/Sprachen
16 Group(pl):      Programowanie/Jêzyki
17 Source0:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}.tar.gz
18 Source1:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.info.tar.gz
19 Source2:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.html.tar.gz
20 Source3:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.ps.gz
21 Source4:        ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-refman.html.tar.gz
22 Source5:        ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-refman.ps.gz
23 Source6:        ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.html.tar.gz
24 Source7:        ftp://ftp.inria.fr/INRIA/Projects/cristal/camlp4/camlp4-%{version}-tutorial.ps.gz
25 Patch0:         %{name}-build.patch
26 Patch1:         %{name}-DESTDIR.patch
27 Patch2:         %{name}-manlinks.patch
28 Patch3:         %{name}-db3.patch
29 URL:            http://caml.inria.fr/caml/
30 BuildRequires:  db3-devel
31 %{!?_without_tk:BuildRequires:  tcl-devel}
32 %{!?_without_tk:BuildRequires:  tk-devel}
33 %{!?_without_x:BuildRequires:   XFree86-devel}
34 %{!?_without_emacs:BuildRequires:       xemacs-common}
35 %{!?_without_emacs:BuildRequires:       xemacs-fsf-compat-pkg}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Objective Caml is a high-level, strongly-typed, functional and
40 object-oriented programming language from the ML family of languages.
41
42 This package comprises two batch compilers (a fast bytecode compiler
43 and an optimizing native-code compiler), an interactive toplevel
44 system, Lex&Yacc tools, a replay debugger, and a comprehensive
45 library.
46
47 %description -l pl
48 Objektowy Caml jest funkcjonalnym, obiektowo zorientowanym jêzykiem
49 wysokiego poziomu z rodziny jêzyków ML.
50
51 Ten pakiet zawiera dwa kompilatory (szybki kompilator bytecode oraz
52 zoptymalizowany natywny kompilator), interaktywny g³ówny system,
53 narzêdzia Lex&Yacc, odpluskwiacz i biblioteki.
54
55 %package doc-ps
56 Summary:        PostScript documentation for OCaml
57 Summary(pl):    Dokumentacja dla OCaml-a w formacie PostSript
58 Group:          Development/Tools
59 Requires:       %{name} = %{version}
60
61 %description doc-ps
62 PostScript documentation for OCaml
63
64 %description doc-ps -l pl
65 Dokumentacja dla OCaml-a w formacie PostSript
66
67 %package doc-html
68 Summary:        HTML documentation for OCaml
69 Summary(pl):    Dokumentacja dla OCaml-a w formacie HTML
70 Group:          Development/Tools
71 Requires:       %{name} = %{version}
72
73 %description doc-html
74 HTML documentation for OCaml
75
76 %description doc-html -l pl
77 Dokumentacja dla OCaml-a w formacie HTML
78
79 %package emacs
80 Summary:        Emacs mode for OCaml
81 Summary(pl):    Tryb Emacsa dla OCaml
82 Group:          Development/Tools
83 Group(de):      Entwicklung/Werkzeuge
84 Group(fr):      Development/Outils
85 Group(pl):      Programowanie/Narzêdzia
86 Requires:       %{name} = %{version}
87
88 %description emacs
89 Emacs mode files for Objective Caml language
90
91 %description -l pl emacs
92 Pliki trybu Emacsa dla jêzyka Objektowego Caml
93
94 %package labltk
95 Summary:        LabelTk library for OCaml
96 Summary(pl):    Biblioteka LablTk dla OCamla
97 Group:          Development/Libraries
98 Requires:       %{name} = %{version}
99
100 %description labltk
101 LablTk gives OCaml program access to Tcl/Tk GUI widgets.
102
103 %description -l pl labltk
104 Biblioteka LablTk daje programom napisanym w OCamlu dostêp do
105 widgetów Tcl/Tk.
106
107 %package x11graphics
108 Summary:        X11 graphic output for OCaml
109 Summary(pl):    Iksowe wyj¶cie graficzne dla OCamla
110 Group:          Development/Libraries
111 Requires:       %{name} = %{version}
112
113 %description x11graphics
114 This package gives OCaml program access to drawing in X11 windows.
115
116 %description -l pl x11graphics
117 Ten pakiet daje programom napisanym w OCamlu dostêp do rysowania po
118 oknach X11.
119
120 %package camlp4
121 Summary:        Objective Caml Preprocessor
122 Summary(pl):    Preprocesor Ocamla
123 Group:          Development/Languages
124 Requires:       %{name} = %{version}
125 Provides:       camlp4 = %{version}
126 Obsoletes:      camlp4
127
128 %description camlp4
129 Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
130 tools for syntax (grammars) and the ability to modify the concrete
131 syntax of the language (quotations, syntax extensions).
132
133 Camlp4 can parse normal Ocaml concrete syntax or any other
134 user-definable syntax. As an example, an alternative syntax is
135 provided, named revised, because it tries to fix some small problems
136 of the normal syntax.
137
138 Camlp4 can pretty print the normal Ocaml concrete syntax or the
139 revised one. It is therefore always possible to have a version of your
140 sources compilable by the compiler Objective Caml without
141 preprocessing.
142
143 %description -l pl camlp4
144 Camlp4 jest preprocesorem dla Ocamla. Oferuje narzêdzia do sk³adni (gramatyki)
145 oraz umiejêtno¶æ modyfikowania konkretnej sk³adni jêzyka (cytowania,
146 rozszerzenia).
147
148 Camlp4 mo¿e sparsowaæ normaln± sk³adniê Ocamla lub inn± dowoln± definiowaln±
149 przez u¿ytkownika. Jako przyk³ad jest podana alternatywna sk³adnia, nazwana
150 "poprawiona", poniewa¿ próbuje poprawiæ drobne problemy ze zwyk³± sk³adni±.
151
152 Camlp4 umie ³adnie wypisaæ normaln± sk³adniê Camla lub "poprawion±". Dziêki
153 temu jest mo¿liwe posiadanie wersji swoich ¼róde³ kompilowalnych przez
154 kompilatora Ocamla bez preprocesingu.
155
156
157 %prep
158 %setup -q -T -b 0
159 %setup -q -T -D -a 1
160 %setup -q -T -D -a 2
161 # order mess with docs somewhat
162 mkdir docs
163 mkdir docs/html
164 mv htmlman docs/html/ocaml
165 cp %{SOURCE3} docs/ocaml.ps.gz
166 %setup -q -T -D -a 4
167 mv camlp4-%{version}-refman.html docs/html/camlp4
168 cp %{SOURCE5} docs/camlp4.ps.gz
169 %setup -q -T -D -a 6
170 mv camlp4-%{version}-tutorial.html docs/html/camlp4-tutorial
171 cp %{SOURCE7} docs/camlp4-tutorial.ps.gz
172
173 %patch0 -p1
174 %patch1 -p1
175 %patch2 -p1
176 %patch3 -p1
177
178 %build
179 ./configure \
180         -cc "%{__cc} %{rpmcflags}" \
181         -bindir %{_bindir} \
182         -libdir %{_libdir}/%{name} \
183         -mandir %{_mandir}/man1 \
184         -host %{_host} \
185         %{?_without_tk:-notk} \
186         -with-pthread
187
188 # this is crude hack (works in addition to ocaml-db3.patch)
189 cp config/Makefile config/Makefile.tmp
190 sed -e 's|-ldb1|-ldb|; s|-I/usr/include/db1||' < config/Makefile.tmp > config/Makefile
191
192 %{__make} world bootstrap opt ocamlc.opt ocamlopt.opt
193
194 # hack info pages to contain dir entry
195 cat <<EOF >infoman/ocaml.info
196 INFO-DIR-SECTION Programming Languages:
197 START-INFO-DIR-ENTRY    
198 * Ocaml: (ocaml).                             The Ocaml language
199 END-INFO-DIR-ENTRY
200 EOF
201 zcat infoman/ocaml.info.gz >> infoman/ocaml.info
202 gzip -9nf infoman/ocaml.info
203
204 %install
205 rm -rf $RPM_BUILD_ROOT
206
207 make install DESTDIR=$RPM_BUILD_ROOT
208
209 %if %{!?_without_emacs:1}%{?_without_emacs:0}
210 %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \
211         EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
212                 else echo xemacs; fi`" \
213         EMACSDIR="%{_libdir}/emacs/site-lisp"
214 %endif
215
216 cp -p {parsing/{location,longident,parsetree},typing/typecore}.{cm,ml}i \
217         $RPM_BUILD_ROOT%{_libdir}/%{name}
218                 
219 mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlc $RPM_BUILD_ROOT%{_bindir}/ocamlc.byte
220 ln -sf %{_bindir}/ocamlc.opt $RPM_BUILD_ROOT%{_bindir}/ocamlc
221 mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlopt $RPM_BUILD_ROOT%{_bindir}/ocamlopt.byte
222 ln -sf %{_bindir}/ocamlopt.opt $RPM_BUILD_ROOT%{_bindir}/ocamlopt
223 rm -f $RPM_BUILD_ROOT%{_libdir}/%{_name}/*.ml
224
225 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
226
227 install -d $RPM_BUILD_ROOT%{_infodir}
228 install infoman/*info* $RPM_BUILD_ROOT%{_infodir}
229
230 gzip -9nf LICENSE Changes README Upgrading
231
232 %clean
233 rm -rf $RPM_BUILD_ROOT
234
235 %post
236 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
237
238 %postun
239 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
240
241
242 %files
243 %defattr(644,root,root,755)
244 %doc *.gz
245 %attr(755, root, root) %{_bindir}/ocaml
246 %attr(755, root, root) %{_bindir}/ocaml[cmdlopry]*
247 %attr(755, root, root) %{_bindir}/*labels
248 %{_libdir}/%{name}/caml
249 %{_libdir}/%{name}/threads
250 %{_libdir}/%{name}/[abefhimnopqrstuw]*.*
251 %{_libdir}/%{name}/callback.*
252 %{_libdir}/%{name}/char.*
253 %{_libdir}/%{name}/condition.*
254 %{_libdir}/%{name}/dbm.*
255 %{_libdir}/%{name}/digest.*
256 %attr(755,root,root) %{_libdir}/%{name}/dll[bmnstu]*.so
257 %{_libdir}/%{name}/g[ce]*.*
258 %{_libdir}/%{name}/l*.cm*
259 %{_libdir}/%{name}/l*.mli
260 %{_libdir}/%{name}/lib[abc]*.a
261 %{_libdir}/%{name}/libmldbm.a
262 %{_libdir}/%{name}/lib[nstu]*.a
263 %attr(755,root,root) %{_libdir}/%{name}/expunge
264 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
265 %{_libdir}/%{name}/camlheader
266 %{_libdir}/%{name}/camlheader_ur
267 %attr(755,root,root) %{_libdir}/%{name}/*labels
268 %{_mandir}/man*/*ocaml*
269 %{_infodir}/*
270
271 %files camlp4
272 %defattr(644,root,root,755)
273 %attr(755, root, root) %{_bindir}/*camlp4*
274 %attr(755, root, root) %{_bindir}/ocpp
275 %attr(755, root, root) %{_bindir}/odyl
276 %{_libdir}/%{name}/camlp4
277 %{_mandir}/man*/*camlp4*
278 %{_mandir}/man*/*ocpp*
279
280 %if %{!?_without_tk:1}%{?_without_tk:0}
281 %files labltk
282 %defattr(644,root,root,755)
283 %attr(755, root, root) %{_bindir}/labltk
284 %attr(755, root, root) %{_bindir}/ocamlbrowser
285 %dir %{_libdir}/%{name}/labltk
286 %{_libdir}/%{name}/labltk/*.cm*
287 %{_libdir}/%{name}/labltk/*.a
288 %{_libdir}/%{name}/labltk/*.mli
289 %attr(755, root, root) %{_libdir}/%{name}/labltk/*.so
290 %attr(755, root, root) %{_libdir}/%{name}/labltk/labltktop
291 %attr(755, root, root) %{_libdir}/%{name}/labltk/tkcompiler
292 %endif
293
294 %if %{!?_without_x11:1}%{?_without_x11:0}
295 %files x11graphics
296 %defattr(644,root,root,755)
297 %{_libdir}/%{name}/graphics*
298 %{_libdir}/%{name}/libgraphics.a
299 %attr(755, root, root) %{_libdir}/%{name}/dllgraphics.so
300 %endif
301
302 %if %{!?_without_emacs:1}%{?_without_emacs:0}
303 %files emacs
304 %defattr(644,root,root,755)
305 %{_libdir}/emacs/site-lisp/*.el
306 %endif
307
308 %files doc-ps
309 %doc docs/*.ps.gz
310
311 %files doc-html
312 %doc docs/html/*
This page took 0.049593 seconds and 4 git commands to generate.