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