]>
Commit | Line | Data |
---|---|---|
94462445 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with xen # xen | |
4 | %bcond_without xen_proxy # Xen proxy | |
5 | %bcond_without qemu # Qemu | |
4e034fd2 | 6 | %bcond_without polkit # PolicyKit |
94462445 ER |
7 | %bcond_with lokkit # Lokkit |
8 | ||
9 | # Xen is available only on i386 x86_64 ia64 | |
10 | %ifnarch %{ix86} %{x8664} ia64 | |
11 | %undefine with_xen | |
12 | %endif | |
13 | %ifarch i386 i486 i586 | |
14 | %undefine with_xen | |
15 | %endif | |
16 | ||
17 | %if %{without xen} | |
18 | %undefine with_xen_proxy | |
19 | %endif | |
20 | ||
21 | %ifnarch %{ix86} %{x8664} ppc | |
22 | %undefine with_qemu | |
23 | %endif | |
24 | ||
25 | Summary: Toolkit to interact with virtualization capabilities | |
26 | Name: libvirt | |
e4177f0c AM |
27 | Version: 0.8.8 |
28 | Release: 1 | |
94462445 ER |
29 | License: LGPL |
30 | Group: Base/Kernel | |
31 | URL: http://www.libvirt.org/ | |
32 | Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz | |
e4177f0c | 33 | # Source0-md5: ac9235576352b84b8cb17df7456bbdfc |
e285e5e5 | 34 | Source1: %{name}.init |
4e034fd2 | 35 | Patch0: gcrypt.patch |
69187f5d | 36 | %{?with_lokkit:BuildRequires: /usr/sbin/lokkit} |
37 | %{?with_polkit:BuildRequires: PolicyKit >= 0.6} | |
94462445 | 38 | %{?with_polkit:BuildRequires: PolicyKit-devel >= 0.6} |
fa080175 | 39 | BuildRequires: augeas-devel |
69187f5d | 40 | BuildRequires: autoconf |
41 | BuildRequires: automake | |
4e034fd2 | 42 | BuildRequires: avahi-devel >= 0.6.0 |
4e034fd2 | 43 | BuildRequires: curl-devel >= 7.18.0 |
69187f5d | 44 | BuildRequires: cyrus-sasl-devel |
4e034fd2 | 45 | BuildRequires: device-mapper-devel >= 1.0.0 |
69187f5d | 46 | BuildRequires: gettext-devel |
4e034fd2 | 47 | BuildRequires: gnutls-devel >= 1.0.25 |
69187f5d | 48 | BuildRequires: libapparmor-devel |
49 | BuildRequires: libcap-ng-devel | |
e4177f0c | 50 | BuildRequires: libnl1-devel |
fa080175 | 51 | BuildRequires: libpcap-devel |
94462445 | 52 | BuildRequires: libselinux-devel |
69187f5d | 53 | BuildRequires: libstdc++-devel |
54 | BuildRequires: libtool | |
4e034fd2 | 55 | BuildRequires: libxml2-devel >= 2.6.0 |
fa080175 | 56 | BuildRequires: libxslt-devel |
57 | BuildRequires: openldap-devel | |
94462445 | 58 | BuildRequires: ncurses-devel |
fa080175 | 59 | BuildRequires: netcf-devel >= 0.1.4 |
69187f5d | 60 | BuildRequires: numactl-devel |
61 | BuildRequires: perl-tools-pod | |
62 | BuildRequires: pkgconfig | |
94462445 ER |
63 | BuildRequires: python-devel |
64 | BuildRequires: readline-devel | |
69187f5d | 65 | BuildRequires: rpm-pythonprov |
fa080175 | 66 | BuildRequires: sqlite3-devel |
69187f5d | 67 | BuildRequires: udev-devel >= 145 |
94462445 ER |
68 | # For mount/umount in FS driver |
69 | BuildRequires: util-linux | |
98574323 | 70 | %{?with_xen:BuildRequires: xen-devel >= 3.0.4} |
94462445 ER |
71 | # For ISCSI driver |
72 | BuildRequires: open-iscsi | |
73 | # For disk driver | |
4e034fd2 | 74 | BuildRequires: parted-devel >= 1.8.0 |
94462445 ER |
75 | BuildRequires: python |
76 | BuildRequires: python-devel | |
94462445 | 77 | BuildRequires: readline-devel |
69187f5d | 78 | BuildRequires: xmlrpc-c-devel |
79 | BuildRequires: xorg-lib-libpciaccess-devel | |
94462445 ER |
80 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
81 | ||
82 | # libxenstore is not versionned properly | |
83 | %define _noautoreq devel(libxenstore.*) | |
84 | ||
85 | %description | |
86 | Libvirt is a C toolkit to interact with the virtualization | |
87 | capabilities of recent versions of Linux. | |
88 | ||
89 | Virtualization of the Linux Operating System means the ability to run | |
90 | multiple instances of Operating Systems concurently on a single | |
91 | hardware system where the basic resources are driven by a Linux | |
92 | instance. The library aim at providing long term stable C API | |
93 | initially for the Xen paravirtualization but should be able to | |
94 | integrate other virtualization mechanisms if needed. | |
95 | ||
96 | %package devel | |
97 | Summary: Development tools for programs using libvirt | |
98 | Group: Development/Libraries | |
99 | Requires: %{name} = %{version}-%{release} | |
100 | %{?with_xen:Requires: xen-devel} | |
101 | ||
102 | %description devel | |
103 | Libvirt is a C toolkit to interact with the virtualization | |
104 | capabilities of recent versions of Linux. | |
105 | ||
106 | This package contains the header files and libraries needed for | |
107 | developing programs using the libvirt library. | |
108 | ||
109 | %package static | |
110 | Summary: Development static libraries for programs using libvirt | |
111 | Group: Development/Libraries | |
112 | ||
113 | %description static | |
114 | Libvirt is a C toolkit to interact with the virtualization | |
115 | capabilities of recent versions of Linux. | |
116 | ||
117 | This package contains the static libraries needed for developing | |
118 | programs using the libvirt library. | |
119 | ||
120 | %package -n python-%{name} | |
121 | Summary: Python bindings to interact with virtualization capabilities | |
122 | Group: Development/Languages/Python | |
123 | Requires: %{name} = %{version}-%{release} | |
124 | ||
125 | %description -n python-%{name} | |
126 | Libvirt is a C toolkit to interact with the virtualization | |
127 | capabilities of recent versions of Linux. | |
128 | ||
129 | This package contains the Python bindings for the libvirt library. | |
130 | ||
131 | %package utils | |
132 | Summary: Tools to interact with virtualization capabilities | |
133 | Group: Base/Kernel | |
134 | Requires: %{name} = %{version}-%{release} | |
7131199b | 135 | Requires: iptables |
624d0ccc | 136 | Suggests: bridge-utils |
137 | Suggests: dnsmasq | |
138 | Suggests: lvm2 | |
94462445 ER |
139 | |
140 | %description utils | |
141 | Libvirt is a C toolkit to interact with the virtualization | |
142 | capabilities of recent versions of Linux. | |
143 | ||
144 | This package contains tools for the libvirt library. | |
145 | ||
146 | %prep | |
147 | %setup -q | |
fa080175 | 148 | #%patch0 -p1 |
2c74cc69 AG |
149 | # weird translations |
150 | rm -f po/{my,eu_ES}.{po,gmo} | |
94462445 ER |
151 | |
152 | %build | |
4e034fd2 AF |
153 | %{__libtoolize} |
154 | %{__aclocal} -I gnulib/m4 -I m4 | |
155 | %{__autoheader} | |
156 | %{__autoconf} | |
157 | %{__automake} | |
158 | ||
fa080175 | 159 | |
4e034fd2 AF |
160 | %configure \ |
161 | --disable-silent-rules \ | |
624d0ccc | 162 | --x-libraries=%{_libdir} \ |
94462445 ER |
163 | %{!?with_xen:--without-xen} \ |
164 | %{!?with_qemu:--without-qemu} \ | |
165 | --with-init-script=redhat \ | |
624d0ccc | 166 | --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \ |
167 | --with-storage-lvm \ | |
4e034fd2 AF |
168 | --without-hal \ |
169 | --with-udev \ | |
624d0ccc | 170 | PVCREATE=/sbin/pvcreate \ |
171 | VGCREATE=/sbin/vgcreate \ | |
172 | LVCREATE=/sbin/lvcreate \ | |
173 | PVREMOVE=/sbin/pvremove \ | |
174 | VGREMOVE=/sbin/vgremove \ | |
175 | LVREMOVE=/sbin/lvremove \ | |
176 | VGCHANGE=/sbin/vgchange \ | |
177 | VGSCAN=/sbin/vgscan \ | |
178 | PVS=/sbin/pvs \ | |
179 | VGS=/sbin/vgs \ | |
180 | LVS=/sbin/lvs \ | |
181 | BRCTL=/sbin/brctl \ | |
182 | SHOWMOUNT=/usr/sbin/showmount | |
94462445 | 183 | |
bff35f54 | 184 | %{__make} AWK=gawk |
94462445 ER |
185 | |
186 | %install | |
187 | rm -rf $RPM_BUILD_ROOT | |
188 | %{__make} install \ | |
189 | DESTDIR=$RPM_BUILD_ROOT | |
190 | ||
e285e5e5 SP |
191 | install -d $RPM_BUILD_ROOT/etc/sysconfig |
192 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
193 | ||
feec3441 | 194 | #install qemud/libvirtd.sysconf $RPM_BUILD_ROOT/etc/sysconfig/libvirtd |
e285e5e5 SP |
195 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd |
196 | ||
94462445 ER |
197 | %find_lang %{name} |
198 | ||
199 | %clean | |
200 | rm -rf $RPM_BUILD_ROOT | |
201 | ||
202 | %post -p /sbin/ldconfig | |
203 | %postun -p /sbin/ldconfig | |
204 | ||
205 | %files -f %{name}.lang | |
206 | %defattr(644,root,root,755) | |
207 | %doc ChangeLog README TODO NEWS | |
e4177f0c | 208 | %attr(755,root,root) %{_libdir}/%{name}*.so.* |
8c29141c | 209 | %attr(755,root,root) %{_libdir}/libvirt_lxc |
4e034fd2 | 210 | %{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy} |
feec3441 | 211 | %{_datadir}/libvirt/schemas/capability.rng |
212 | %{_datadir}/libvirt/schemas/domain.rng | |
fa080175 | 213 | %{_datadir}/libvirt/schemas/domainsnapshot.rng |
feec3441 | 214 | %{_datadir}/libvirt/schemas/interface.rng |
215 | %{_datadir}/libvirt/schemas/network.rng | |
216 | %{_datadir}/libvirt/schemas/nodedev.rng | |
4e034fd2 | 217 | %{_datadir}/libvirt/schemas/nwfilter.rng |
feec3441 | 218 | %{_datadir}/libvirt/schemas/secret.rng |
219 | %{_datadir}/libvirt/schemas/storageencryption.rng | |
220 | %{_datadir}/libvirt/schemas/storagepool.rng | |
221 | %{_datadir}/libvirt/schemas/storagevol.rng | |
3ac3cd0c | 222 | |
94462445 ER |
223 | %files devel |
224 | %defattr(644,root,root,755) | |
225 | %doc %{_docdir}/%{name}-%{version} | |
226 | %doc %{_datadir}/gtk-doc/html/%{name} | |
227 | %dir %{_includedir}/%{name} | |
228 | %{_includedir}/%{name}/*.h | |
e4177f0c AM |
229 | %{_libdir}/%{name}*.so |
230 | %{_libdir}/%{name}*.la | |
94462445 ER |
231 | %{_pkgconfigdir}/%{name}.pc |
232 | ||
233 | %files static | |
234 | %defattr(644,root,root,755) | |
235 | %{_libdir}/%{name}.a | |
236 | ||
237 | %files -n python-%{name} | |
238 | %defattr(644,root,root,755) | |
239 | %doc %{_docdir}/%{name}-python-%{version} | |
240 | %{py_sitedir}/libvirt.py | |
94462445 ER |
241 | %{py_sitedir}/libvirtmod.la |
242 | %{py_sitedir}/libvirtmod.so | |
243 | ||
244 | %files utils | |
245 | %defattr(644,root,root,755) | |
246 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt | |
3ac3cd0c | 247 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl2/libvirt.conf |
94462445 ER |
248 | %attr(755,root,root) %{_bindir}/virsh |
249 | %attr(755,root,root) %{_sbindir}/libvirtd | |
e285e5e5 | 250 | %attr(754,root,root) /etc/rc.d/init.d/libvirtd |
fa080175 | 251 | %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests |
3ac3cd0c | 252 | %attr(755,root,root) %{_bindir}/virt-xml-validate |
feec3441 | 253 | %attr(755,root,root) %{_bindir}/virt-pki-validate |
e285e5e5 | 254 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd |
fa080175 | 255 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests |
4e034fd2 AF |
256 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.lxc |
257 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu | |
258 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.uml | |
94462445 | 259 | %{_libdir}/libvirt_parthelper |
fa080175 | 260 | %{_libdir}/virt-aa-helper |
94462445 | 261 | %{_mandir}/man1/virsh.1* |
3ac3cd0c | 262 | %{_mandir}/man1/virt-xml-validate.1* |
feec3441 | 263 | %{_mandir}/man1/virt-pki-validate.1* |
e4177f0c | 264 | %{_mandir}/man8/libvirtd.8* |
feec3441 | 265 | %{_datadir}/%{name}/*.xml |
fa080175 | 266 | %{_datadir}/augeas/lenses/*.aug |
267 | %{_datadir}/augeas/lenses/tests/*.aug | |
7131199b | 268 | %dir /var/run/libvirt |
d5a575f6 | 269 | %dir /var/lib/libvirt |