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