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