]> git.pld-linux.org Git - packages/ocaml.git/blobdiff - ocaml.spec
- crude hack to get dbm.cmo working...
[packages/ocaml.git] / ocaml.spec
index 60c606c1751a90ea88e53b826b5dacd0d37bbcb3..3eea030c567db7e9a0d6381bb161df020392e807 100644 (file)
@@ -1,21 +1,33 @@
+
+# conditional build:
+# --without emacs
+
+%{!?_without_emacs:%define     emacs   1}
+%{?_without_emacs:%define      emacs   0}
+
 Summary:       The Objective Caml compiler and programming environment
 Summary(pl):   Kompilator Objektowego Caml oraz ¶rodowisko programistyczne
 Name:          ocaml
-Version:       3.01
-Release:       1
-License:       Distributable
+Version:       3.02
+Release:       3
+License:       distributable
 Vendor:                Group of implementors <caml-light@inria.fr>
 Group:         Development/Languages
 Group(de):     Entwicklung/Sprachen
 Group(pl):     Programowanie/Jêzyki
 Source0:       ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}.tar.gz
 Source1:       ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.info.tar.gz
-URL:           http://pauillac.inria.fr/caml/
+Source2:       ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.html.tar.gz
+Source3:       ftp://ftp.inria.fr/lang/caml-light/%{name}-%{version}-refman.ps.gz
+URL:           http://caml.inria.fr/caml/
 BuildRequires: tcl-devel
 BuildRequires: tk-devel
-BuildRequires: xemacs
+%{!?_without_emacs:BuildRequires:      xemacs-common}
+%{!?_without_emacs:BuildRequires:      xemacs-fsf-compat-pkg}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                no_install_post_strip   1
+
 %description
 Objective Caml is a high-level, strongly-typed, functional and
 object-oriented programming language from the ML family of languages.
@@ -33,6 +45,31 @@ Ten pakiet zawiera dwa kompilatory (szybki kompilator bytecode oraz
 zoptymalizowany natywny kompilator), interaktywny g³ówny system,
 narzêdzia Lex&Yacc, odpluskwiacz i biblioteki.
 
+%package doc-ps
+Summary:       PostScript documentation for OCaml
+Summary(pl):   Dokumentacja dla OCaml-a w formacie PostSript
+Group:         Development/Tools
+Requires:      %{name} = %{version}
+
+%description doc-ps
+PostScript documentation for OCaml
+
+%description doc-ps -l pl
+Dokumentacja dla OCaml-a w formacie PostSript
+
+%package doc-html
+Summary:       HTML documentation for OCaml
+Summary(pl):   Dokumentacja dla OCaml-a w formacie HTML
+Group:         Development/Tools
+Requires:      %{name} = %{version}
+
+%description doc-html
+HTML documentation for OCaml
+
+%description doc-html -l pl
+Dokumentacja dla OCaml-a w formacie HTML
+
+%if %emacs
 %package emacs
 Summary:       Emacs mode for OCaml
 Summary(pl):   Tryb Emacsa dla OCaml
@@ -49,10 +86,13 @@ Emacs mode files for Objective Caml language
 
 %description -l pl emacs
 Pliki trybu Emacsa dla jêzyka Objektowego Caml
+%endif
 
 %prep
 %setup -q -T -b 0
 %setup -q -T -D -a 1
+%setup -q -T -D -a 2
+cp %{SOURCE3} .
 
 %build
 ./configure \
@@ -60,7 +100,7 @@ Pliki trybu Emacsa dla j
        -bindir %{_bindir} \
        -libdir %{_libdir}/%{name} \
        -mandir %{_mandir}/man1 \
-       -host %{_host_alias} \
+       -host %{_host} \
        -with-pthread
 
 %{__make} world bootstrap opt ocamlc.opt ocamlopt.opt \
@@ -85,17 +125,21 @@ echo       LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} >> config/Makefile
 echo   MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 >> config/Makefile
 
 make   install 
+
+%if %emacs
 %{__make} -C emacs install \
        EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \
                else echo xemacs; fi`" \
        EMACSDIR="$RPM_BUILD_ROOT%{_libdir}/emacs/site-lisp"
+       
 cp -p {parsing/{location,longident,parsetree},typing/typecore}.{cm,ml}i \
        $RPM_BUILD_ROOT%{_libdir}/%{name}
-                       
+%endif         
+               
 mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlc $RPM_BUILD_ROOT%{_bindir}/ocamlc.byte
-mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlc.opt $RPM_BUILD_ROOT%{_bindir}/ocamlc
+ln -sf %{_bindir}/ocamlc.opt $RPM_BUILD_ROOT%{_bindir}/ocamlc
 mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlopt $RPM_BUILD_ROOT%{_bindir}/ocamlopt.byte
-mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlopt.opt $RPM_BUILD_ROOT%{_bindir}/ocamlopt
+ln -sf %{_bindir}/ocamlopt.opt $RPM_BUILD_ROOT%{_bindir}/ocamlopt
 rm -f $RPM_BUILD_ROOT%{_libdir}/%{_name}/*.ml
 
 install -d $RPM_BUILD_ROOT%{_infodir}
@@ -115,12 +159,27 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc *.gz
+%doc LICENSE.gz Changes.gz README.gz
 %attr(755, root, root) %{_bindir}/*
-%{_libdir}/%{name}
+%{_libdir}/%{name}/caml
+%{_libdir}/%{name}/labltk
+%{_libdir}/%{name}/threads
+%{_libdir}/%{name}/*.*
+%attr(755,root,root) %{_libdir}/%{name}/expunge
+%attr(755,root,root) %{_libdir}/%{name}/extract_crc
+%attr(755,root,root) %{_libdir}/%{name}/camlheader
+%attr(755,root,root) %{_libdir}/%{name}/camlheader_ur
 %{_mandir}/man*/*
 %{_infodir}/*
 
+%if %emacs
 %files emacs
 %defattr(644,root,root,755)
 %{_libdir}/emacs/site-lisp/*.el
+%endif
+
+%files doc-ps
+%doc *.ps.gz
+
+%files doc-html
+%doc htmlman
This page took 0.032904 seconds and 4 git commands to generate.