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