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