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 \
54 # ./configure creates the following files:
55 # config/Makefile - containing mainly paths and names of build tools
56 # config/m.h - containing the machine description
57 # config/s.h - containing the environment / API description
59 # Overwrite the generated m.h & s.h with the ones from Windows NT.
60 cp config/m-nt.h config/m.h
61 cp config/s-nt.h config/s.h
63 make world bootstrap opt opt.opt
67 rm -rf $RPM_BUILD_ROOT
68 make DESTDIR=$RPM_BUILD_ROOT install
70 # Remove static libraries but DON'T remove *.dll.a files.
71 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
75 rm -rf $RPM_BUILD_ROOT
80 %{_mingw32_bindir}/foo.dll
81 %{_mingw32_libdir}/foo.dll.a
86 * Fri Nov 14 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11.0+beta1-1
87 - Initial RPM release.