a21ee7b9e7a78db3b8189827016a3ff1158072ae
[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:        8%{?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 # All of these patches are upstream after 0.4.6.
19 Patch0:         mingw32-libvirt-0.4.6-debug-registration.patch
20 Patch1:         mingw32-libvirt-0.4.6-register-remote.patch
21 Patch2:         mingw32-libvirt-0.4.6-win-icon.patch
22 Source1:        libvirt_win_icon_16x16.ico
23 Source2:        libvirt_win_icon_32x32.ico
24 Source3:        libvirt_win_icon_48x48.ico
25 Source4:        libvirt_win_icon_64x64.ico
26
27 BuildRequires:  mingw32-filesystem >= 23
28 BuildRequires:  mingw32-gcc
29 BuildRequires:  mingw32-binutils
30 BuildRequires:  mingw32-libgpg-error
31 BuildRequires:  mingw32-libgcrypt
32 BuildRequires:  mingw32-gnutls
33 BuildRequires:  mingw32-gettext
34 BuildRequires:  mingw32-libxml2
35 # Portable XDR <= 4.0.10 contains a serious endianness bug on Windows.
36 BuildRequires:  mingw32-portablexdr >= 4.0.11
37 BuildRequires:  mingw32-readline
38 BuildRequires:  mingw32-termcap >= 1.3.1-3
39 BuildRequires:  pkgconfig
40
41 # Need native version for msgfmt
42 BuildRequires:  gettext
43
44 # For autoreconf.
45 BuildRequires:  autoconf, automake, libtool
46
47 BuildArch:      noarch
48
49
50 %description
51 MinGW Windows libvirt virtualization library.
52
53
54 %prep
55 %setup -q -n libvirt-%{version}
56 %patch0 -p1
57 %patch1 -p1
58 %patch2 -p0
59 cp %{SOURCE1} src/
60 cp %{SOURCE2} src/
61 cp %{SOURCE3} src/
62 cp %{SOURCE4} src/
63 autoreconf
64
65
66 %build
67 # XXX enable SASL in future
68 %{_mingw32_configure} \
69   --without-sasl \
70   --without-avahi \
71   --without-polkit \
72   --without-python \
73   --without-xen \
74   --without-qemu \
75   --without-lxc \
76   --without-openvz \
77   --without-libvirtd
78 make
79
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 make DESTDIR=$RPM_BUILD_ROOT install
85
86 rm -rf $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/libvirt
87 rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/doc/*
88 rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/*
89
90 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libvirt.a
91
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96
97 %files
98 %defattr(-,root,root)
99 %{_mingw32_bindir}/libvirt-0.dll
100 %{_mingw32_bindir}/virsh.exe
101
102 %{_mingw32_libdir}/libvirt.dll.a
103 %{_mingw32_libdir}/libvirt.la
104 %{_mingw32_libdir}/pkgconfig/libvirt.pc
105
106 %{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
107
108 %dir %{_mingw32_includedir}/libvirt
109 %{_mingw32_includedir}/libvirt/libvirt.h
110 %{_mingw32_includedir}/libvirt/virterror.h
111
112 %{_mingw32_mandir}/man1/virsh.1*
113
114
115 %changelog
116 * Fri Oct 31 2008 Richard Jones <rjones@redhat.com> - 0.4.6-8
117 - Rebuild against latest termcap.
118
119 * Thu Oct 16 2008 Richard Jones <rjones@redhat.com> - 0.4.6-7
120 - Windows icon patch from
121   https://www.redhat.com/archives/libvir-list/2008-October/msg00331.html
122
123 * Wed Oct 15 2008 Richard Jones <rjones@redhat.com> - 0.4.6-6
124 - Add patches from
125   https://www.redhat.com/archives/libvir-list/2008-October/msg00328.html
126 - BR mingw32-portablexdr >= 4.0.11 to fix serious Windows endianness bug.
127
128 * Tue Oct 14 2008 Richard Jones <rjones@redhat.com> - 0.4.6-4
129 - +BR mingw32-readline.
130
131 * Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 0.4.6-3
132 - BuildArch should be noarch
133
134 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.6-2
135 - Whitespace removal.
136
137 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.6-1
138 - New upstream release 0.4.6.
139 - Rename mingw -> mingw32.
140
141 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.5-4%{?extra_release}
142 - Import crash fix from rawhide
143
144 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.5-3%{?extra_release}
145 - Add dep on gettext & pkgconfig
146
147 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 0.4.5-2
148 - Remove static lib.
149
150 * Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 0.4.4-1
151 - Initial RPM release, largely based on earlier work from several sources.