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