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