1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
10 Summary: Objective Caml MinGW cross-compiler and programming environment
12 License: QPL and (LGPLv2+ with exceptions)
13 Group: Development/Libraries
14 URL: http://caml.inria.fr/
15 Source0: http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-%{version}.tar.bz2
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20 BuildRequires: mingw32-filesystem >= 30
21 BuildRequires: mingw32-gcc
22 BuildRequires: mingw32-binutils
26 Objective Caml is a high-level, strongly-typed, functional and
27 object-oriented programming language from the ML family of languages.
29 This package is an OCaml cross-compiler which runs natively on Fedora
30 and produces Windows native executables.
34 %setup -q -n ocaml-%{version}
38 # Remember that we're _not_ cross-compiling OCaml itself, we're trying
39 # to build a Fedora native OCaml compiler (ocamlopt) which just has
40 # the back-end part modified to generate Windows binaries. So we
41 # build as normal on a Unix system, but we make sure that ocamlopt
42 # will use the Windows codegen and the MinGW assembler and linker.
44 CFLAGS="$RPM_OPT_FLAGS" \
47 -libdir %{_libdir}/ocaml \
49 -x11include %{_includedir} \
50 -mandir %{_mandir}/man1
52 cp config/m-nt.h config/m.h
54 make world bootstrap opt opt.opt
58 rm -rf $RPM_BUILD_ROOT
59 make DESTDIR=$RPM_BUILD_ROOT install
61 # Remove static libraries but DON'T remove *.dll.a files.
62 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
66 rm -rf $RPM_BUILD_ROOT
71 %{_mingw32_bindir}/foo.dll
72 %{_mingw32_libdir}/foo.dll.a
77 * Fri Oct 24 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11.0+beta1-1
78 - Initial RPM release.