From 4797676b575071ea1c435f44ee32d9aebde621b7 Mon Sep 17 00:00:00 2001 From: filon Date: Mon, 29 Oct 2001 20:45:32 +0000 Subject: [PATCH] - added html and ps docs - added _without_emacs bcond - added subpackages for docs - release 3 Changed files: ocaml.spec -> 1.19 --- ocaml.spec | 61 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/ocaml.spec b/ocaml.spec index a8b3de0..2faa12c 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -1,8 +1,15 @@ + +# 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.02 -Release: 2 +Release: 3 License: Distributable Vendor: Group of implementors Group: Development/Languages @@ -10,11 +17,13 @@ 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-common -BuildRequires: xemacs-fsf-compat-pkg +%{!?_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 @@ -36,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 @@ -52,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 \ @@ -88,13 +125,17 @@ 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 ln -sf %{_bindir}/ocamlc.opt $RPM_BUILD_ROOT%{_bindir}/ocamlc mv -f $RPM_BUILD_ROOT%{_bindir}/ocamlopt $RPM_BUILD_ROOT%{_bindir}/ocamlopt.byte @@ -118,7 +159,7 @@ 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}/caml %{_libdir}/%{name}/labltk @@ -131,6 +172,14 @@ rm -rf $RPM_BUILD_ROOT %{_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 -- 2.43.0