forked from virt-manager/virt-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
virt-manager.spec.in
212 lines (156 loc) · 5.14 KB
/
virt-manager.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# -*- rpm-spec -*-
%define with_guestfs 0
%define stable_defaults 0
%define askpass_package "openssh-askpass"
%define qemu_user "qemu"
%define libvirt_packages "libvirt-daemon-kvm,libvirt-daemon-config-network"
%define kvm_packages ""
%define preferred_distros "fedora,rhel"
%define default_hvs "qemu,xen"
%if 0%{?rhel}
%define preferred_distros "rhel,fedora"
%define stable_defaults 1
%endif
# End local config
Name: virt-manager
Version: @VERSION@
Release: 1%{?dist}
%define verrel %{version}-%{release}
Summary: Virtual Machine Manager
Group: Applications/Emulators
License: GPLv2+
URL: http://virt-manager.org/
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
BuildArch: noarch
Requires: virt-manager-common = %{verrel}
Requires: pygobject3
Requires: gtk3
Requires: libvirt-glib >= 0.0.9
Requires: libxml2-python
Requires: vte3
Requires: dconf
Requires: dbus-x11
# For console widget
Requires: gtk-vnc2
Requires: spice-gtk3
%if 0%{?rhel} == 7
Requires: gnome-icon-theme
%endif
BuildRequires: python
BuildRequires: intltool
BuildRequires: /usr/bin/pod2man
%description
Virtual Machine Manager provides a graphical tool for administering virtual
machines for KVM, Xen, and LXC. 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 common
Summary: Common files used by the different Virtual Machine Manager interfaces
Group: Applications/Emulators
# This version not strictly required: virt-manager should work with older,
# however varying amounts of functionality will not be enabled.
Requires: libvirt-python >= 0.7.0
Requires: libxml2-python
Requires: python-urlgrabber
Requires: python-ipaddr
Requires: libosinfo >= 0.2.10
# Required for gobject-introspection infrastructure
Requires: pygobject3-base
%description common
Common files used by the different virt-manager interfaces, as well as
virt-install related tools.
%package -n virt-install
Summary: Utilities for installing virtual machines
Requires: virt-manager-common = %{verrel}
Provides: virt-install
Provides: virt-clone
Provides: virt-convert
Provides: virt-xml
Obsoletes: python-virtinst
%description -n virt-install
Package includes several command line utilities, including virt-install
(build and install new VMs) and virt-clone (clone an existing virtual
machine).
%prep
%setup -q
%build
%if %{qemu_user}
%define _qemu_user --qemu-user=%{qemu_user}
%endif
%if %{kvm_packages}
%define _kvm_packages --kvm-package-names=%{kvm_packages}
%endif
%if %{preferred_distros}
%define _preferred_distros --preferred-distros=%{preferred_distros}
%endif
%if %{libvirt_packages}
%define _libvirt_packages --libvirt-package-names=%{libvirt_packages}
%endif
%if %{askpass_package}
%define _askpass_package --askpass-package-names=%{askpass_package}
%endif
%if %{stable_defaults}
%define _stable_defaults --stable-defaults
%endif
%if %{default_hvs}
%define _default_hvs --default-hvs %{default_hvs}
%endif
python setup.py configure \
%{?_qemu_user} \
%{?_kvm_packages} \
%{?_libvirt_packages} \
%{?_askpass_package} \
%{?_preferred_distros} \
%{?_stable_defaults} \
%{?_default_hvs}
%install
python setup.py install -O1 --root=%{buildroot}
%find_lang %{name}
# The conversion script was only added to virt-manager after several
# Fedora cycles of using gsettings. Installing it now could convert old data
# and wipe out recent settings.
rm %{buildroot}%{_datadir}/GConf/gsettings/org.virt-manager.virt-manager.convert
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-desktop-database &> /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 || :
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%files
%doc README COPYING NEWS
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_datadir}/%{name}/ui/*.ui
%{_datadir}/%{name}/virt-manager
%{_datadir}/%{name}/virtManager
%{_datadir}/%{name}/icons
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.xml
%files common -f %{name}.lang
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/virtcli
%{_datadir}/%{name}/virtconv
%{_datadir}/%{name}/virtinst
%files -n virt-install
%{_mandir}/man1/virt-install.1*
%{_mandir}/man1/virt-clone.1*
%{_mandir}/man1/virt-convert.1*
%{_mandir}/man1/virt-xml.1*
%{_datadir}/%{name}/virt-install
%{_datadir}/%{name}/virt-clone
%{_datadir}/%{name}/virt-convert
%{_datadir}/%{name}/virt-xml
%{_bindir}/virt-install
%{_bindir}/virt-clone
%{_bindir}/virt-convert
%{_bindir}/virt-xml