%global binname virt-manager %bcond_without qt4 %bcond_without qt5 Name: qt-%{binname} Version: 0.16.38 Release: 3%{?dist} Summary: Qt Virtual Machine Manager License: GPLv2+ URL: https://github.com/F1ash/%{name} Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch0: %{name}-binary-suffix.patch Requires: hicolor-icon-theme Requires: libvirt %if %with qt4 Requires: qtermwidget >= 0.6.0-2 %endif %if %with qt5 Requires: qtermwidget-qt5 >= 0.6.0-2 %endif # for use qemu-kvm (more useful) Requires: qemu-kvm Requires: libvirt-daemon-driver-qemu # for use SPICE viewer # spice-server exist in libvirt-daemon-driver-qemu Requires in Fedora #Requires: spice-server Requires: spice-vdagent # for scrubbing (optional) Requires: scrub # for ssh-transported remote connections (optional) Requires: nc6 # for use WebDAV shared directory (optional) Requires: spice-webdavd %if %with qt4 BuildRequires: qt4-devel BuildRequires: qtermwidget-devel >= 0.6.0-2 %endif %if %with qt5 BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtsvg-devel BuildRequires: qtermwidget-qt5-devel >= 0.6.0-2 %endif BuildRequires: libvirt-devel BuildRequires: glibc-headers BuildRequires: desktop-file-utils BuildRequires: cmake BuildRequires: glib2-devel BuildRequires: spice-protocol BuildRequires: spice-glib-devel BuildRequires: libcacard-devel # Fedora requires of libcacard-devel #BuildRequires: nspr-devel #BuildRequires: nss-devel #BuildRequires: nss-softokn-devel #BuildRequires: nss-softokn-freebl-devel #BuildRequires: nss-util-devel %description Qt Virtual Machine Manager provides a graphical tool for administering virtual machines for QEMU/KVM, Xen, and LXC and other Virtual Entities. Start, stop, add or remove virtual devices, connect to a graphical or serial console, and see resource usage statistics for existing VMs on local or remote machines. Uses libvirt as the backend management API. %package -n %{binname}-qt4 Summary: Qt4 Virtual Machine Manager %description -n %{binname}-qt4 Qt Virtual Machine Manager provides a graphical tool for administering virtual machines for QEMU/KVM, Xen, and LXC and other Virtual Entities. Start, stop, add or remove virtual devices, connect to a graphical or serial console, and see resource usage statistics for existing VMs on local or remote machines. Uses libvirt as the backend management API. %package -n %{binname}-qt5 Summary: Qt5 Virtual Machine Manager %description -n %{binname}-qt5 Qt Virtual Machine Manager provides a graphical tool for administering virtual machines for QEMU/KVM, Xen, and LXC and other Virtual Entities. Start, stop, add or remove virtual devices, connect to a graphical or serial console, and see resource usage statistics for existing VMs on local or remote machines. Uses libvirt as the backend management API. %prep %setup -qn%{name}-%{version} # use suffix instead of prefix %patch0 %build %if %with qt4 mkdir qt4 pushd qt4 %cmake .. %{make_build} popd %endif %if %with qt5 mkdir qt5 pushd qt5 %cmake -DBUILD_QT_VERSION=5 .. %{make_build} popd %endif %install %if %with qt4 pushd qt4 %{make_install} popd %endif %if %with qt5 pushd qt5 %{make_install} popd %endif %check %if %with qt4 desktop-file-validate %{buildroot}/%{_datadir}/applications/%{binname}-qt4.desktop %endif %if %with qt5 desktop-file-validate %{buildroot}/%{_datadir}/applications/%{binname}-qt5.desktop %endif %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %if %with qt4 %files -n %{binname}-qt4 %license LICENSE %doc README.md Licenses Changelog %{_bindir}/%{binname}-qt4 %{_datadir}/applications/%{binname}-qt4.desktop %{_datadir}/%{binname}-qt4 %{_datadir}/icons/hicolor/256x256/apps/virtual-engineering.png %endif %if %with qt5 %files -n %{binname}-qt5 %license LICENSE %doc README.md Licenses Changelog %{_bindir}/%{binname}-qt5 %{_datadir}/applications/%{binname}-qt5.desktop %{_datadir}/%{binname}-qt5 %{_datadir}/icons/hicolor/256x256/apps/virtual-engineering.png %endif %changelog * Mon Oct 12 2015 Raphael Groner - 0.16.38-3 - rename sub packages * Mon Oct 12 2015 Raphael Groner - 0.16.38-2 - adjust for review, based on upstream's proposal - use suffixed binaries * Sun Sep 20 2015 Fl@sh - 0.16.38-1 - improved spec for using SPICE, Qemu/KVM, ssh connections; - version updated; * Tue Jun 23 2015 Fl@sh - 0.12.28-1 - version updated; * Wed May 13 2015 Fl@sh - 0.10.25-1 - changed %%files for desktop icon; - version updated; * Thu Apr 23 2015 Fl@sh - 0.10.21-1 - version updated; - clear %%changelog;