]> git.pld-linux.org Git - packages/xen.git/blob - xen.spec
7d8b806ace99e2dc18f85562274348050b3647ae
[packages/xen.git] / xen.spec
1 #
2 # TODO:
3 #  - most of the qemu config options aren't detected (curses, NPTL, vde, fdt)
4 #  - package the ocaml stuff
5 #
6 # Conditional build:
7 %bcond_without  hvm             # build with hvm (full virtualization) support
8
9 %define xen_extfiles_url        http://xenbits.xensource.com/xen-extfiles
10 Summary:        Xen - a virtual machine monitor
11 Summary(pl.UTF-8):      Xen - monitor maszyny wirtualnej
12 Name:           xen
13 Version:        4.1.2
14 Release:        0.3
15 License:        GPL
16 Group:          Applications/System
17 Source0:        http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5:  73561faf3c1b5e36ec5c089b5db848ad
19 Source1:        %{name}-xend.init
20 Source2:        %{name}-xendomains.init
21 # used by stubdoms
22 Source10: %{xen_extfiles_url}/lwip-1.3.0.tar.gz
23 # Source10-md5: 36cc57650cffda9a0269493be2a169bb
24 Source11: %{xen_extfiles_url}/newlib-1.16.0.tar.gz
25 # Source11-md5: bf8f1f9e3ca83d732c00a79a6ef29bc4
26 Source12: %{xen_extfiles_url}/zlib-1.2.3.tar.gz
27 # Source12-md5: debc62758716a169df9f62e6ab2bc634
28 Source13: %{xen_extfiles_url}/pciutils-2.2.9.tar.bz2
29 # Source13-md5: cec05e7785497c5e19da2f114b934ffd
30 Source14: %{xen_extfiles_url}/grub-0.97.tar.gz
31 # Source14-md5: cd3f3eb54446be6003156158d51f4884
32 Source15: %{xen_extfiles_url}/ipxe-git-v1.0.0.tar.gz
33 # Source15-md5: fb7df96781d337899066d82059346885
34 Patch0:         %{name}-python_scripts.patch
35 Patch1:         %{name}-symbols.patch
36 Patch2:         %{name}-curses.patch
37 Patch3:         %{name}-gcc.patch
38 Patch4:         %{name}-xz.patch
39 URL:            http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
40 BuildRequires:  SDL-devel
41 %{?with_hvm:BuildRequires:      bcc}
42 BuildRequires:  curl-devel
43 BuildRequires:  e2fsprogs-devel
44 BuildRequires:  gcc >= 5:3.4
45 BuildRequires:  gettext-devel
46 BuildRequires:  latex2html
47 BuildRequires:  libidn-devel
48 BuildRequires:  ncurses-devel
49 BuildRequires:  pciutils-devel
50 BuildRequires:  pkgconfig
51 BuildRequires:  python-devel
52 BuildRequires:  rpm-pythonprov
53 BuildRequires:  rpmbuild(macros) >= 1.268
54 #BuildRequires: texlive-dvips
55 #BuildRequires: texlive-latex-data
56 BuildRequires:  texlive-latex-psnfss
57 BuildRequires:  transfig
58 BuildRequires:  which
59 BuildRequires:  zlib-devel
60 Requires(post,preun):   /sbin/chkconfig
61 Requires:       %{name}-libs = %{version}-%{release}
62 Requires:       ZopeInterface
63 Requires:       bridge-utils
64 Requires:       coreutils
65 Requires:       diffutils
66 Requires:       gawk
67 Requires:       iptables
68 Requires:       kernel(xen0)
69 Requires:       losetup
70 Requires:       net-tools
71 Requires:       python-%{name} = %{version}-%{release}
72 Requires:       rc-scripts
73 Requires:       sed
74 Requires:       util-linux
75 Requires:       which
76 Obsoletes:      xen-doc
77 ExclusiveArch:  %{ix86} %{x8664}
78 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79
80 # some PPC/SPARC boot image in ELF format
81 %define         _noautostrip    .*%{_datadir}/xen/qemu/openbios-.*
82
83 %description
84 This package contains the Xen hypervisor and Xen tools, needed to run
85 virtual machines on x86 systems, together with the kernel-xen*
86 packages. Information on how to use Xen can be found at the Xen
87 project pages.
88
89 Virtualisation can be used to run multiple versions or multiple Linux
90 distributions on one system, or to test untrusted applications in a
91 sandboxed environment. Note that the Xen technology is still in
92 development, and this RPM has received extremely little testing. Don't
93 be surprised if this RPM eats your data, drinks your coffee or makes
94 fun of you in front of your friends.
95
96 %description -l pl.UTF-8
97 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
98 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
99 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
100 projektu.
101
102 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
103 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
104 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
105 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
106 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
107 się wyśmiewał w obecności przyjaciół.
108
109 %package libs
110 Summary:        xen libraries
111 Summary(pl.UTF-8):      Biblioteki xena
112 Group:          Libraries
113
114 %description libs
115 xen libraries.
116
117 %description libs -l pl.UTF-8
118 Biblioteki xena.
119
120 %package devel
121 Summary:        Header files for xen
122 Summary(pl.UTF-8):      Pliki nagłówkowe xena
123 Group:          Development/Libraries
124 Requires:       %{name}-libs = %{version}-%{release}
125
126 %description devel
127 Header files for xen.
128
129 %description devel -l pl.UTF-8
130 Pliki nagłówkowe xena.
131
132 %package static
133 Summary:        Static xen libraries
134 Summary(pl.UTF-8):      Statyczne biblioteki xena
135 Group:          Development/Libraries
136 Requires:       %{name}-devel = %{version}-%{release}
137
138 %description static
139 Static xen libraries.
140
141 %description static -l pl.UTF-8
142 Statyczne biblioteki xena.
143
144 %package udev
145 Summary:        xen udev scripts
146 Summary(pl.UTF-8):      Skrypty udev dla xena
147 Group:          Applications/System
148
149 %description udev
150 xen udev scripts.
151
152 %description udev -l pl.UTF-8
153 Skrypty udev dla xena.
154
155 %package xend
156 Summary:        xend daemon
157 Summary(pl.UTF-8):      Demon xend
158 Group:          Daemons
159
160 %description xend
161 xend daemon.
162
163 %description xend -l pl.UTF-8
164 Demon xend.
165
166 %package -n python-xen
167 Summary:        xen Python modules
168 Summary(pl.UTF-8):      Moduły Pythona dla xena
169 Group:          Libraries
170 Conflicts:      xen < 3.2.1-0.3
171
172 %description -n python-xen
173 xen Python modules.
174
175 %description -n python-xen -l pl.UTF-8
176 Moduły Pythona dla xena.
177
178 %package -n bash-completion-%{name}
179 Summary:    bash-completion for xen
180 Group:      Applications/Shells
181 Requires:   %{name} = %{version}-%{release}
182 Requires:   bash-completion
183
184 %description -n bash-completion-%{name}
185 This package provides bash-completion for xen.
186
187 %prep
188 %setup -q
189 %patch0 -p1
190 %patch1 -p1
191 %patch2 -p1
192 #%%patch3 -p1
193 %patch4 -p1
194
195 %{__rm} -v tools/check/*.orig
196
197 # stubdom sources
198 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
199 ln -s %{PATCH23} stubdom/grub.patches/99grub-ext4-support.patch
200 ln -s %{SOURCE15} tools/firmware/etherboot/ipxe.tar.gz
201
202 %build
203 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
204 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
205 %{__make} -j1 xen tools \
206         CC="%{__cc}" \
207         CXX="%{__cxx}"
208
209 %install
210 rm -rf $RPM_BUILD_ROOT
211 install -d $RPM_BUILD_ROOT/etc/xen/examples
212
213 %{__make} install-xen install-tools install-stubdom install-docs \
214         CC="%{__cc}" \
215         CXX="%{__cxx}" \
216         DESTDIR=$RPM_BUILD_ROOT
217
218 mv $RPM_BUILD_ROOT/etc/xen/{xmexample*,examples}
219
220 cp -p tools/blktap/README{,.blktap}
221 cp -p tools/xenmon/README{,.xenmon}
222
223 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
224 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
225
226 %py_postclean
227
228 # remove unneeded files
229 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.1.gz
230 %{__rm} $RPM_BUILD_ROOT/boot/xen-4.gz
231 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
232 %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
233
234 %clean
235 rm -rf $RPM_BUILD_ROOT
236
237 %post
238 /sbin/chkconfig --add xen-watchdog
239 /sbin/chkconfig --add xencommons
240 /sbin/chkconfig --add xendomains
241
242 %preun
243 if [ "$1" = "0" ]; then
244         %service xendomains stop
245         /sbin/chkconfig --del xendomains
246
247         %service xencommons stop
248         /sbin/chkconfig --del xencommons
249
250         %service xen-watchdog stop
251         /sbin/chkconfig --del xen-watchdog
252 fi
253
254 %post  xend
255 /sbin/chkconfig --add xend
256
257 %preun xend
258 if [ "$1" = "0" ]; then
259         %service xend stop
260         /sbin/chkconfig --del xend
261 fi
262
263 %post   libs -p /sbin/ldconfig
264 %postun libs -p /sbin/ldconfig
265
266 %files
267 %defattr(644,root,root,755)
268 %doc COPYING README* docs/misc/* 
269 %doc docs/html/*
270 %doc tools/blktap/README.blktap tools/xenmon/README.xenmon
271 %doc tools/ioemu-dir/*.html
272 /boot/%{name}-syms-%{version}
273 /boot/%{name}-%{version}.gz
274 /boot/%{name}.gz
275 %attr(754,root,root) /etc/rc.d/init.d/xen-watchdog
276 %attr(754,root,root) /etc/rc.d/init.d/xencommons
277 %attr(754,root,root) /etc/rc.d/init.d/xendomains
278 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
279 %dir %{_sysconfdir}/xen
280 %dir %{_sysconfdir}/xen/auto
281 %dir %{_sysconfdir}/xen/examples
282 %dir %{_sysconfdir}/xen/scripts
283 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
284 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/examples/*
285 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/README*
286 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/cpupool
287 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xl.conf
288 %attr(755,root,root) %{_bindir}/*
289 %attr(755,root,root) %{_sbindir}/[bfgikloqtv]*
290 %attr(755,root,root) %{_sbindir}/xen??*
291 %attr(755,root,root) %{_sbindir}/xl
292 %attr(755,root,root) %{_sbindir}/xsview
293 %dir %{_libdir}/%{name}
294 %dir %{_libdir}/%{name}/bin
295 %attr(744,root,root) %{_libdir}/%{name}/bin/*
296 %if "%{_lib}" != "lib"
297 %dir %{_prefix}/lib/%{name}
298 %endif
299 %dir %{_prefix}/lib/%{name}/boot
300 %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader}
301 %{_datadir}/xen
302 %{_mandir}/man?/*
303 %{_sharedstatedir}/xen
304 %{_sharedstatedir}/xenstored
305 %dir /var/run/xenstored
306
307 %files libs
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/lib*.so.*
310 %dir %{_libdir}/fs
311 %dir %{_libdir}/fs/ext2fs-lib
312 %dir %{_libdir}/fs/fat
313 %dir %{_libdir}/fs/iso9660
314 %dir %{_libdir}/fs/reiserfs
315 %dir %{_libdir}/fs/ufs
316 %dir %{_libdir}/fs/zfs
317 %attr(755,root,root) %{_libdir}/fs/*/*.so
318
319 %files devel
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/lib*.so
322 %{_includedir}/*
323
324 %files static
325 %defattr(644,root,root,755)
326 %{_libdir}/lib*.a
327
328 %files udev
329 %defattr(644,root,root,755)
330 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
331
332 %files xend
333 %defattr(644,root,root,755)
334 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/xend
335 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xm*
336 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xend*
337 %attr(755,root,root) %{_sbindir}/xend
338 %attr(755,root,root) %{_sbindir}/xm
339 %dir %attr(700,root,root) /var/run/xend
340
341 %files -n python-xen
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{py_sitedir}/fsimage.so
344 %{py_sitedir}/grub
345 %dir %{py_sitedir}/xen
346 %dir %{py_sitedir}/xen/lowlevel
347 %{py_sitedir}/xen/lowlevel/*.py*
348 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
349 %{py_sitedir}/xen/remus
350 %{py_sitedir}/xen/sv
351 %{py_sitedir}/xen/util
352 %{py_sitedir}/xen/web
353 %{py_sitedir}/xen/xend
354 %{py_sitedir}/xen/xm
355 %{py_sitedir}/xen/xsview
356 %{py_sitedir}/xen/*.py*
357 %if "%{py_ver}" > "2.4"
358 %{py_sitedir}/*.egg-info
359 %endif
360
361 %files -n bash-completion-%{name}
362 %defattr(644,root,root,755)
363 /etc/bash_completion.d/*
This page took 0.041613 seconds and 2 git commands to generate.