Avoid some tail-recursion problem in flexdll.
[fedora-mingw.git] / ocaml-libvirt / mingw32-ocaml-libvirt.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-libvirt
8 Version:        0.4.4.2
9 Release:        1%{?dist}
10 Summary:        MinGW Windows port of OCaml binding for libvirt
11
12 License:        LGPLv2+
13 Group:          Development/Libraries
14
15 URL:            http://libvirt.org/ocaml/
16 Source0:        http://libvirt.org/sources/ocaml/ocaml-libvirt-%{version}.tar.gz
17
18 Patch1000:      mingw32-ocaml-libvirt-0.4.4.2-build.patch
19
20 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
21 BuildArch:      noarch
22
23 BuildRequires:  mingw32-filesystem >= 35
24 BuildRequires:  mingw32-gcc
25 BuildRequires:  mingw32-binutils
26 BuildRequires:  mingw32-ocaml >= 3.11.0+beta1-13
27 BuildRequires:  mingw32-ocaml-findlib
28 BuildRequires:  mingw32-libvirt >= 0.2.1
29 BuildRequires:  perl
30 BuildRequires:  gawk
31 BuildRequires:  autoconf, automake, libtool
32
33
34 %description
35 OCaml binding for libvirt.
36
37
38 %prep
39 %setup -q -n ocaml-libvirt-%{version}
40
41 %patch1000 -p1
42
43 autoreconf
44
45
46 %build
47 # Avoid some tail-recursion problem in flexdll.
48 ulimit -s unlimited
49
50 export OCAMLFIND_CONF=%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
51 %{_mingw32_configure}
52 make OCAMLMKLIB=%{_mingw32_target}-ocamlmklib opt
53
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57
58 export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
59 export DESTDIR=$RPM_BUILD_ROOT
60 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
61
62 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
63
64 #make install-opt
65 pushd libvirt
66 ocamlfind install -ldconf ignore libvirt ../META *.a *.cmx *.cmxa *.cmi *.mli
67 popd
68 pushd mlvirsh
69 make install-opt
70 popd
71
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76
77 %files
78 %defattr(-,root,root)
79 %{_mingw32_bindir}/mlvirsh
80 %{_libdir}/%{_mingw32_target}-ocaml/libvirt/
81
82
83 %changelog
84 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.4.2-1
85 - Initial RPM release.