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