]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml.spec
- crude hack to get dbm.cmo working...
[packages/ocaml.git] / ocaml.spec
1
2 # conditional build:
3 # --without emacs
4
5 %{!?_without_emacs:%define      emacs   1}
6 %{?_without_emacs:%define       emacs   0}
7
8 Summary:        The Objective Caml compiler and programming environment
9 Summary(pl):    Kompilator Objektowego Caml oraz ¶rodowisko programistyczne
10 Name:           ocaml
11 Version:        3.02
12 Release:        3
13 License:        distributable
14 Vendor:         Group of implementors <caml-light@inria.fr>
15 Group:          Development/Languages
16 Group(de):      Entwicklung/Sprachen
17 Group(pl):      Programowanie/Jêzyki
18 Source0:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}.tar.gz
19 Source1:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.info.tar.gz
20 Source2:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.html.tar.gz
21 Source3:        ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.ps.gz
22 URL:            http://caml.inria.fr/caml/
23 BuildRequires:  tcl-devel
24 BuildRequires:  tk-devel
25 %{!?_without_emacs:BuildRequires:       xemacs-common}
26 %{!?_without_emacs:BuildRequires:       xemacs-fsf-compat-pkg}
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         no_install_post_strip   1
30
31 %description
32 Objective Caml is a high-level, strongly-typed, functional and
33 object-oriented programming language from the ML family of languages.
34
35 This package comprises two batch compilers (a fast bytecode compiler
36 and an optimizing native-code compiler), an interactive toplevel
37 system, Lex&Yacc tools, a replay debugger, and a comprehensive
38 library.
39
40 %description -l pl
41 Objektowy Caml jest funkcjonalnym, obiektowo zorientowanym jêzykiem
42 wysokiego poziomu rodziny jêzyków ML.
43
44 Ten pakiet zawiera dwa kompilatory (szybki kompilator bytecode oraz
45 zoptymalizowany natywny kompilator), interaktywny g³ówny system,
46 narzêdzia Lex&Yacc, odpluskwiacz i biblioteki.
47
48 %package doc-ps
49 Summary:        PostScript documentation for OCaml
50 Summary(pl):    Dokumentacja dla OCaml-a w formacie PostSript
51 Group:          Development/Tools
52 Requires:       %{name} = %{version}
53
54 %description doc-ps
55 PostScript documentation for OCaml
56
57 %description doc-ps -l pl
58 Dokumentacja dla OCaml-a w formacie PostSript
59
60 %package doc-html
61 Summary:        HTML documentation for OCaml
62 Summary(pl):    Dokumentacja dla OCaml-a w formacie HTML
63 Group:          Development/Tools
64 Requires:       %{name} = %{version}
65
66 %description doc-html
67 HTML documentation for OCaml
68
69 %description doc-html -l pl
70 Dokumentacja dla OCaml-a w formacie HTML
71
72 %if %emacs
73 %package emacs
74 Summary:        Emacs mode for OCaml
75 Summary(pl):    Tryb Emacsa dla OCaml
76 Group:          Development/Tools
77 Group(de):      Entwicklung/Werkzeuge
78 Group(fr):      Development/Outils
79 Group(pl):      Programowanie/Narzêdzia
80 Requires:       %{name} = %{version}
81 # xemacs doesn't have Provide emacs ?
82 #BuildRequires: emacs
83
84 %description emacs
85 Emacs mode files for Objective Caml language
86
87 %description -l pl emacs
88 Pliki trybu Emacsa dla jêzyka Objektowego Caml
89 %endif
90
91 %prep
92 %setup -q -T -b 0
93 %setup -q -T -D -a 1
94 %setup -q -T -D -a 2
95 cp %{SOURCE3} .
96
97 %build
98 ./configure \
99         -cc "%{__cc}" \
100         -bindir %{_bindir} \
101         -libdir %{_libdir}/%{name} \
102         -mandir %{_mandir}/man1 \
103         -host %{_host} \
104         -with-pthread
105
106 %{__make} world bootstrap opt ocamlc.opt ocamlopt.opt \
107         BYTECCCOMPOPTS="%{rpmcflags}"
108
109 # hack info pages to contain dir entry
110 cat <<EOF >infoman/ocaml.info
111 INFO-DIR-SECTION Programming Languages:
112 START-INFO-DIR-ENTRY    
113 * Ocaml: (ocaml).                             The Ocaml language
114 END-INFO-DIR-ENTRY
115 EOF
116 zcat infoman/ocaml.info.gz >> infoman/ocaml.info
117 gzip -9nf infoman/ocaml.info
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121 umask 022
122
123 echo    BINDIR=$RPM_BUILD_ROOT%{_bindir} >> config/Makefile
124 echo    LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} >> config/Makefile
125 echo    MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 >> config/Makefile
126
127 make    install 
128
129 %if %emacs
130 %{__make} -C emacs install \
131         EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
132                 else echo xemacs; fi`" \
133         EMACSDIR="$RPM_BUILD_ROOT%{_libdir}/emacs/site-lisp"
134         
135 cp -p {parsing/{location,longident,parsetree},typing/typecore}.{cm,ml}i \
136         $RPM_BUILD_ROOT%{_libdir}/%{name}
137 %endif          
138                 
139 mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlc $RPM_BUILD_ROOT%{_bindir}/ocamlc.byte
140 ln -sf %{_bindir}/ocamlc.opt $RPM_BUILD_ROOT%{_bindir}/ocamlc
141 mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlopt $RPM_BUILD_ROOT%{_bindir}/ocamlopt.byte
142 ln -sf %{_bindir}/ocamlopt.opt $RPM_BUILD_ROOT%{_bindir}/ocamlopt
143 rm -f $RPM_BUILD_ROOT%{_libdir}/%{_name}/*.ml
144
145 install -d $RPM_BUILD_ROOT%{_infodir}
146 install infoman/*info* $RPM_BUILD_ROOT%{_infodir}
147
148 gzip -9nf LICENSE Changes README
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %post
154 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
155
156 %postun
157 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
158
159
160 %files
161 %defattr(644,root,root,755)
162 %doc LICENSE.gz Changes.gz README.gz
163 %attr(755, root, root) %{_bindir}/*
164 %{_libdir}/%{name}/caml
165 %{_libdir}/%{name}/labltk
166 %{_libdir}/%{name}/threads
167 %{_libdir}/%{name}/*.*
168 %attr(755,root,root) %{_libdir}/%{name}/expunge
169 %attr(755,root,root) %{_libdir}/%{name}/extract_crc
170 %attr(755,root,root) %{_libdir}/%{name}/camlheader
171 %attr(755,root,root) %{_libdir}/%{name}/camlheader_ur
172 %{_mandir}/man*/*
173 %{_infodir}/*
174
175 %if %emacs
176 %files emacs
177 %defattr(644,root,root,755)
178 %{_libdir}/emacs/site-lisp/*.el
179 %endif
180
181 %files doc-ps
182 %doc *.ps.gz
183
184 %files doc-html
185 %doc htmlman
This page took 0.041364 seconds and 3 git commands to generate.