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