]> git.pld-linux.org Git - packages/libvirt.git/blob - libvirt.spec
- -devel deps
[packages/libvirt.git] / libvirt.spec
1 # openwsman (>= 2.2.3), sanlock, xenapi (libxenserver), xenlight (libxenlight)?
2 # --with-driver-modules ?
3 #
4 # Conditional build:
5 %bcond_with     xen             # xen
6 %bcond_without  xen_proxy       # Xen proxy
7 %bcond_without  qemu            # Qemu
8 %bcond_without  polkit          # PolicyKit
9 %bcond_with     netcf           # host interfaces support
10
11 # qemu available only on x86 and ppc
12 %ifnarch %{ix86} %{x8664} ppc
13 %undefine       with_qemu
14 %endif
15 # Xen is available only on i686 x86_64 ia64
16 %ifnarch %{ix86} %{x8664} ia64
17 %undefine       with_xen
18 %endif
19 %ifarch i386 i486 i586
20 %undefine       with_xen
21 %endif
22 %if %{without xen}
23 %undefine       with_xen_proxy
24 %endif
25
26 Summary:        Toolkit to interact with virtualization capabilities
27 Summary(pl.UTF-8):      Narzędzia współpracujące z funkcjami wirtualizacji
28 Name:           libvirt
29 Version:        0.9.6
30 Release:        1
31 License:        LGPL v2.1+
32 Group:          Base/Kernel
33 Source0:        ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz
34 # Source0-md5:  b74df374b524d00a22a6c89cfc23099f
35 Source1:        %{name}.init
36 Patch0:         %{name}-sasl.patch
37 URL:            http://www.libvirt.org/
38 BuildRequires:  audit-libs-devel
39 BuildRequires:  augeas-devel
40 BuildRequires:  autoconf >= 2.50
41 BuildRequires:  automake
42 BuildRequires:  avahi-devel >= 0.6.0
43 BuildRequires:  curl-devel >= 7.18.0
44 BuildRequires:  cyrus-sasl-devel
45 BuildRequires:  device-mapper-devel >= 1.0.0
46 BuildRequires:  gettext-devel >= 0.17
47 BuildRequires:  gnutls-devel >= 1.0.25
48 BuildRequires:  libapparmor-devel
49 BuildRequires:  libblkid-devel >= 2.17
50 BuildRequires:  libcap-ng-devel >= 0.4.0
51 BuildRequires:  libgcrypt-devel
52 BuildRequires:  libnl1-devel >= 1.1
53 BuildRequires:  libpcap-devel >= 1.0.0
54 BuildRequires:  libselinux-devel >= 2.0.82
55 BuildRequires:  libssh2-devel >= 1.0
56 BuildRequires:  libstdc++-devel
57 BuildRequires:  libtool
58 BuildRequires:  libxml2-devel >= 1:2.6.0
59 BuildRequires:  libxslt-devel
60 BuildRequires:  openldap-devel
61 BuildRequires:  ncurses-devel
62 %{?with_netcf:BuildRequires:    netcf-devel >= 0.1.4}
63 BuildRequires:  numactl-devel
64 BuildRequires:  parted-devel >= 1.8.0
65 BuildRequires:  perl-tools-pod
66 %{?with_polkit:BuildRequires:   polkit >= 0.90}
67 BuildRequires:  pkgconfig
68 BuildRequires:  python
69 BuildRequires:  python-devel
70 BuildRequires:  readline-devel
71 BuildRequires:  rpm-pythonprov
72 BuildRequires:  rpmbuild(macros) >= 1.219
73 BuildRequires:  udev-devel >= 145
74 %{?with_xen:BuildRequires:      xen-devel >= 3.0.4}
75 # For disk driver
76 BuildRequires:  xorg-lib-libpciaccess-devel >= 0.10.0
77 BuildRequires:  yajl-devel
78 Requires:       curl-libs >= 7.18.0
79 Requires:       device-mapper >= 1.0.0
80 Requires:       gnutls >= 1.0.25
81 Requires:       libcap-ng >= 0.4.0
82 Requires:       libnl1 >= 1.1
83 Requires:       libpcap >= 1.0.0
84 Requires:       libselinux >= 2.0.82
85 Requires:       libssh2 >= 1.0
86 Requires:       libxml2 >= 1:2.6.0
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 # libxenstore is not versionned properly
90 %define         _noautoreq      devel(libxenstore.*)
91
92 %description
93 Libvirt is a C toolkit to interact with the virtualization
94 capabilities of recent versions of Linux.
95
96 Virtualization of the Linux Operating System means the ability to run
97 multiple instances of Operating Systems concurently on a single
98 hardware system where the basic resources are driven by a Linux
99 instance. The library aim at providing long term stable C API
100 initially for the Xen paravirtualization but should be able to
101 integrate other virtualization mechanisms if needed.
102
103 %description -l pl.UTF-8
104 Libvirt to zestaw narzędzi w C do współpracy z funkcjami
105 wirtualizacji obecnych wersji Linuksa.
106
107 Wirtualizacja w systemie operacyjnym Linux oznacza możliwość
108 jednoczesnego uruchamiania wielu instancji systemu operacyjnego na
109 pojedynczym systemie sprzętowym, którego podstawowe zasoby są
110 zarządzane przez instancję Linuksa. Celem biblioteki jest zapewnienie
111 długotrwale stabilnego API C, początkowo do parawirtualizacji Xen, ale
112 dającej się zintegrować w razie potrzeby z innymi mechanizmami
113 wirtualizacji.
114
115 %package devel
116 Summary:        Development files for programs using libvirt
117 Summary(pl.UTF-8):      Pliki programistyczne do programów wykorzystujących libvirt
118 Group:          Development/Libraries
119 Requires:       %{name} = %{version}-%{release}
120 Requires:       audit-libs-devel
121 Requires:       curl-devel >= 7.18.0
122 Requires:       device-mapper-devel >= 1.0.0
123 Requires:       gnutls-devel >= 1.0.25
124 Requires:       libapparmor-devel
125 Requires:       libcap-ng-devel >= 0.4.0
126 Requires:       libgcrypt-devel
127 Requires:       libnl1-devel >= 1.1
128 Requires:       libpcap-devel >= 1.0.0
129 Requires:       libselinux-devel >= 2.0.82
130 Requires:       libxml2-devel >= 1:2.6.0
131 Requires:       numactl-devel
132 %{?with_xen:Requires: xen-devel}
133 Requires:       yajl-devel
134
135 %description devel
136 Libvirt is a C toolkit to interact with the virtualization
137 capabilities of recent versions of Linux.
138
139 This package contains the header files needed for developing programs
140 using the libvirt library.
141
142 %description devel -l pl.UTF-8
143 Libvirt to zestaw narzędzi w C do współpracy z funkcjami
144 wirtualizacji obecnych wersji Linuksa.
145
146 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
147 wykorzystujących bibliotekę libvirt.
148
149 %package static
150 Summary:        Development static libraries for programs using libvirt
151 Summary(pl.UTF-8):      Statyczne biblioteki programistyczne do programów wykorzystujących libvirt
152 Group:          Development/Libraries
153 Requires:       %{name}-devel = %{version}-%{release}
154
155 %description static
156 Libvirt is a C toolkit to interact with the virtualization
157 capabilities of recent versions of Linux.
158
159 This package contains the static libraries for developing programs
160 using the libvirt library.
161
162 %description static -l pl.UTF-8
163 Libvirt to zestaw narzędzi w C do współpracy z funkcjami
164 wirtualizacji obecnych wersji Linuksa.
165
166 Ten pakiet zawiera biblioteki statyczne do tworzenia programów
167 wykorzystujących bibliotekę libvirt.
168
169 %package -n python-%{name}
170 Summary:        Python bindings to interact with virtualization capabilities
171 Summary(pl.UTF-8):      Wiązania Pythona do współpracy z funkcjami wirtualizacji
172 Group:          Development/Languages/Python
173 Requires:       %{name} = %{version}-%{release}
174
175 %description -n python-%{name}
176 Libvirt is a C toolkit to interact with the virtualization
177 capabilities of recent versions of Linux.
178
179 This package contains the Python bindings for the libvirt library.
180
181 %description -n python-%{name} -l pl.UTF-8
182 Libvirt to zestaw narzędzi w C do współpracy z funkcjami
183 wirtualizacji obecnych wersji Linuksa.
184
185 Ten pakiet zawiera wiązania Pythona do biblioteki libvirt.
186
187 %package utils
188 Summary:        Tools to interact with virtualization capabilities
189 Summary(pl.UTF-8):      Narzędzia do współpracy z funkcjami wirtualizacyjnymi
190 Group:          Base/Kernel
191 Requires:       %{name} = %{version}-%{release}
192 Requires:       avahi-libs >= 0.6.0
193 Requires:       libblkid >= 2.17
194 Requires:       parted-libs >= 1.8.0
195 Requires:       udev-libs >= 145
196 Requires:       xorg-lib-libpciaccess >= 0.10.0
197 Suggests:       iptables
198 Suggests:       bridge-utils
199 Suggests:       dmidecode
200 Suggests:       dnsmasq
201 Suggests:       ebtables
202 Suggests:       gawk
203 Suggests:       iptables
204 Suggests:       lvm2
205 # for management through ssh
206 Suggests:       netcat-openbsd
207 Suggests:       polkit >= 0.90
208
209 %description utils
210 Libvirt is a C toolkit to interact with the virtualization
211 capabilities of recent versions of Linux.
212
213 This package contains tools for the libvirt library.
214
215 %description utils -l pl.UTF-8
216 Libvirt to zestaw narzędzi w C do współpracy z funkcjami
217 wirtualizacji obecnych wersji Linuksa.
218
219 Ten pakiet zawiera narzędzia do biblioteki libvirt.
220
221 %prep
222 %setup -q
223 %patch0 -p1
224
225 # weird translations
226 %{__rm} po/{my,eu_ES}.{po,gmo}
227
228 mv po/vi_VN.po po/vi.po
229 mv po/vi_VN.gmo po/vi.gmo
230
231 %build
232 %{__libtoolize}
233 %{__aclocal} -I gnulib/m4 -I m4
234 %{__autoconf}
235 %{__autoheader}
236 %{__automake}
237
238 %configure \
239         --disable-silent-rules \
240         --with-html-dir=%{_gtkdocdir} \
241         --with-html-subdir=%{name} \
242         --x-libraries=%{_libdir} \
243         %{!?with_xen:--without-xen} \
244         %{!?with_qemu:--without-qemu} \
245         %{!?with_netcf:--without-netcf} \
246         --with-init-script=redhat \
247         --with-storage-lvm \
248         --without-hal \
249         --with-udev \
250         PVCREATE=/sbin/pvcreate \
251         VGCREATE=/sbin/vgcreate \
252         LVCREATE=/sbin/lvcreate \
253         PVREMOVE=/sbin/pvremove \
254         VGREMOVE=/sbin/vgremove \
255         LVREMOVE=/sbin/lvremove \
256         VGCHANGE=/sbin/vgchange \
257           VGSCAN=/sbin/vgscan   \
258              PVS=/sbin/pvs      \
259              VGS=/sbin/vgs      \
260              LVS=/sbin/lvs      \
261               TC=/sbin/tc \
262            BRCTL=/sbin/brctl    \
263         MOUNT=/bin/mount \
264         UMOUNT=/bin/umount \
265         MKFS=/sbin/mkfs \
266         SHOWMOUNT=/usr/sbin/showmount \
267         IPTABLES_PATH=/usr/sbin/iptables \
268         IP6TABLES_PATH=/usr/sbin/ip6tables \
269         EBTABLES_PATH=/usr/sbin/ebtables \
270         ISCSIADM=/sbin/iscsiadm \
271         DNSMASQ=/usr/sbin/dnsmasq \
272         RADVD=/usr/sbin/radvd \
273         UDEVADM=/sbin/udevadm \
274         MODPROBE=/sbin/modprobe
275
276 %{__make} \
277         AWK=gawk
278
279 %install
280 rm -rf $RPM_BUILD_ROOT
281 %{__make} install \
282         DEVHELP_DIR=%{_gtkdocdir}/%{name}/devhelp \
283         DESTDIR=$RPM_BUILD_ROOT
284
285 install -d $RPM_BUILD_ROOT/etc/sysconfig
286 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
287
288 #install qemud/libvirtd.sysconf $RPM_BUILD_ROOT/etc/sysconfig/libvirtd
289 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd
290
291 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
292 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
293 %py_postclean
294 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la
295
296 %find_lang %{name}
297
298 %clean
299 rm -rf $RPM_BUILD_ROOT
300
301 %post   -p /sbin/ldconfig
302 %postun -p /sbin/ldconfig
303
304 %files -f %{name}.lang
305 %defattr(644,root,root,755)
306 %doc ChangeLog README TODO NEWS
307 %attr(755,root,root) %{_libdir}/libvirt.so.*.*.*
308 %attr(755,root,root) %ghost %{_libdir}/libvirt.so.0
309 %attr(755,root,root) %{_libdir}/libvirt-qemu.so.*.*.*
310 %attr(755,root,root) %ghost %{_libdir}/libvirt-qemu.so.0
311 %attr(755,root,root) %{_libdir}/libvirt_lxc
312 %attr(755,root,root) %{_libdir}/libvirt_iohelper
313 %dir %{_datadir}/libvirt
314 %dir %{_datadir}/libvirt/schemas
315 %{_datadir}/libvirt/schemas/basictypes.rng
316 %{_datadir}/libvirt/schemas/capability.rng
317 %{_datadir}/libvirt/schemas/domain.rng
318 %{_datadir}/libvirt/schemas/domaincommon.rng
319 %{_datadir}/libvirt/schemas/domainsnapshot.rng
320 %{_datadir}/libvirt/schemas/interface.rng
321 %{_datadir}/libvirt/schemas/network.rng
322 %{_datadir}/libvirt/schemas/networkcommon.rng
323 %{_datadir}/libvirt/schemas/nodedev.rng
324 %{_datadir}/libvirt/schemas/nwfilter.rng
325 %{_datadir}/libvirt/schemas/secret.rng
326 %{_datadir}/libvirt/schemas/storageencryption.rng
327 %{_datadir}/libvirt/schemas/storagepool.rng
328 %{_datadir}/libvirt/schemas/storagevol.rng
329
330 %files devel
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_libdir}/libvirt.so
333 %attr(755,root,root) %{_libdir}/libvirt-qemu.so
334 %{_libdir}/libvirt.la
335 %{_libdir}/libvirt-qemu.la
336 %{_gtkdocdir}/%{name}
337 %{_includedir}/%{name}
338 %{_pkgconfigdir}/%{name}.pc
339
340 %files static
341 %defattr(644,root,root,755)
342 %{_libdir}/libvirt.a
343 %{_libdir}/libvirt-qemu.a
344
345 %files -n python-%{name}
346 %defattr(644,root,root,755)
347 %doc %{_docdir}/%{name}-python-%{version}
348 %attr(755,root,root) %{py_sitedir}/libvirtmod.so
349 %attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so
350 %{py_sitedir}/libvirt.py[co]
351 %{py_sitedir}/libvirt_qemu.py[co]
352
353 %files utils
354 %defattr(644,root,root,755)
355 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt
356 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/libvirt.conf
357 %attr(755,root,root) %{_bindir}/virsh
358 %attr(755,root,root) %{_sbindir}/libvirtd
359 %attr(754,root,root) /etc/rc.d/init.d/libvirtd
360 %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests
361 %attr(755,root,root) %{_bindir}/virt-xml-validate
362 %attr(755,root,root) %{_bindir}/virt-pki-validate
363 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd
364 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests
365 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd
366 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.lxc
367 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu
368 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.uml
369 %{_libdir}/libvirt_parthelper
370 %{_libdir}/virt-aa-helper
371 %{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy}
372 %{_mandir}/man1/virsh.1*
373 %{_mandir}/man1/virt-xml-validate.1*
374 %{_mandir}/man1/virt-pki-validate.1*
375 %{_mandir}/man8/libvirtd.8*
376 %{_datadir}/%{name}/*.xml
377 %{_datadir}/augeas/lenses/*.aug
378 %{_datadir}/augeas/lenses/tests/*.aug
379 %dir /var/run/libvirt
380 %dir /var/lib/libvirt
This page took 0.065902 seconds and 3 git commands to generate.