#
# Conditional build:
%bcond_without sdl # SDL UI and audio support
+%bcond_without gl # Don't require gl deps
%bcond_without ceph # Ceph/RBD support
%bcond_without glusterfs # GlusterFS backend
%bcond_without rdma # RDMA-based migration support
Summary(pl.UTF-8): QEMU - emulator procesora
Name: qemu
Version: 2.6.0
-Release: 1
+Release: 2
License: GPL v2
Group: Applications/Emulators
Source0: http://wiki.qemu-project.org/download/%{name}-%{version}.tar.bz2
Patch5: libjpeg-boolean.patch
Patch6: x32.patch
Patch7: %{name}-sh.patch
-# Proof of concept, for reference, do not remove
-Patch400: %{name}-kde_virtual_workspaces_hack.patch
URL: http://www.qemu-project.org/
-BuildRequires: OpenGL-devel
-BuildRequires: OpenGL-GLX-devel
+%{?with_gl:BuildRequires: OpenGL-GLX-devel}
+%{?with_gl:BuildRequires: OpenGL-devel}
%{?with_sdl:BuildRequires: SDL2-devel >= 2.0}
BuildRequires: alsa-lib-devel
BuildRequires: bcc >= 0.16.21-2
%{?with_smartcard:BuildRequires: libcacard-devel}
BuildRequires: libcap-devel
BuildRequires: libcap-ng-devel
-BuildRequires: libepoxy-devel
+%{?with_gl:BuildRequires: libepoxy-devel}
BuildRequires: libfdt-devel
%{?with_rdma:BuildRequires: libibverbs-devel}
%{?with_iscsi:BuildRequires: libiscsi-devel >= 1.9.0}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{systemdunitdir},/usr/lib/binfmt.d} \
- $RPM_BUILD_ROOT/etc/{sysconfig,udev/rules.d,modules-load.d} \
+ $RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d} \
$RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}}
%{__make} install \
%{!?with_smartcard:CONFIG_USB_SMARTCARD=n} \
DESTDIR=$RPM_BUILD_ROOT
+echo "#allow br0" > $RPM_BUILD_ROOT/etc/qemu/bridge.conf
+
install -d $RPM_BUILD_ROOT%{_sysconfdir}
cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
#!/bin/sh
%config(noreplace) %verify(not md5 mtime size) /etc/ksmtuned.conf
%config(noreplace) %verify(not md5 mtime size) /etc/sasl/qemu.conf
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ksm
+%dir /etc/qemu
+%attr(640,root,qemu) %config(noreplace) %verify(not md5 mtime size) /etc/qemu/bridge.conf
%{systemdunitdir}/ksm.service
%{systemdunitdir}/ksmtuned.service
%attr(755,root,root) %{_bindir}/ivshmem-client