Blob Blame History Raw
Name:		ocaml
Version:	3.08.3
Release: 4

Summary:	Objective Caml compiler and programming environment

Group:		Development/Languages
License:	QPL/LGPL
Patch0:		ocaml-rpath.patch
Patch1:		ocaml-user-cflags.patch
Patch2:		ocaml-num-gcc4.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	ncurses-devel, gdbm-devel, xorg-x11-devel
BuildRequires:	tcl-devel, tk-devel
BuildRequires:	emacs, perl
Requires(post):	/sbin/install-info
Requires(preun): /sbin/install-info

Objective Caml is a high-level, strongly-typed, functional and
object-oriented programming language from the ML family of languages.

This package comprises two batch compilers (a fast bytecode compiler
and an optimizing native-code compiler), an interactive toplevel system,
parsing tools (Lex,Yacc,Camlp4), a replay debugger, a documentation generator,
and a comprehensive library.

%package -n labltk
Group:		Development/Languages
Summary:	Tk bindings for Objective Caml
Requires:	ocaml = %{version}-%{release}

%description -n labltk
A library for interfacing Objective Caml with the scripting language
Tcl/Tk. It include the OCamlBrowser code editor / library browser.

%package -n camlp4
Group:		Development/Languages
Summary:	Pre-Processor-Pretty-Printer for OCaml
Requires:	ocaml = %{version}-%{release}

%description -n camlp4
Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
file and printing some result on standard output.

%package ocamldoc
Group:		Development/Languages
Summary:	Documentation generator for OCaml
Requires:	ocaml = %{version}-%{release}

%description ocamldoc
Documentation generator for Objective Caml.

%package emacs
Group:		Development/Languages
Summary:	Emacs mode for Objective Caml
Requires:	ocaml = %{version}-%{release}
Requires:	emacs

%description emacs
Emacs mode for Objective Caml.

%package docs
Group:		Development/Languages
Summary:	Documentation for OCaml
Requires:	ocaml = %{version}-%{release}

%description docs
Documentation for Objective Caml.

%setup -q -T -b 0
%setup -q -T -D -a 1
%setup -q -T -D -a 3
%patch0 -p1
%patch1 -p1 -b .cflags
%patch2 -p1 -b .x86_32

cp %{SOURCE2}

CFLAGS="$RPM_OPT_FLAGS" ./configure \
    -bindir %{_bindir} \
    -libdir %{_libdir}/ocaml \
    -x11lib %{_prefix}/X11R6/%{_lib} \
    -mandir %{_mandir}/man1
make world opt opt.opt
# %{?_smp_mflags} breaks the build
(cd emacs; make ocamltags)

%makeinstall BINDIR=$RPM_BUILD_ROOT%{_bindir} LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml MANDIR=$RPM_BUILD_ROOT%{_mandir}
perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
    cd emacs;
    make install BINDIR=$RPM_BUILD_ROOT%{_bindir} EMACSDIR=$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
    make install-ocamltags BINDIR=$RPM_BUILD_ROOT%{_bindir}
    mkdir -p $RPM_BUILD_ROOT%{_infodir};
    cd infoman; cp ocaml*.gz $RPM_BUILD_ROOT%{_infodir}


/sbin/install-info \
    --entry "* ocaml: (ocaml).	 The Objective Caml compiler and programming environment" \
    --section "Programming Languages" \
    %{_infodir}/%{name}.info \
    %{_infodir}/dir 2>/dev/null || :

if [ $1 -eq 0 ]; then
  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :

%exclude %{_bindir}/camlp4*
%exclude %{_bindir}/mkcamlp4
%exclude %{_bindir}/ocpp
%exclude %{_bindir}/labltk
%exclude %{_bindir}/ocamltags
%exclude %{_bindir}/ocamlbrowser
%exclude %{_bindir}/ocamldoc*
%exclude %{_libdir}/ocaml/camlp4
%exclude %{_libdir}/ocaml/labltk
%exclude %{_libdir}/ocaml/ocamldoc
%exclude %{_mandir}/man1/camlp4*
%exclude %{_mandir}/man1/mkcamlp4*
%exclude %{_libdir}/ocaml/stublibs/
%exclude %{_libdir}/ocaml/stublibs/

%files -n labltk
%doc otherlibs/labltk/examples_labltk
%doc otherlibs/labltk/examples_camltk

%files -n camlp4

%files ocamldoc
%doc ocamldoc/Changes.txt

%files docs
%doc htmlman

%files emacs
%doc emacs/README

* Mon May 9 2005 Toshio Kuratomi <> - 3.08.3-4
- Fix for gcc4 and the 32 bit assembly in otherlibs/num.
- Fix to allow compilation with RPM_OPT_FLAG defined -O level.

* Sun May 22 2005 Jeremy Katz <> - 3.08.3-3
- rebuild on all arches

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]>
- rebuilt

* Sat Mar 26 2005 Gerard Milmeister <> - 3.08.3-1
- New Version 3.08.3

* Sat Feb 12 2005 Gerard Milmeister <> - 0:3.08.2-2
- Added patch for removing rpath from shared libs

* Sat Feb 12 2005 Gerard Milmeister <> - 0:3.08.2-1
- New Version 3.08.2

* Thu Dec 30 2004 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0:3.07-6
- add -x11lib %%{_prefix}/X11R6/%%{_lib} to configure; fixes labltk build
  on x86_64

* Tue Dec  2 2003 Gerard Milmeister <> - 0:3.07-0.fdr.5
- ocamldoc -> ocaml-ocamldoc
- ocaml-doc -> ocaml-docs

* Fri Nov 28 2003 Gerard Milmeister <> - 0:3.07-0.fdr.4
- Make separate packages for labltk, camlp4, ocamldoc, emacs and documentation

* Thu Nov 27 2003 Gerard Milmeister <> - 0:3.07-0.fdr.2
- Changed license tag
- Register info files
- New Patch

* Fri Oct 31 2003 Gerard Milmeister <> - 0:3.07-0.fdr.1
- First Fedora release

* Mon Oct 13 2003 Axel Thimm <>
- Updated to 3.07.

* Wed Apr  9 2003 Axel Thimm <>
- Rebuilt for Red Hat 9.

* Tue Nov 26 2002 Axel Thimm <>
- Added %{_mandir}/mano/* entry