boost/ocaml/python - all NON-WORKING at the moment.
[fedora-mingw.git] / ocaml / mingw32-ocaml.spec
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}
6
7 Name:           mingw32-ocaml
8 Version:        3.11.0+beta1
9 Release:        1%{?dist}
10 Summary:        Objective Caml MinGW cross-compiler and programming environment
11
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)
17
18 BuildArch:      noarch
19
20 BuildRequires:  mingw32-filesystem >= 30
21 BuildRequires:  mingw32-gcc
22 BuildRequires:  mingw32-binutils
23
24
25 %description
26 Objective Caml is a high-level, strongly-typed, functional and
27 object-oriented programming language from the ML family of languages.
28
29 This package is an OCaml cross-compiler which runs natively on Fedora
30 and produces Windows native executables.
31
32
33 %prep
34 %setup -q -n ocaml-%{version}
35
36
37 %build
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.
43
44 CFLAGS="$RPM_OPT_FLAGS" \
45 ./configure \
46   -bindir %{_bindir} \
47   -libdir %{_libdir}/ocaml \
48   -x11lib %{_libdir} \
49   -x11include %{_includedir} \
50   -mandir %{_mandir}/man1
51
52 cp config/m-nt.h config/m.h
53
54 make world bootstrap opt opt.opt
55
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 make DESTDIR=$RPM_BUILD_ROOT install
60
61 # Remove static libraries but DON'T remove *.dll.a files.
62 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
63
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68
69 %files
70 %defattr(-,root,root)
71 %{_mingw32_bindir}/foo.dll
72 %{_mingw32_libdir}/foo.dll.a
73 # etc.
74
75
76 %changelog
77 * Fri Oct 24 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11.0+beta1-1
78 - Initial RPM release.