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