]> git.pld-linux.org Git - packages/libvirt.git/blob - libvirt.spec
- up to 0.8.8
[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:        1
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         --x-libraries=%{_libdir} \
163         %{!?with_xen:--without-xen} \
164         %{!?with_qemu:--without-qemu} \
165         --with-init-script=redhat \
166         --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \
167         --with-storage-lvm \
168         --without-hal \
169         --with-udev \
170         PVCREATE=/sbin/pvcreate \
171         VGCREATE=/sbin/vgcreate \
172         LVCREATE=/sbin/lvcreate \
173         PVREMOVE=/sbin/pvremove \
174         VGREMOVE=/sbin/vgremove \
175         LVREMOVE=/sbin/lvremove \
176         VGCHANGE=/sbin/vgchange \
177           VGSCAN=/sbin/vgscan   \
178              PVS=/sbin/pvs      \
179              VGS=/sbin/vgs      \
180              LVS=/sbin/lvs      \
181            BRCTL=/sbin/brctl    \
182         SHOWMOUNT=/usr/sbin/showmount
183
184 %{__make} AWK=gawk
185
186 %install
187 rm -rf $RPM_BUILD_ROOT
188 %{__make} install \
189         DESTDIR=$RPM_BUILD_ROOT
190
191 install -d $RPM_BUILD_ROOT/etc/sysconfig
192 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
193
194 #install qemud/libvirtd.sysconf $RPM_BUILD_ROOT/etc/sysconfig/libvirtd
195 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd
196
197 %find_lang %{name}
198
199 %clean
200 rm -rf $RPM_BUILD_ROOT
201
202 %post -p /sbin/ldconfig
203 %postun -p /sbin/ldconfig
204
205 %files -f %{name}.lang
206 %defattr(644,root,root,755)
207 %doc ChangeLog README TODO NEWS
208 %attr(755,root,root) %{_libdir}/%{name}*.so.*
209 %attr(755,root,root) %{_libdir}/libvirt_lxc
210 %{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy}
211 %{_datadir}/libvirt/schemas/capability.rng
212 %{_datadir}/libvirt/schemas/domain.rng
213 %{_datadir}/libvirt/schemas/domainsnapshot.rng
214 %{_datadir}/libvirt/schemas/interface.rng
215 %{_datadir}/libvirt/schemas/network.rng
216 %{_datadir}/libvirt/schemas/nodedev.rng
217 %{_datadir}/libvirt/schemas/nwfilter.rng
218 %{_datadir}/libvirt/schemas/secret.rng
219 %{_datadir}/libvirt/schemas/storageencryption.rng
220 %{_datadir}/libvirt/schemas/storagepool.rng
221 %{_datadir}/libvirt/schemas/storagevol.rng
222
223 %files devel
224 %defattr(644,root,root,755)
225 %doc %{_docdir}/%{name}-%{version}
226 %doc %{_datadir}/gtk-doc/html/%{name}
227 %dir %{_includedir}/%{name}
228 %{_includedir}/%{name}/*.h
229 %{_libdir}/%{name}*.so
230 %{_libdir}/%{name}*.la
231 %{_pkgconfigdir}/%{name}.pc
232
233 %files static
234 %defattr(644,root,root,755)
235 %{_libdir}/%{name}.a
236
237 %files -n python-%{name}
238 %defattr(644,root,root,755)
239 %doc %{_docdir}/%{name}-python-%{version}
240 %{py_sitedir}/libvirt.py
241 %{py_sitedir}/libvirtmod.la
242 %{py_sitedir}/libvirtmod.so
243
244 %files utils
245 %defattr(644,root,root,755)
246 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt
247 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl2/libvirt.conf
248 %attr(755,root,root) %{_bindir}/virsh
249 %attr(755,root,root) %{_sbindir}/libvirtd
250 %attr(754,root,root) /etc/rc.d/init.d/libvirtd
251 %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests
252 %attr(755,root,root) %{_bindir}/virt-xml-validate
253 %attr(755,root,root) %{_bindir}/virt-pki-validate
254 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd
255 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests
256 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.lxc
257 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu
258 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.uml
259 %{_libdir}/libvirt_parthelper
260 %{_libdir}/virt-aa-helper
261 %{_mandir}/man1/virsh.1*
262 %{_mandir}/man1/virt-xml-validate.1*
263 %{_mandir}/man1/virt-pki-validate.1*
264 %{_mandir}/man8/libvirtd.8*
265 %{_datadir}/%{name}/*.xml
266 %{_datadir}/augeas/lenses/*.aug
267 %{_datadir}/augeas/lenses/tests/*.aug
268 %dir /var/run/libvirt
269 %dir /var/lib/libvirt
This page took 0.041278 seconds and 4 git commands to generate.