]> git.pld-linux.org Git - packages/libvirt.git/blame - libvirt.spec
- new, based on mandriva and fedora specs
[packages/libvirt.git] / libvirt.spec
CommitLineData
94462445
ER
1#
2# Conditional build:
3%bcond_with xen # xen
4%bcond_without xen_proxy # Xen proxy
5%bcond_without qemu # Qemu
6%bcond_with 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
25Summary: Toolkit to interact with virtualization capabilities
26Name: libvirt
27Version: 0.4.2
28Release: 0.1
29License: LGPL
30Group: Base/Kernel
31URL: http://www.libvirt.org/
32Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz
33# Source0-md5: c87e3d91eaa9445bb3cb1ba191573c83
34%{?with_lokkit:BuildRequires: /usr/sbin/lokkit}
35%{?with_polkit:BuildRequires: PolicyKit-devel >= 0.6}
36BuildRequires: avahi-devel
37BuildRequires: bridge-utils
38BuildRequires: cyrus-sasl-devel
39BuildRequires: dnsmasq
40BuildRequires: gettext
41BuildRequires: gnutls-devel
42BuildRequires: libselinux-devel
43BuildRequires: libxml2-devel
44BuildRequires: ncurses-devel
45BuildRequires: python-devel
46BuildRequires: readline-devel
47# For mount/umount in FS driver
48BuildRequires: util-linux
49BuildRequires: xen-devel >= 3.0.4
50# For LVM drivers
51BuildRequires: lvm2
52BuildRequires: ncurses-devel
53# For ISCSI driver
54BuildRequires: open-iscsi
55# For disk driver
56BuildRequires: parted-devel
57BuildRequires: python
58BuildRequires: python-devel
59%{?with_qemu:BuildRequires: qemu}
60BuildRequires: readline-devel
61%if %{with qemu}
62BuildRequires: /usr/bin/qemu-img
63# From QEMU RPMs
64%else
65%if %{with xen}
66BuildRequires: /usr/sbin/qcow-create
67# From Xen RPMs
68%endif
69%endif
70BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71
72# libxenstore is not versionned properly
73%define _noautoreq devel(libxenstore.*)
74
75%description
76Libvirt is a C toolkit to interact with the virtualization
77capabilities of recent versions of Linux.
78
79Virtualization of the Linux Operating System means the ability to run
80multiple instances of Operating Systems concurently on a single
81hardware system where the basic resources are driven by a Linux
82instance. The library aim at providing long term stable C API
83initially for the Xen paravirtualization but should be able to
84integrate other virtualization mechanisms if needed.
85
86%package devel
87Summary: Development tools for programs using libvirt
88Group: Development/Libraries
89Requires: %{name} = %{version}-%{release}
90%{?with_xen:Requires: xen-devel}
91
92%description devel
93Libvirt is a C toolkit to interact with the virtualization
94capabilities of recent versions of Linux.
95
96This package contains the header files and libraries needed for
97developing programs using the libvirt library.
98
99%package static
100Summary: Development static libraries for programs using libvirt
101Group: Development/Libraries
102
103%description static
104Libvirt is a C toolkit to interact with the virtualization
105capabilities of recent versions of Linux.
106
107This package contains the static libraries needed for developing
108programs using the libvirt library.
109
110%package -n python-%{name}
111Summary: Python bindings to interact with virtualization capabilities
112Group: Development/Languages/Python
113Requires: %{name} = %{version}-%{release}
114
115%description -n python-%{name}
116Libvirt is a C toolkit to interact with the virtualization
117capabilities of recent versions of Linux.
118
119This package contains the Python bindings for the libvirt library.
120
121%package utils
122Summary: Tools to interact with virtualization capabilities
123Group: Base/Kernel
124Requires: %{name} = %{version}-%{release}
125
126%description utils
127Libvirt is a C toolkit to interact with the virtualization
128capabilities of recent versions of Linux.
129
130This package contains tools for the libvirt library.
131
132%prep
133%setup -q
134
135%build
136CPPFLAGS=-std=c99
137%configure \
138 %{!?with_xen:--without-xen} \
139 %{!?with_qemu:--without-qemu} \
140 --with-init-script=redhat \
141 --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \
142 --with-remote-file=%{_localstatedir}/run/libvirtd.pid
143
144%{__make}
145
146%install
147rm -rf $RPM_BUILD_ROOT
148%{__make} install \
149 DESTDIR=$RPM_BUILD_ROOT
150
151%find_lang %{name}
152
153%clean
154rm -rf $RPM_BUILD_ROOT
155
156%post -p /sbin/ldconfig
157%postun -p /sbin/ldconfig
158
159%files -f %{name}.lang
160%defattr(644,root,root,755)
161%doc ChangeLog README TODO NEWS
162%attr(755,root,root) %{_libdir}/%{name}.so.*
163#%{_libdir}/%{name}_proxy
164
165%files devel
166%defattr(644,root,root,755)
167%doc %{_docdir}/%{name}-%{version}
168%doc %{_datadir}/gtk-doc/html/%{name}
169%dir %{_includedir}/%{name}
170%{_includedir}/%{name}/*.h
171%{_libdir}/%{name}.so
172%{_libdir}/%{name}.la
173%{_pkgconfigdir}/%{name}.pc
174
175%files static
176%defattr(644,root,root,755)
177%{_libdir}/%{name}.a
178
179%files -n python-%{name}
180%defattr(644,root,root,755)
181%doc %{_docdir}/%{name}-python-%{version}
182%{py_sitedir}/libvirt.py
183%{py_sitedir}/libvirtmod.a
184%{py_sitedir}/libvirtmod.la
185%{py_sitedir}/libvirtmod.so
186
187%files utils
188%defattr(644,root,root,755)
189%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt
190%config(noreplace) %verify(not md5 mtime size) /etc/sasl2/libvirt.conf
191%attr(755,root,root) %{_bindir}/virsh
192%attr(755,root,root) %{_sbindir}/libvirtd
193#%attr(755,root,root) %{_sbindir}/libvirt_qemud
194#/etc/rc.d/init.d/libvirtd
195%{_libdir}/libvirt_parthelper
196%{_mandir}/man1/virsh.1*
This page took 0.081961 seconds and 4 git commands to generate.