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