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