Fix registration bug and endianness issues.
[fedora-mingw.git] / libvirt / mingw32-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-libvirt
8 Version:        0.4.6
9 Release:        6%{?dist}%{?extra_release}
10 Summary:        MinGW Windows libvirt virtualization library
11
12 License:        LGPLv2+
13 Group:          Development/Libraries
14 URL:            http://libvirt.org/
15 Source0:        ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 Patch0:         mingw32-libvirt-0.4.6-debug-registration.patch
19 Patch1:         mingw32-libvirt-0.4.6-register-remote.patch
20
21 BuildRequires:  mingw32-filesystem >= 23
22 BuildRequires:  mingw32-gcc
23 BuildRequires:  mingw32-binutils
24 BuildRequires:  mingw32-libgpg-error
25 BuildRequires:  mingw32-libgcrypt
26 BuildRequires:  mingw32-gnutls
27 BuildRequires:  mingw32-gettext
28 BuildRequires:  mingw32-libxml2
29 # Portable XDR <= 4.0.10 contains a serious endianness bug on Windows.
30 BuildRequires:  mingw32-portablexdr >= 4.0.11
31 BuildRequires:  mingw32-readline
32 BuildRequires:  pkgconfig
33 # Need native version for msgfmt
34 BuildRequires:  gettext
35
36 BuildArch:      noarch
37
38
39 %description
40 MinGW Windows libvirt virtualization library.
41
42
43 %prep
44 %setup -q -n libvirt-%{version}
45 %patch0 -p1
46 %patch1 -p1
47
48
49 %build
50 # XXX enable SASL in future
51 %{_mingw32_configure} \
52   --without-sasl \
53   --without-avahi \
54   --without-polkit \
55   --without-python \
56   --without-xen \
57   --without-qemu \
58   --without-lxc \
59   --without-openvz \
60   --without-libvirtd
61 make
62
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 make DESTDIR=$RPM_BUILD_ROOT install
68
69 rm -rf $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/libvirt
70 rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/doc/*
71 rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/*
72
73 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt.a
74
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79
80 %files
81 %defattr(-,root,root)
82 %{_mingw32_bindir}/libvirt-0.dll
83 %{_mingw32_bindir}/virsh.exe
84
85 %{_mingw32_libdir}/libvirt.dll.a
86 %{_mingw32_libdir}/libvirt.la
87 %{_mingw32_libdir}/pkgconfig/libvirt.pc
88
89 %{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
90
91 %dir %{_mingw32_includedir}/libvirt
92 %{_mingw32_includedir}/libvirt/libvirt.h
93 %{_mingw32_includedir}/libvirt/virterror.h
94
95 %{_mingw32_mandir}/man1/virsh.1*
96
97
98 %changelog
99 * Wed Oct 15 2008 Richard Jones <rjones@redhat.com> - 0.4.6-6
100 - Add patches from
101   https://www.redhat.com/archives/libvir-list/2008-October/msg00328.html
102 - BR mingw32-portablexdr >= 4.0.11 to fix serious Windows endianness bug.
103
104 * Tue Oct 14 2008 Richard Jones <rjones@redhat.com> - 0.4.6-4
105 - +BR mingw32-readline.
106
107 * Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 0.4.6-3
108 - BuildArch should be noarch
109
110 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.6-2
111 - Whitespace removal.
112
113 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.6-1
114 - New upstream release 0.4.6.
115 - Rename mingw -> mingw32.
116
117 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.5-4%{?extra_release}
118 - Import crash fix from rawhide
119
120 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.5-3%{?extra_release}
121 - Add dep on gettext & pkgconfig
122
123 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.5-2
124 - Remove static lib.
125
126 * Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.4-1
127 - Initial RPM release, largely based on earlier work from several sources.