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