a7ae3847aac99c7a7a33714cab70f5497495d4e2
[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 export OCAMLFIND_CONF=%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
48 %{_mingw32_configure}
49 make OCAMLMKLIB=%{_mingw32_target}-ocamlmklib opt
50
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54
55 export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
56 export DESTDIR=$RPM_BUILD_ROOT
57 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
58
59 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
60
61 #make install-opt
62 pushd libvirt
63 ocamlfind install -ldconf ignore libvirt ../META *.a *.cmx *.cmxa *.cmi *.mli
64 popd
65 pushd mlvirsh
66 make install-opt
67 popd
68
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73
74 %files
75 %defattr(-,root,root)
76 %{_mingw32_bindir}/mlvirsh
77 %{_libdir}/%{_mingw32_target}-ocaml/libvirt/
78
79
80 %changelog
81 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.4.2-1
82 - Initial RPM release.