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