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