building: fix deps error when some drivers are not built

libvirt-daemon-driver-XXX should be a dependency only when with_driver_modules
is 1.
libvirt-daemon-driver-libxl should be a dependency only when with_libxl is 1.
libvirt-daemon-driver-lxc should be a dependency only when with_lxc is 1.
libvirt-daemon-driver-qemu should be a dependency only when with_qemu is 1.
libvirt-daemon-driver-uml should be a dependency only when with_uml is 1.
libvirt-daemon-driver-xen should be a dependency only when with_xen is 1.
This commit is contained in:
Wen Congyang 2012-07-23 17:58:28 +08:00
parent e537a31637
commit 95738b3f0d
1 changed files with 16 additions and 0 deletions

View File

@ -326,11 +326,22 @@ Requires: libvirt-daemon-config-network = %{version}-%{release}
%if %{with_nwfilter}
Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
%endif
%if %{with_driver_modules}
%if %{with_libxl}
Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
%endif
%if %{with_lxc}
Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
%endif
%if %{with_qemu}
Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
%endif
%if %{with_uml}
Requires: libvirt-daemon-driver-uml = %{version}-%{release}
%endif
%if %{with_xen}
Requires: libvirt-daemon-driver-xen = %{version}-%{release}
%endif
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
@ -339,6 +350,7 @@ Requires: libvirt-daemon-driver-network = %{version}-%{release}
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
%endif
%endif
Requires: libvirt-client = %{version}-%{release}
# All build-time requirements. Run-time requirements are
@ -750,7 +762,9 @@ Summary: Qemu driver plugin for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
# There really is a hard cross-driver dependency here
%if %{with_driver_modules}
Requires: libvirt-daemon-driver-network = %{version}-%{release}
%endif
%description daemon-driver-qemu
The qemu driver plugin for the libvirtd daemon, providing
@ -765,7 +779,9 @@ Summary: LXC driver plugin for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
# There really is a hard cross-driver dependency here
%if %{with_driver_modules}
Requires: libvirt-daemon-driver-network = %{version}-%{release}
%endif
%description daemon-driver-lxc
The LXC driver plugin for the libvirtd daemon, providing