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