]> git.pld-linux.org Git - packages/libvirt.git/blob - libvirt.spec
- up to 0.9.6
[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 %bcond_with     netcf           # host interfaces support
9
10 # Xen is available only on i386 x86_64 ia64
11 %ifnarch %{ix86} %{x8664} ia64
12 %undefine       with_xen
13 %endif
14 %ifarch i386 i486 i586
15 %undefine       with_xen
16 %endif
17
18 %if %{without xen}
19 %undefine       with_xen_proxy
20 %endif
21
22 %ifnarch %{ix86} %{x8664} ppc
23 %undefine       with_qemu
24 %endif
25
26 Summary:        Toolkit to interact with virtualization capabilities
27 Name:           libvirt
28 Version:        0.9.6
29 Release:        1
30 License:        LGPL
31 Group:          Base/Kernel
32 URL:            http://www.libvirt.org/
33 Source0:        ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz
34 # Source0-md5:  b74df374b524d00a22a6c89cfc23099f
35 Source1:        %{name}.init
36 Patch0:         gcrypt.patch
37 Patch1:         %{name}-sasl.patch
38 %{?with_lokkit:BuildRequires:   /usr/sbin/lokkit}
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 %{?with_netcf:BuildRequires:    netcf-devel >= 0.1.4}
60 BuildRequires:  numactl-devel
61 BuildRequires:  parted-devel >= 1.8.0
62 BuildRequires:  perl-tools-pod
63 %{?with_polkit:BuildRequires:   polkit >= 0.90}
64 BuildRequires:  pkgconfig
65 BuildRequires:  python
66 BuildRequires:  python-devel
67 BuildRequires:  readline-devel
68 BuildRequires:  readline-devel
69 BuildRequires:  rpm-pythonprov
70 BuildRequires:  sqlite3-devel
71 BuildRequires:  udev-devel >= 145
72 # For mount/umount in FS driver
73 BuildRequires:  util-linux
74 %{?with_xen:BuildRequires:      xen-devel >= 3.0.4}
75 # For disk driver
76 BuildRequires:  xmlrpc-c-devel
77 BuildRequires:  xorg-lib-libpciaccess-devel
78 BuildRequires:  yajl-devel
79 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
80
81 # libxenstore is not versionned properly
82 %define         _noautoreq      devel(libxenstore.*)
83
84 %description
85 Libvirt is a C toolkit to interact with the virtualization
86 capabilities of recent versions of Linux.
87
88 Virtualization of the Linux Operating System means the ability to run
89 multiple instances of Operating Systems concurently on a single
90 hardware system where the basic resources are driven by a Linux
91 instance. The library aim at providing long term stable C API
92 initially for the Xen paravirtualization but should be able to
93 integrate other virtualization mechanisms if needed.
94
95 %package devel
96 Summary:        Development tools for programs using libvirt
97 Group:          Development/Libraries
98 Requires:       %{name} = %{version}-%{release}
99 %{?with_xen:Requires: xen-devel}
100
101 %description devel
102 Libvirt is a C toolkit to interact with the virtualization
103 capabilities of recent versions of Linux.
104
105 This package contains the header files and libraries needed for
106 developing programs using the libvirt library.
107
108 %package static
109 Summary:        Development static libraries for programs using libvirt
110 Group:          Development/Libraries
111
112 %description static
113 Libvirt is a C toolkit to interact with the virtualization
114 capabilities of recent versions of Linux.
115
116 This package contains the static libraries needed for developing
117 programs using the libvirt library.
118
119 %package -n     python-%{name}
120 Summary:        Python bindings to interact with virtualization capabilities
121 Group:          Development/Languages/Python
122 Requires:       %{name} = %{version}-%{release}
123
124 %description -n python-%{name}
125 Libvirt is a C toolkit to interact with the virtualization
126 capabilities of recent versions of Linux.
127
128 This package contains the Python bindings for the libvirt library.
129
130 %package utils
131 Summary:        Tools to interact with virtualization capabilities
132 Group:          Base/Kernel
133 Requires:       %{name} = %{version}-%{release}
134 Suggests:       iptables
135 Suggests:       bridge-utils
136 Suggests:       dmidecode
137 Suggests:       dnsmasq
138 Suggests:       ebtables
139 Suggests:       gawk
140 Suggests:       iptables
141 Suggests:       lvm2
142 # for management through ssh
143 Suggests:       netcat-openbsd
144 Suggests:       polkit
145
146 %description utils
147 Libvirt is a C toolkit to interact with the virtualization
148 capabilities of recent versions of Linux.
149
150 This package contains tools for the libvirt library.
151
152 %prep
153 %setup -q
154 #%patch0 -p1
155 %patch1 -p1
156 # weird translations
157 rm -f po/{my,eu_ES}.{po,gmo}
158
159 mv po/vi_VN.po po/vi.po
160 mv po/vi_VN.gmo po/vi.gmo
161
162 %build
163 %{__libtoolize}
164 %{__aclocal} -I gnulib/m4 -I m4
165 %{__autoheader}
166 %{__autoconf}
167 %{__automake}
168
169
170 %configure \
171         --disable-silent-rules \
172         --with-html-dir=%{_gtkdocdir} \
173         --with-html-subdir=%{name} \
174         --x-libraries=%{_libdir} \
175         %{!?with_xen:--without-xen} \
176         %{!?with_qemu:--without-qemu} \
177         %{!?with_netcf:--without-netcf} \
178         --with-init-script=redhat \
179         --with-storage-lvm \
180         --without-hal \
181         --with-udev \
182         PVCREATE=/sbin/pvcreate \
183         VGCREATE=/sbin/vgcreate \
184         LVCREATE=/sbin/lvcreate \
185         PVREMOVE=/sbin/pvremove \
186         VGREMOVE=/sbin/vgremove \
187         LVREMOVE=/sbin/lvremove \
188         VGCHANGE=/sbin/vgchange \
189           VGSCAN=/sbin/vgscan   \
190              PVS=/sbin/pvs      \
191              VGS=/sbin/vgs      \
192              LVS=/sbin/lvs      \
193            BRCTL=/sbin/brctl    \
194         SHOWMOUNT=/usr/sbin/showmount \
195         IPTABLES_PATH=/usr/sbin/iptables \
196         IP6TABLES_PATH=/usr/sbin/ip6tables \
197         EBTABLES_PATH=/usr/sbin/ebtables \
198         ISCSIADM=/sbin/iscsiadm
199
200 %{__make} AWK=gawk
201
202 %install
203 rm -rf $RPM_BUILD_ROOT
204 %{__make} install \
205         DEVHELP_DIR=%{_gtkdocdir}/%{name}/devhelp \
206         DESTDIR=$RPM_BUILD_ROOT
207
208 install -d $RPM_BUILD_ROOT/etc/sysconfig
209 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
210
211 #install qemud/libvirtd.sysconf $RPM_BUILD_ROOT/etc/sysconfig/libvirtd
212 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/libvirtd
213
214 %find_lang %{name}
215
216 %clean
217 rm -rf $RPM_BUILD_ROOT
218
219 %post -p /sbin/ldconfig
220 %postun -p /sbin/ldconfig
221
222 %files -f %{name}.lang
223 %defattr(644,root,root,755)
224 %doc ChangeLog README TODO NEWS
225 %attr(755,root,root) %{_libdir}/%{name}*.so.*
226 %attr(755,root,root) %{_libdir}/libvirt_lxc
227 %attr(755,root,root) %{_libdir}/libvirt_iohelper
228 %{?with_polkit:%{_datadir}/polkit-1/actions/org.libvirt.unix.policy}
229 %dir %{_datadir}/libvirt
230 %dir %{_datadir}/libvirt/schemas
231 %{_datadir}/libvirt/schemas/basictypes.rng
232 %{_datadir}/libvirt/schemas/capability.rng
233 %{_datadir}/libvirt/schemas/domain.rng
234 %{_datadir}/libvirt/schemas/domaincommon.rng
235 %{_datadir}/libvirt/schemas/domainsnapshot.rng
236 %{_datadir}/libvirt/schemas/interface.rng
237 %{_datadir}/libvirt/schemas/network.rng
238 %{_datadir}/libvirt/schemas/networkcommon.rng
239 %{_datadir}/libvirt/schemas/nodedev.rng
240 %{_datadir}/libvirt/schemas/nwfilter.rng
241 %{_datadir}/libvirt/schemas/secret.rng
242 %{_datadir}/libvirt/schemas/storageencryption.rng
243 %{_datadir}/libvirt/schemas/storagepool.rng
244 %{_datadir}/libvirt/schemas/storagevol.rng
245
246 %files devel
247 %defattr(644,root,root,755)
248 %doc %{_docdir}/%{name}-%{version}
249 %doc %{_gtkdocdir}/%{name}
250 %dir %{_includedir}/%{name}
251 %{_includedir}/%{name}/*.h
252 %{_libdir}/%{name}*.so
253 %{_libdir}/%{name}*.la
254 %{_pkgconfigdir}/%{name}.pc
255
256 %files static
257 %defattr(644,root,root,755)
258 %{_libdir}/%{name}.a
259 %{_libdir}/%{name}-qemu.a
260
261 %files -n python-%{name}
262 %defattr(644,root,root,755)
263 %doc %{_docdir}/%{name}-python-%{version}
264 %{py_sitedir}/libvirt.py
265 %{py_sitedir}/libvirt_qemu.py
266 %{py_sitedir}/libvirtmod.la
267 %{py_sitedir}/libvirtmod_qemu.la
268 %attr(755,root,root) %{py_sitedir}/libvirtmod.so
269 %attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so
270
271 %files utils
272 %defattr(644,root,root,755)
273 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt
274 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/libvirt.conf
275 %attr(755,root,root) %{_bindir}/virsh
276 %attr(755,root,root) %{_sbindir}/libvirtd
277 %attr(754,root,root) /etc/rc.d/init.d/libvirtd
278 %attr(754,root,root) /etc/rc.d/init.d/libvirt-guests
279 %attr(755,root,root) %{_bindir}/virt-xml-validate
280 %attr(755,root,root) %{_bindir}/virt-pki-validate
281 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirtd
282 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/libvirt-guests
283 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd
284 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.lxc
285 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.qemu
286 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/libvirtd.uml
287 %{_libdir}/libvirt_parthelper
288 %{_libdir}/virt-aa-helper
289 %{_mandir}/man1/virsh.1*
290 %{_mandir}/man1/virt-xml-validate.1*
291 %{_mandir}/man1/virt-pki-validate.1*
292 %{_mandir}/man8/libvirtd.8*
293 %{_datadir}/%{name}/*.xml
294 %{_datadir}/augeas/lenses/*.aug
295 %{_datadir}/augeas/lenses/tests/*.aug
296 %dir /var/run/libvirt
297 %dir /var/lib/libvirt
This page took 0.058838 seconds and 4 git commands to generate.