]>
Commit | Line | Data |
---|---|---|
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 | ||
25 | Summary: Toolkit to interact with virtualization capabilities | |
26 | Name: libvirt | |
8c29141c SP |
27 | Version: 0.4.5 |
28 | Release: 0.1 | |
94462445 ER |
29 | License: LGPL |
30 | Group: Base/Kernel | |
31 | URL: http://www.libvirt.org/ | |
32 | Source0: ftp://ftp.libvirt.org/libvirt/%{name}-%{version}.tar.gz | |
8c29141c | 33 | # Source0-md5: dcb590a6202c332907eae7b44e47ca4b |
94462445 ER |
34 | %{?with_lokkit:BuildRequires: /usr/sbin/lokkit} |
35 | %{?with_polkit:BuildRequires: PolicyKit-devel >= 0.6} | |
36 | BuildRequires: avahi-devel | |
37 | BuildRequires: bridge-utils | |
38 | BuildRequires: cyrus-sasl-devel | |
39 | BuildRequires: dnsmasq | |
8c29141c | 40 | BuildRequires: gawk |
94462445 ER |
41 | BuildRequires: gettext |
42 | BuildRequires: gnutls-devel | |
43 | BuildRequires: libselinux-devel | |
44 | BuildRequires: libxml2-devel | |
45 | BuildRequires: ncurses-devel | |
8c29141c | 46 | BuildRequires: nfs-utils |
94462445 ER |
47 | BuildRequires: python-devel |
48 | BuildRequires: readline-devel | |
49 | # For mount/umount in FS driver | |
50 | BuildRequires: util-linux | |
98574323 | 51 | %{?with_xen:BuildRequires: xen-devel >= 3.0.4} |
94462445 ER |
52 | # For LVM drivers |
53 | BuildRequires: lvm2 | |
54 | BuildRequires: ncurses-devel | |
55 | # For ISCSI driver | |
56 | BuildRequires: open-iscsi | |
57 | # For disk driver | |
58 | BuildRequires: parted-devel | |
59 | BuildRequires: python | |
60 | BuildRequires: python-devel | |
61 | %{?with_qemu:BuildRequires: qemu} | |
62 | BuildRequires: readline-devel | |
94462445 ER |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
65 | # libxenstore is not versionned properly | |
66 | %define _noautoreq devel(libxenstore.*) | |
67 | ||
68 | %description | |
69 | Libvirt is a C toolkit to interact with the virtualization | |
70 | capabilities of recent versions of Linux. | |
71 | ||
72 | Virtualization of the Linux Operating System means the ability to run | |
73 | multiple instances of Operating Systems concurently on a single | |
74 | hardware system where the basic resources are driven by a Linux | |
75 | instance. The library aim at providing long term stable C API | |
76 | initially for the Xen paravirtualization but should be able to | |
77 | integrate other virtualization mechanisms if needed. | |
78 | ||
79 | %package devel | |
80 | Summary: Development tools for programs using libvirt | |
81 | Group: Development/Libraries | |
82 | Requires: %{name} = %{version}-%{release} | |
83 | %{?with_xen:Requires: xen-devel} | |
84 | ||
85 | %description devel | |
86 | Libvirt is a C toolkit to interact with the virtualization | |
87 | capabilities of recent versions of Linux. | |
88 | ||
89 | This package contains the header files and libraries needed for | |
90 | developing programs using the libvirt library. | |
91 | ||
92 | %package static | |
93 | Summary: Development static libraries for programs using libvirt | |
94 | Group: Development/Libraries | |
95 | ||
96 | %description static | |
97 | Libvirt is a C toolkit to interact with the virtualization | |
98 | capabilities of recent versions of Linux. | |
99 | ||
100 | This package contains the static libraries needed for developing | |
101 | programs using the libvirt library. | |
102 | ||
103 | %package -n python-%{name} | |
104 | Summary: Python bindings to interact with virtualization capabilities | |
105 | Group: Development/Languages/Python | |
106 | Requires: %{name} = %{version}-%{release} | |
107 | ||
108 | %description -n python-%{name} | |
109 | Libvirt is a C toolkit to interact with the virtualization | |
110 | capabilities of recent versions of Linux. | |
111 | ||
112 | This package contains the Python bindings for the libvirt library. | |
113 | ||
114 | %package utils | |
115 | Summary: Tools to interact with virtualization capabilities | |
116 | Group: Base/Kernel | |
117 | Requires: %{name} = %{version}-%{release} | |
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 | ||
128 | %build | |
129 | CPPFLAGS=-std=c99 | |
8c29141c | 130 | ./configure \ |
a7333f70 SP |
131 | --host=%{_host} \ |
132 | --build=%{_host} \ | |
133 | --prefix=%{_prefix} \ | |
134 | --exec-prefix=%{_exec_prefix} \ | |
135 | --bindir=%{_bindir} \ | |
136 | --sbindir=%{_sbindir} \ | |
137 | --sysconfdir=%{_sysconfdir} \ | |
138 | --datadir=%{_datadir} \ | |
139 | --includedir=%{_includedir} \ | |
140 | --libdir=%{_libdir} \ | |
141 | --libexecdir=%{_libexecdir} \ | |
142 | --localstatedir=%{_localstatedir} \ | |
143 | --sharedstatedir=%{_sharedstatedir} \ | |
144 | --mandir=%{_mandir} \ | |
145 | --infodir=%{_infodir} \ | |
146 | --x-libraries=%{_libdir} \ | |
94462445 ER |
147 | %{!?with_xen:--without-xen} \ |
148 | %{!?with_qemu:--without-qemu} \ | |
149 | --with-init-script=redhat \ | |
150 | --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \ | |
151 | --with-remote-file=%{_localstatedir}/run/libvirtd.pid | |
152 | ||
8c29141c | 153 | %{__make} AWK=gawk |
94462445 ER |
154 | |
155 | %install | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | %{__make} install \ | |
158 | DESTDIR=$RPM_BUILD_ROOT | |
159 | ||
160 | %find_lang %{name} | |
161 | ||
162 | %clean | |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
165 | %post -p /sbin/ldconfig | |
166 | %postun -p /sbin/ldconfig | |
167 | ||
168 | %files -f %{name}.lang | |
169 | %defattr(644,root,root,755) | |
170 | %doc ChangeLog README TODO NEWS | |
171 | %attr(755,root,root) %{_libdir}/%{name}.so.* | |
172 | #%{_libdir}/%{name}_proxy | |
8c29141c SP |
173 | %dir %{_datadir}/augeas |
174 | %dir %{_datadir}/augeas/lenses | |
175 | %{_datadir}/augeas/lenses/*.aug | |
176 | %dir %{_datadir}/augeas/lenses/tests | |
177 | %{_datadir}/augeas/lenses/tests/*.aug | |
8c29141c | 178 | %attr(755,root,root) %{_libdir}/libvirt_lxc |
94462445 ER |
179 | |
180 | %files devel | |
181 | %defattr(644,root,root,755) | |
182 | %doc %{_docdir}/%{name}-%{version} | |
183 | %doc %{_datadir}/gtk-doc/html/%{name} | |
184 | %dir %{_includedir}/%{name} | |
185 | %{_includedir}/%{name}/*.h | |
186 | %{_libdir}/%{name}.so | |
187 | %{_libdir}/%{name}.la | |
188 | %{_pkgconfigdir}/%{name}.pc | |
189 | ||
190 | %files static | |
191 | %defattr(644,root,root,755) | |
192 | %{_libdir}/%{name}.a | |
193 | ||
194 | %files -n python-%{name} | |
195 | %defattr(644,root,root,755) | |
196 | %doc %{_docdir}/%{name}-python-%{version} | |
197 | %{py_sitedir}/libvirt.py | |
198 | %{py_sitedir}/libvirtmod.a | |
199 | %{py_sitedir}/libvirtmod.la | |
200 | %{py_sitedir}/libvirtmod.so | |
201 | ||
202 | %files utils | |
203 | %defattr(644,root,root,755) | |
204 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libvirt | |
205 | %config(noreplace) %verify(not md5 mtime size) /etc/sasl2/libvirt.conf | |
206 | %attr(755,root,root) %{_bindir}/virsh | |
207 | %attr(755,root,root) %{_sbindir}/libvirtd | |
208 | #%attr(755,root,root) %{_sbindir}/libvirt_qemud | |
209 | #/etc/rc.d/init.d/libvirtd | |
210 | %{_libdir}/libvirt_parthelper | |
211 | %{_mandir}/man1/virsh.1* |