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