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