qemu: Validate spapr-vio addresses
[libvirt/ericb.git] / mingw-libvirt.spec.in
blob9add033669a16a46966c8816b1b5f23005264295
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-avahi \
171 --without-polkit \
172 --without-libvirtd \
173 %{?_without_phyp} \
174 %{?_without_esx} \
175 %{?_without_hyperv} \
176 --without-vmware \
177 --without-parallels \
178 --without-netcf \
179 --without-audit \
180 --without-dtrace \
181 --enable-expensive-tests
183 %mingw_make %{?_smp_mflags}
186 %install
187 %mingw_make_install "DESTDIR=$RPM_BUILD_ROOT"
189 # Libtool files don't need to be bundled
190 find $RPM_BUILD_ROOT -name "*.la" -delete
192 rm -rf $RPM_BUILD_ROOT%{mingw32_sysconfdir}/libvirt/nwfilter
193 rm -rf $RPM_BUILD_ROOT%{mingw64_sysconfdir}/libvirt/nwfilter
194 rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/doc/*
195 rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/doc/*
196 rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/*
197 rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/*
199 rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt_iohelper.exe
200 rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt_iohelper.exe
201 rm -rf $RPM_BUILD_ROOT%{mingw32_libexecdir}/libvirt-guests.sh
202 rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
205 # Mingw32
206 %files -n mingw32-libvirt
207 %dir %{mingw32_sysconfdir}/libvirt/
208 %config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt.conf
209 %config(noreplace) %{mingw32_sysconfdir}/libvirt/libvirt-admin.conf
211 %{mingw32_bindir}/libvirt-0.dll
212 %{mingw32_bindir}/virsh.exe
213 %{mingw32_bindir}/virt-admin.exe
214 %{mingw32_bindir}/virt-xml-validate
215 %{mingw32_bindir}/virt-pki-validate
216 %{mingw32_bindir}/libvirt-lxc-0.dll
217 %{mingw32_bindir}/libvirt-qemu-0.dll
218 %{mingw32_bindir}/libvirt-admin-0.dll
220 %{mingw32_libdir}/libvirt.dll.a
221 %{mingw32_libdir}/pkgconfig/libvirt.pc
222 %{mingw32_libdir}/pkgconfig/libvirt-qemu.pc
223 %{mingw32_libdir}/pkgconfig/libvirt-lxc.pc
224 %{mingw32_libdir}/pkgconfig/libvirt-admin.pc
225 %{mingw32_libdir}/libvirt-lxc.dll.a
226 %{mingw32_libdir}/libvirt-qemu.dll.a
227 %{mingw32_libdir}/libvirt-admin.dll.a
229 %dir %{mingw32_datadir}/libvirt/
230 %dir %{mingw32_datadir}/libvirt/schemas/
231 %{mingw32_datadir}/libvirt/schemas/basictypes.rng
232 %{mingw32_datadir}/libvirt/schemas/capability.rng
233 %{mingw32_datadir}/libvirt/schemas/cputypes.rng
234 %{mingw32_datadir}/libvirt/schemas/domain.rng
235 %{mingw32_datadir}/libvirt/schemas/domaincaps.rng
236 %{mingw32_datadir}/libvirt/schemas/domaincommon.rng
237 %{mingw32_datadir}/libvirt/schemas/domainsnapshot.rng
238 %{mingw32_datadir}/libvirt/schemas/interface.rng
239 %{mingw32_datadir}/libvirt/schemas/network.rng
240 %{mingw32_datadir}/libvirt/schemas/networkcommon.rng
241 %{mingw32_datadir}/libvirt/schemas/nodedev.rng
242 %{mingw32_datadir}/libvirt/schemas/nwfilter.rng
243 %{mingw32_datadir}/libvirt/schemas/nwfilter_params.rng
244 %{mingw32_datadir}/libvirt/schemas/nwfilterbinding.rng
245 %{mingw32_datadir}/libvirt/schemas/secret.rng
246 %{mingw32_datadir}/libvirt/schemas/storagecommon.rng
247 %{mingw32_datadir}/libvirt/schemas/storagepool.rng
248 %{mingw32_datadir}/libvirt/schemas/storagepoolcaps.rng
249 %{mingw32_datadir}/libvirt/schemas/storagevol.rng
250 %dir %{mingw32_datadir}/libvirt/api/
251 %{mingw32_datadir}/libvirt/api/libvirt-api.xml
252 %{mingw32_datadir}/libvirt/api/libvirt-lxc-api.xml
253 %{mingw32_datadir}/libvirt/api/libvirt-qemu-api.xml
254 %{mingw32_datadir}/libvirt/api/libvirt-admin-api.xml
256 %{mingw32_datadir}/libvirt/cpu_map/*.xml
258 %{mingw32_datadir}/libvirt/test-screenshot.png
260 %{mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
262 %dir %{mingw32_includedir}/libvirt
263 %{mingw32_includedir}/libvirt/libvirt.h
264 %{mingw32_includedir}/libvirt/libvirt-common.h
265 %{mingw32_includedir}/libvirt/libvirt-domain.h
266 %{mingw32_includedir}/libvirt/libvirt-domain-snapshot.h
267 %{mingw32_includedir}/libvirt/libvirt-event.h
268 %{mingw32_includedir}/libvirt/libvirt-host.h
269 %{mingw32_includedir}/libvirt/libvirt-interface.h
270 %{mingw32_includedir}/libvirt/libvirt-network.h
271 %{mingw32_includedir}/libvirt/libvirt-nodedev.h
272 %{mingw32_includedir}/libvirt/libvirt-nwfilter.h
273 %{mingw32_includedir}/libvirt/libvirt-secret.h
274 %{mingw32_includedir}/libvirt/libvirt-storage.h
275 %{mingw32_includedir}/libvirt/libvirt-stream.h
276 %{mingw32_includedir}/libvirt/virterror.h
277 %{mingw32_includedir}/libvirt/libvirt-lxc.h
278 %{mingw32_includedir}/libvirt/libvirt-qemu.h
279 %{mingw32_includedir}/libvirt/libvirt-admin.h
281 %{mingw32_mandir}/man1/virsh.1*
282 %{mingw32_mandir}/man1/virt-admin.1*
283 %{mingw32_mandir}/man1/virt-xml-validate.1*
284 %{mingw32_mandir}/man1/virt-pki-validate.1*
285 %{mingw32_mandir}/man7/virkey*.7*
287 %files -n mingw32-libvirt-static
288 %{mingw32_libdir}/libvirt.a
289 %{mingw32_libdir}/libvirt-lxc.a
290 %{mingw32_libdir}/libvirt-qemu.a
291 %{mingw32_libdir}/libvirt-admin.a
293 # Mingw64
294 %files -n mingw64-libvirt
295 %dir %{mingw64_sysconfdir}/libvirt/
296 %config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt.conf
297 %config(noreplace) %{mingw64_sysconfdir}/libvirt/libvirt-admin.conf
299 %{mingw64_bindir}/libvirt-0.dll
300 %{mingw64_bindir}/virsh.exe
301 %{mingw64_bindir}/virt-admin.exe
302 %{mingw64_bindir}/virt-xml-validate
303 %{mingw64_bindir}/virt-pki-validate
304 %{mingw64_bindir}/libvirt-lxc-0.dll
305 %{mingw64_bindir}/libvirt-qemu-0.dll
306 %{mingw64_bindir}/libvirt-admin-0.dll
308 %{mingw64_libdir}/libvirt.dll.a
309 %{mingw64_libdir}/pkgconfig/libvirt.pc
310 %{mingw64_libdir}/pkgconfig/libvirt-qemu.pc
311 %{mingw64_libdir}/pkgconfig/libvirt-lxc.pc
312 %{mingw64_libdir}/pkgconfig/libvirt-admin.pc
313 %{mingw64_libdir}/libvirt-lxc.dll.a
314 %{mingw64_libdir}/libvirt-qemu.dll.a
315 %{mingw64_libdir}/libvirt-admin.dll.a
317 %dir %{mingw64_datadir}/libvirt/
318 %dir %{mingw64_datadir}/libvirt/schemas/
319 %{mingw64_datadir}/libvirt/schemas/basictypes.rng
320 %{mingw64_datadir}/libvirt/schemas/capability.rng
321 %{mingw64_datadir}/libvirt/schemas/cputypes.rng
322 %{mingw64_datadir}/libvirt/schemas/domain.rng
323 %{mingw64_datadir}/libvirt/schemas/domaincaps.rng
324 %{mingw64_datadir}/libvirt/schemas/domaincommon.rng
325 %{mingw64_datadir}/libvirt/schemas/domainsnapshot.rng
326 %{mingw64_datadir}/libvirt/schemas/interface.rng
327 %{mingw64_datadir}/libvirt/schemas/network.rng
328 %{mingw64_datadir}/libvirt/schemas/networkcommon.rng
329 %{mingw64_datadir}/libvirt/schemas/nodedev.rng
330 %{mingw64_datadir}/libvirt/schemas/nwfilter.rng
331 %{mingw64_datadir}/libvirt/schemas/nwfilter_params.rng
332 %{mingw64_datadir}/libvirt/schemas/nwfilterbinding.rng
333 %{mingw64_datadir}/libvirt/schemas/secret.rng
334 %{mingw64_datadir}/libvirt/schemas/storagecommon.rng
335 %{mingw64_datadir}/libvirt/schemas/storagepool.rng
336 %{mingw64_datadir}/libvirt/schemas/storagepoolcaps.rng
337 %{mingw64_datadir}/libvirt/schemas/storagevol.rng
338 %dir %{mingw64_datadir}/libvirt/api/
339 %{mingw64_datadir}/libvirt/api/libvirt-api.xml
340 %{mingw64_datadir}/libvirt/api/libvirt-lxc-api.xml
341 %{mingw64_datadir}/libvirt/api/libvirt-qemu-api.xml
342 %{mingw64_datadir}/libvirt/api/libvirt-admin-api.xml
344 %{mingw64_datadir}/libvirt/cpu_map/*.xml
346 %{mingw64_datadir}/libvirt/test-screenshot.png
348 %{mingw64_datadir}/locale/*/LC_MESSAGES/libvirt.mo
350 %dir %{mingw64_includedir}/libvirt
351 %{mingw64_includedir}/libvirt/libvirt.h
352 %{mingw64_includedir}/libvirt/libvirt-common.h
353 %{mingw64_includedir}/libvirt/libvirt-domain.h
354 %{mingw64_includedir}/libvirt/libvirt-domain-snapshot.h
355 %{mingw64_includedir}/libvirt/libvirt-event.h
356 %{mingw64_includedir}/libvirt/libvirt-host.h
357 %{mingw64_includedir}/libvirt/libvirt-interface.h
358 %{mingw64_includedir}/libvirt/libvirt-network.h
359 %{mingw64_includedir}/libvirt/libvirt-nodedev.h
360 %{mingw64_includedir}/libvirt/libvirt-nwfilter.h
361 %{mingw64_includedir}/libvirt/libvirt-secret.h
362 %{mingw64_includedir}/libvirt/libvirt-storage.h
363 %{mingw64_includedir}/libvirt/libvirt-stream.h
364 %{mingw64_includedir}/libvirt/virterror.h
365 %{mingw64_includedir}/libvirt/libvirt-lxc.h
366 %{mingw64_includedir}/libvirt/libvirt-qemu.h
367 %{mingw64_includedir}/libvirt/libvirt-admin.h
369 %{mingw64_mandir}/man1/virsh.1*
370 %{mingw64_mandir}/man1/virt-admin.1*
371 %{mingw64_mandir}/man1/virt-xml-validate.1*
372 %{mingw64_mandir}/man1/virt-pki-validate.1*
373 %{mingw64_mandir}/man7/virkey*.7*
375 %files -n mingw64-libvirt-static
376 %{mingw64_libdir}/libvirt.a
377 %{mingw64_libdir}/libvirt-lxc.a
378 %{mingw64_libdir}/libvirt-qemu.a
379 %{mingw64_libdir}/libvirt-admin.a
382 %changelog