backup: Wire up qemu full pull backup commands over QMP
[libvirt/ericb.git] / mingw-libvirt.spec.in
bloba56fca45fd22f59fd49aaae22aeca2b46874a7ce
1 %{?mingw_package_header}
3 # This spec file assumes you are building on a Fedora version
4 # that's still supported by the vendor. It may work on other distros
5 # or versions, but no effort will be made to ensure that going forward.
6 %define min_fedora 29
8 %if 0%{?fedora} && 0%{?fedora} >= %{min_fedora}
9 %define supported_platform 1
10 %else
11 %define supported_platform 0
12 %endif
14 # Default to skipping autoreconf. Distros can change just this one line
15 # (or provide a command-line override) if they backport any patches that
16 # touch configure.ac or Makefile.am.
17 %{!?enable_autotools:%define enable_autotools 0}
19 # The mingw build is client only. Set up defaults for hypervisor drivers
20 # that talk via a native remote protocol, and for which prereq mingw
21 # libraries exist.
22 %define with_phyp 0%{!?_without_phyp:1}
23 %define with_esx 0%{!?_without_esx:1}
24 # missing libwsman, so can't build hyper-v
25 %define with_hyperv 0%{!?_without_hyperv:0}
26 %define with_xenapi 0%{!?_without_xenapi:1}
27 %define with_vz 0%{!?_without_vz:0}
29 # RHEL ships ESX but not PowerHypervisor, HyperV, or libxenserver (xenapi)
30 %if 0%{?rhel}
31 %define with_phyp 0
32 %define with_xenapi 0
33 %define with_hyperv 0
34 %endif
36 Name: mingw-libvirt
37 Version: @VERSION@
38 Release: 1%{?dist}
39 Summary: MinGW Windows libvirt virtualization library
41 License: LGPLv2+
42 URL: https://libvirt.org/
44 %if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
45 %define mainturl stable_updates/
46 %endif
47 Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
49 BuildRequires: mingw32-filesystem >= 95
50 BuildRequires: mingw64-filesystem >= 95
51 BuildRequires: mingw32-gcc
52 BuildRequires: mingw64-gcc
53 BuildRequires: mingw32-binutils
54 BuildRequires: mingw64-binutils
55 BuildRequires: mingw32-libgpg-error
56 BuildRequires: mingw64-libgpg-error
57 BuildRequires: mingw32-libgcrypt
58 BuildRequires: mingw64-libgcrypt
59 BuildRequires: mingw32-gnutls
60 BuildRequires: mingw64-gnutls
61 BuildRequires: mingw32-gettext
62 BuildRequires: mingw64-gettext
63 BuildRequires: mingw32-libxml2
64 BuildRequires: mingw64-libxml2
65 BuildRequires: mingw32-portablexdr
66 BuildRequires: mingw64-portablexdr
67 BuildRequires: mingw32-dlfcn
68 BuildRequires: mingw64-dlfcn
70 BuildRequires: pkgconfig
71 # Need native version for msgfmt
72 BuildRequires: gettext
73 BuildRequires: libxslt
74 BuildRequires: python3
75 BuildRequires: perl-interpreter
76 BuildRequires: perl(Getopt::Long)
77 %if 0%{?enable_autotools}
78 BuildRequires: autoconf
79 BuildRequires: automake
80 BuildRequires: gettext-devel
81 BuildRequires: libtool
82 %endif
84 BuildRequires: mingw32-libssh2
85 BuildRequires: mingw64-libssh2
86 %if %{with_esx}
87 BuildRequires: mingw32-curl
88 BuildRequires: mingw64-curl
89 %endif
91 BuildArch: noarch
93 %description
94 MinGW Windows libvirt virtualization library.
96 # Mingw32
97 %package -n mingw32-libvirt
98 Summary: %{summary}
100 %description -n mingw32-libvirt
101 MinGW Windows libvirt virtualization library.
103 %package -n mingw32-libvirt-static
104 Summary: %{summary}
105 Requires: mingw32-libvirt = %{version}-%{release}
107 %description -n mingw32-libvirt-static
108 MinGW Windows libvirt virtualization library, static version.
110 # Mingw64
111 %package -n mingw64-libvirt
112 Summary: %{summary}
114 %description -n mingw64-libvirt
115 MinGW Windows libvirt virtualization library.
117 %package -n mingw64-libvirt-static
118 Summary: %{summary}
119 Requires: mingw64-libvirt = %{version}-%{release}
121 %description -n mingw64-libvirt-static
122 MinGW Windows libvirt virtualization library, static version.
124 %{?mingw_debug_package}
127 %prep
128 %setup -q -n libvirt-%{version}
130 %build
131 %if ! %{supported_platform}
132 echo "This RPM requires Fedora >= %{min_fedora}"
133 exit 1
134 %endif
136 %if ! %{with_phyp}
137 %define _without_phyp --without-phyp
138 %endif
140 %if ! %{with_esx}
141 %define _without_esx --without-esx
142 %endif
144 %if ! %{with_hyperv}
145 %define _without_hyperv --without-hyperv
146 %endif
148 %if ! %{with_xenapi}
149 %define _without_xenapi --without-xenapi
150 %endif
152 %if ! %{with_vz}
153 %define _without_vz --without-vz
154 %endif
156 %if 0%{?enable_autotools}
157 autoreconf -if
158 %endif
160 # XXX enable SASL in future
161 %mingw_configure \
162 --enable-static \
163 --without-xen \
164 --without-qemu \
165 --without-openvz \
166 --without-lxc \
167 --without-vbox \
168 %{?_without_xenapi} \
169 --without-sasl \
170 --without-polkit \
171 --without-libvirtd \
172 %{?_without_phyp} \
173 %{?_without_esx} \
174 %{?_without_hyperv} \
175 --without-vmware \
176 --without-parallels \
177 --without-netcf \
178 --without-audit \
179 --without-dtrace \
180 --enable-expensive-tests
182 %mingw_make %{?_smp_mflags}
185 %install
186 %mingw_make_install "DESTDIR=$RPM_BUILD_ROOT"
188 # Libtool files don't need to be bundled
189 find $RPM_BUILD_ROOT -name "*.la" -delete
191 rm -rf $RPM_BUILD_ROOT%{mingw32_sysconfdir}/libvirt/nwfilter
192 rm -rf $RPM_BUILD_ROOT%{mingw64_sysconfdir}/libvirt/nwfilter
193 rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/doc/*
194 rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/doc/*
195 rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/*
196 rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/*
198 rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt_iohelper.exe
199 rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt_iohelper.exe
200 rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt-guests.sh
201 rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
204 # Mingw32
205 %files -n mingw32-libvirt
206 %dir %{mingw32_sysconfdir}/libvirt/
207 %config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt.conf
208 %config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt-admin.conf
210 %{mingw32_bindir}/libvirt-0.dll
211 %{mingw32_bindir}/virsh.exe
212 %{mingw32_bindir}/virt-admin.exe
213 %{mingw32_bindir}/virt-xml-validate
214 %{mingw32_bindir}/virt-pki-validate
215 %{mingw32_bindir}/libvirt-lxc-0.dll
216 %{mingw32_bindir}/libvirt-qemu-0.dll
217 %{mingw32_bindir}/libvirt-admin-0.dll
219 %{mingw32_libdir}/libvirt.dll.a
220 %{mingw32_libdir}/pkgconfig/libvirt.pc
221 %{mingw32_libdir}/pkgconfig/libvirt-qemu.pc
222 %{mingw32_libdir}/pkgconfig/libvirt-lxc.pc
223 %{mingw32_libdir}/pkgconfig/libvirt-admin.pc
224 %{mingw32_libdir}/libvirt-lxc.dll.a
225 %{mingw32_libdir}/libvirt-qemu.dll.a
226 %{mingw32_libdir}/libvirt-admin.dll.a
228 %dir %{mingw32_datadir}/libvirt/
229 %dir %{mingw32_datadir}/libvirt/schemas/
230 %{mingw32_datadir}/libvirt/schemas/basictypes.rng
231 %{mingw32_datadir}/libvirt/schemas/capability.rng
232 %{mingw32_datadir}/libvirt/schemas/cputypes.rng
233 %{mingw32_datadir}/libvirt/schemas/domain.rng
234 %{mingw32_datadir}/libvirt/schemas/domainbackup.rng
235 %{mingw32_datadir}/libvirt/schemas/domaincaps.rng
236 %{mingw32_datadir}/libvirt/schemas/domaincheckpoint.rng
237 %{mingw32_datadir}/libvirt/schemas/domaincommon.rng
238 %{mingw32_datadir}/libvirt/schemas/domainsnapshot.rng
239 %{mingw32_datadir}/libvirt/schemas/interface.rng
240 %{mingw32_datadir}/libvirt/schemas/network.rng
241 %{mingw32_datadir}/libvirt/schemas/networkcommon.rng
242 %{mingw32_datadir}/libvirt/schemas/networkport.rng
243 %{mingw32_datadir}/libvirt/schemas/nodedev.rng
244 %{mingw32_datadir}/libvirt/schemas/nwfilter.rng
245 %{mingw32_datadir}/libvirt/schemas/nwfilter_params.rng
246 %{mingw32_datadir}/libvirt/schemas/nwfilterbinding.rng
247 %{mingw32_datadir}/libvirt/schemas/secret.rng
248 %{mingw32_datadir}/libvirt/schemas/storagecommon.rng
249 %{mingw32_datadir}/libvirt/schemas/storagepool.rng
250 %{mingw32_datadir}/libvirt/schemas/storagepoolcaps.rng
251 %{mingw32_datadir}/libvirt/schemas/storagevol.rng
252 %dir %{mingw32_datadir}/libvirt/api/
253 %{mingw32_datadir}/libvirt/api/libvirt-api.xml
254 %{mingw32_datadir}/libvirt/api/libvirt-lxc-api.xml
255 %{mingw32_datadir}/libvirt/api/libvirt-qemu-api.xml
256 %{mingw32_datadir}/libvirt/api/libvirt-admin-api.xml
258 %{mingw32_datadir}/libvirt/cpu_map/*.xml
260 %{mingw32_datadir}/libvirt/test-screenshot.png
262 %{mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
264 %dir %{mingw32_includedir}/libvirt
265 %{mingw32_includedir}/libvirt/libvirt.h
266 %{mingw32_includedir}/libvirt/libvirt-common.h
267 %{mingw32_includedir}/libvirt/libvirt-domain.h
268 %{mingw32_includedir}/libvirt/libvirt-domain-checkpoint.h
269 %{mingw32_includedir}/libvirt/libvirt-domain-snapshot.h
270 %{mingw32_includedir}/libvirt/libvirt-event.h
271 %{mingw32_includedir}/libvirt/libvirt-host.h
272 %{mingw32_includedir}/libvirt/libvirt-interface.h
273 %{mingw32_includedir}/libvirt/libvirt-network.h
274 %{mingw32_includedir}/libvirt/libvirt-nodedev.h
275 %{mingw32_includedir}/libvirt/libvirt-nwfilter.h
276 %{mingw32_includedir}/libvirt/libvirt-secret.h
277 %{mingw32_includedir}/libvirt/libvirt-storage.h
278 %{mingw32_includedir}/libvirt/libvirt-stream.h
279 %{mingw32_includedir}/libvirt/virterror.h
280 %{mingw32_includedir}/libvirt/libvirt-lxc.h
281 %{mingw32_includedir}/libvirt/libvirt-qemu.h
282 %{mingw32_includedir}/libvirt/libvirt-admin.h
284 %{mingw32_mandir}/man1/virsh.1*
285 %{mingw32_mandir}/man1/virt-admin.1*
286 %{mingw32_mandir}/man1/virt-xml-validate.1*
287 %{mingw32_mandir}/man1/virt-pki-validate.1*
288 %{mingw32_mandir}/man7/virkey*.7*
290 %files -n mingw32-libvirt-static
291 %{mingw32_libdir}/libvirt.a
292 %{mingw32_libdir}/libvirt-lxc.a
293 %{mingw32_libdir}/libvirt-qemu.a
294 %{mingw32_libdir}/libvirt-admin.a
296 # Mingw64
297 %files -n mingw64-libvirt
298 %dir %{mingw64_sysconfdir}/libvirt/
299 %config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt.conf
300 %config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt-admin.conf
302 %{mingw64_bindir}/libvirt-0.dll
303 %{mingw64_bindir}/virsh.exe
304 %{mingw64_bindir}/virt-admin.exe
305 %{mingw64_bindir}/virt-xml-validate
306 %{mingw64_bindir}/virt-pki-validate
307 %{mingw64_bindir}/libvirt-lxc-0.dll
308 %{mingw64_bindir}/libvirt-qemu-0.dll
309 %{mingw64_bindir}/libvirt-admin-0.dll
311 %{mingw64_libdir}/libvirt.dll.a
312 %{mingw64_libdir}/pkgconfig/libvirt.pc
313 %{mingw64_libdir}/pkgconfig/libvirt-qemu.pc
314 %{mingw64_libdir}/pkgconfig/libvirt-lxc.pc
315 %{mingw64_libdir}/pkgconfig/libvirt-admin.pc
316 %{mingw64_libdir}/libvirt-lxc.dll.a
317 %{mingw64_libdir}/libvirt-qemu.dll.a
318 %{mingw64_libdir}/libvirt-admin.dll.a
320 %dir %{mingw64_datadir}/libvirt/
321 %dir %{mingw64_datadir}/libvirt/schemas/
322 %{mingw64_datadir}/libvirt/schemas/basictypes.rng
323 %{mingw64_datadir}/libvirt/schemas/capability.rng
324 %{mingw64_datadir}/libvirt/schemas/cputypes.rng
325 %{mingw64_datadir}/libvirt/schemas/domain.rng
326 %{mingw64_datadir}/libvirt/schemas/domainbackup.rng
327 %{mingw64_datadir}/libvirt/schemas/domaincaps.rng
328 %{mingw64_datadir}/libvirt/schemas/domaincheckpoint.rng
329 %{mingw64_datadir}/libvirt/schemas/domaincommon.rng
330 %{mingw64_datadir}/libvirt/schemas/domainsnapshot.rng
331 %{mingw64_datadir}/libvirt/schemas/interface.rng
332 %{mingw64_datadir}/libvirt/schemas/network.rng
333 %{mingw64_datadir}/libvirt/schemas/networkcommon.rng
334 %{mingw64_datadir}/libvirt/schemas/networkport.rng
335 %{mingw64_datadir}/libvirt/schemas/nodedev.rng
336 %{mingw64_datadir}/libvirt/schemas/nwfilter.rng
337 %{mingw64_datadir}/libvirt/schemas/nwfilter_params.rng
338 %{mingw64_datadir}/libvirt/schemas/nwfilterbinding.rng
339 %{mingw64_datadir}/libvirt/schemas/secret.rng
340 %{mingw64_datadir}/libvirt/schemas/storagecommon.rng
341 %{mingw64_datadir}/libvirt/schemas/storagepool.rng
342 %{mingw64_datadir}/libvirt/schemas/storagepoolcaps.rng
343 %{mingw64_datadir}/libvirt/schemas/storagevol.rng
344 %dir %{mingw64_datadir}/libvirt/api/
345 %{mingw64_datadir}/libvirt/api/libvirt-api.xml
346 %{mingw64_datadir}/libvirt/api/libvirt-lxc-api.xml
347 %{mingw64_datadir}/libvirt/api/libvirt-qemu-api.xml
348 %{mingw64_datadir}/libvirt/api/libvirt-admin-api.xml
350 %{mingw64_datadir}/libvirt/cpu_map/*.xml
352 %{mingw64_datadir}/libvirt/test-screenshot.png
354 %{mingw64_datadir}/locale/*/LC_MESSAGES/libvirt.mo
356 %dir %{mingw64_includedir}/libvirt
357 %{mingw64_includedir}/libvirt/libvirt.h
358 %{mingw64_includedir}/libvirt/libvirt-common.h
359 %{mingw64_includedir}/libvirt/libvirt-domain.h
360 %{mingw64_includedir}/libvirt/libvirt-domain-checkpoint.h
361 %{mingw64_includedir}/libvirt/libvirt-domain-snapshot.h
362 %{mingw64_includedir}/libvirt/libvirt-event.h
363 %{mingw64_includedir}/libvirt/libvirt-host.h
364 %{mingw64_includedir}/libvirt/libvirt-interface.h
365 %{mingw64_includedir}/libvirt/libvirt-network.h
366 %{mingw64_includedir}/libvirt/libvirt-nodedev.h
367 %{mingw64_includedir}/libvirt/libvirt-nwfilter.h
368 %{mingw64_includedir}/libvirt/libvirt-secret.h
369 %{mingw64_includedir}/libvirt/libvirt-storage.h
370 %{mingw64_includedir}/libvirt/libvirt-stream.h
371 %{mingw64_includedir}/libvirt/virterror.h
372 %{mingw64_includedir}/libvirt/libvirt-lxc.h
373 %{mingw64_includedir}/libvirt/libvirt-qemu.h
374 %{mingw64_includedir}/libvirt/libvirt-admin.h
376 %{mingw64_mandir}/man1/virsh.1*
377 %{mingw64_mandir}/man1/virt-admin.1*
378 %{mingw64_mandir}/man1/virt-xml-validate.1*
379 %{mingw64_mandir}/man1/virt-pki-validate.1*
380 %{mingw64_mandir}/man7/virkey*.7*
382 %files -n mingw64-libvirt-static
383 %{mingw64_libdir}/libvirt.a
384 %{mingw64_libdir}/libvirt-lxc.a
385 %{mingw64_libdir}/libvirt-qemu.a
386 %{mingw64_libdir}/libvirt-admin.a
389 %changelog