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