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