]> git.pld-linux.org Git - packages/xen.git/blob - xen.spec
- fix hvmloader (added -O1) for gcc 4.6
[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   3
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.2
24 License:        GPL
25 Group:          Applications/System
26 Source0:        http://bits.xensource.com/oss-xen/release/%{version}/%{name}-%{version}.tar.gz
27 # Source0-md5:  f8d001eb9e08525c451d38deb93908b1
28 Source1:        %{name}-xend.init
29 Source2:        %{name}-xendomains.init
30 Patch0:         %{name}-python_scripts.patch
31 Patch1:         %{name}-gcc.patch
32 Patch2:         %{name}-symbols.patch
33 Patch3:         %{name}-curses.patch
34 Patch4:         %{name}-python27.patch
35 URL:            http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
36 BuildRequires:  SDL-devel
37 %{?with_hvm:BuildRequires:      bcc}
38 BuildRequires:  curl-devel
39 BuildRequires:  e2fsprogs-devel
40 BuildRequires:  gcc >= 5:3.4
41 BuildRequires:  gettext-devel
42 BuildRequires:  latex2html
43 BuildRequires:  libidn-devel
44 BuildRequires:  ncurses-devel
45 BuildRequires:  pciutils-devel
46 BuildRequires:  pkgconfig
47 BuildRequires:  python-devel
48 BuildRequires:  rpm-pythonprov
49 BuildRequires:  rpmbuild(macros) >= 1.268
50 BuildRequires:  texlive-dvips
51 #BuildRequires: texlive-latex-data
52 BuildRequires:  texlive-latex-psnfss
53 BuildRequires:  transfig
54 BuildRequires:  which
55 BuildRequires:  zlib-devel
56 Requires(post,preun):   /sbin/chkconfig
57 Requires:       %{name}-libs = %{version}-%{release}
58 Requires:       ZopeInterface
59 Requires:       bridge-utils
60 Requires:       coreutils
61 Requires:       diffutils
62 Requires:       gawk
63 Requires:       iptables
64 Requires:       kernel(xen0)
65 Requires:       losetup
66 Requires:       net-tools
67 Requires:       python-%{name} = %{version}-%{release}
68 Requires:       rc-scripts
69 Requires:       sed
70 Requires:       util-linux
71 Requires:       which
72 Obsoletes:      xen-doc
73 ExclusiveArch:  %{ix86} %{x8664}
74 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75
76 # some PPC/SPARC boot image in ELF format
77 %define         _noautostrip    .*%{_datadir}/xen/qemu/openbios-.*
78
79 %ifnarch i686 athlon pentium3 pentium4
80 %undefine       with_pae
81 %endif
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 hotplug
145 Summary:        xen hotplug scripts
146 Summary(pl.UTF-8):      Skrypty hotplug dla xena
147 Group:          Applications/System
148
149 %description hotplug
150 xen hotplug scripts.
151
152 %description hotplug -l pl.UTF-8
153 Skrypty hotplug dla xena.
154
155 %package udev
156 Summary:        xen udev scripts
157 Summary(pl.UTF-8):      Skrypty udev dla xena
158 Group:          Applications/System
159
160 %description udev
161 xen udev scripts.
162
163 %description udev -l pl.UTF-8
164 Skrypty udev dla xena.
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 %prep
179 %setup -q
180 %patch0 -p1
181 %patch1 -p1
182 %patch2 -p1
183 %patch3 -p1
184 %patch4 -p1
185
186 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
187
188 %build
189 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
190 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
191 %{__make} -j1 xen tools \
192         %{?with_pae:XEN_TARGET_X86_PAE=y} \
193         CC="%{__cc}" \
194         CXX="%{__cxx}"
195
196 %install
197 rm -rf $RPM_BUILD_ROOT
198 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
199
200 %{__make} install-xen install-tools install-docs \
201         CC="%{__cc}" \
202         CXX="%{__cxx}" \
203         %{?with_pae:XEN_TARGET_X86_PAE=y} \
204         DESTDIR=$RPM_BUILD_ROOT \
205         XEN_PYTHON_NATIVE_INSTALL=1
206
207 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
208 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
209 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
210
211 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
212 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
213
214 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
215 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
216
217 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
218 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
219
220 %py_postclean
221 # remove unneeded files
222 %{__rm} $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
223 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/xen
224 %{__rm} -r $RPM_BUILD_ROOT/''etc/init.d
225 %{__rm} $RPM_BUILD_ROOT/boot/xen-3.4.gz
226 %{__rm} $RPM_BUILD_ROOT/boot/xen-3.gz
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/README
260 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[123]
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 %dir %{_libdir}/fs/zfs
292 %attr(755,root,root) %{_libdir}/fs/*/*.so
293
294 %files devel
295 %defattr(644,root,root,755)
296 %attr(755,root,root) %{_libdir}/lib*.so
297 %{_includedir}/*
298
299 %files static
300 %defattr(644,root,root,755)
301 %{_libdir}/lib*.a
302
303 %files hotplug
304 %defattr(644,root,root,755)
305 %attr(755,root,root) /etc/hotplug/*
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.092104 seconds and 4 git commands to generate.