ocaml-libvirt package.
[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-libvirt >= 0.2.1
28 BuildRequires:  perl
29 BuildRequires:  gawk
30 BuildRequires:  autoconf, automake, libtool
31
32
33 %description
34 OCaml binding for libvirt.
35
36
37 %prep
38 %setup -q -n ocaml-libvirt-%{version}
39
40 %patch1000 -p1
41
42 autoreconf
43
44
45 %build
46 export OCAMLFIND_CONF=%{_sysconfdir}/%{_mingw32_target}-ocamlfind.conf
47 %{_mingw32_configure}
48 make OCAMLMKLIB=%{_mingw32_target}-ocamlmklib opt
49
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53
54 export OCAMLFIND_CONF=/etc/i686-pc-mingw32-ocamlfind.conf
55 export DESTDIR=$RPM_BUILD_ROOT
56 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/%{_mingw32_target}-ocaml
57
58 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
59
60 #make install-opt
61 pushd libvirt
62 ocamlfind install -ldconf ignore libvirt ../META *.a *.cmx *.cmxa *.cmi *.mli
63 popd
64 pushd mlvirsh
65 make install-opt
66 popd
67
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72
73 %files
74 %defattr(-,root,root)
75 %{_mingw32_bindir}/mlvirsh
76 %{_libdir}/%{_mingw32_target}-ocaml/libvirt/
77
78
79 %changelog
80 * Sun Nov 16 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.4.2-1
81 - Initial RPM release.