]> git.pld-linux.org Git - packages/xen.git/blob - xen.spec
- seems for me fails too to commit directly to branch:
[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-ng
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
158 %description -n python-xen
159 xen Python modules.
160
161 %description -n python-xen -l pl.UTF-8
162 Moduły Pythona dla xena.
163
164 %prep
165 %setup -q
166 %patch0 -p1
167 %patch1 -p1
168
169 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
170
171 %build
172 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
173 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
174 %{__make} -j1 xen tools \
175         %{?with_pae:XEN_TARGET_X86_PAE=y} \
176         CC="%{__cc}" \
177         CXX="%{__cxx}"
178
179 %install
180 rm -rf $RPM_BUILD_ROOT
181 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
182
183 %{__make} install-xen install-tools install-docs \
184         CC="%{__cc}" \
185         CXX="%{__cxx}" \
186         %{?with_pae:XEN_TARGET_X86_PAE=y} \
187         DESTDIR=$RPM_BUILD_ROOT \
188         XEN_PYTHON_NATIVE_INSTALL=1
189
190 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
191 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
192 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
193
194 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
195 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
196
197 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
198 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
199
200 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
201 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
202
203 %py_postclean
204 # remove unneeded files
205 rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
206 rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
207 rm -rf $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html
208 rm -rf $RPM_BUILD_ROOT/''etc/init.d
209 rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz
210 rm -f $RPM_BUILD_ROOT/boot/xen-3.gz
211
212 # conflict with qemu
213 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu-img.1
214 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/qemu.1
215
216 %clean
217 rm -rf $RPM_BUILD_ROOT
218
219 %post
220 /sbin/chkconfig --add xend
221 /sbin/chkconfig --add xendomains
222
223 %preun
224 if [ "$1" = "0" ]; then
225         %service xend stop
226         /sbin/chkconfig --del xend
227
228         %service xendomains stop
229         /sbin/chkconfig --del xendomains
230 fi
231
232 %post   libs -p /sbin/ldconfig
233 %postun libs -p /sbin/ldconfig
234
235 %files
236 %defattr(644,root,root,755)
237 %doc COPYING README docs/misc/*
238 %doc docs/html/*
239 /boot/%{name}-syms-%{version}
240 /boot/%{name}-%{version}.gz
241 /boot/%{name}.gz
242 %attr(754,root,root) /etc/rc.d/init.d/*
243 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
244 %dir %{_sysconfdir}/xen
245 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
246 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
247 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b*
248 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12]
249 %dir %{_sysconfdir}/xen/auto
250 %dir %{_sysconfdir}/xen/scripts
251 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
252 %attr(755,root,root) %{_bindir}/*
253 %attr(755,root,root) %{_sbindir}/*
254 %dir %{_libdir}/%{name}
255 %dir %{_libdir}/%{name}/bin
256 %attr(744,root,root) %{_libdir}/%{name}/bin/*
257 %if "%{_lib}" != "lib"
258 %dir %{_prefix}/lib/%{name}
259 %endif
260 %dir %{_prefix}/lib/%{name}/boot
261 %{?with_hvm:%attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader}
262 %{_datadir}/xen
263 %{_mandir}/man?/*
264 %{_sharedstatedir}/xen
265 %{_sharedstatedir}/xenstored
266 %dir /var/run/xen-hotplug
267 %dir %attr(700,root,root) /var/run/xend
268 %dir /var/run/xenstored
269
270 %files libs
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_libdir}/lib*.so.*
273 %dir %{_libdir}/fs
274 %dir %{_libdir}/fs/ext2fs-lib
275 %dir %{_libdir}/fs/fat
276 %dir %{_libdir}/fs/iso9660
277 %dir %{_libdir}/fs/reiserfs
278 %dir %{_libdir}/fs/ufs
279 %attr(755,root,root) %{_libdir}/fs/*/*.so
280
281 %files devel
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_libdir}/lib*.so
284 %{_includedir}/*
285
286 %files static
287 %defattr(644,root,root,755)
288 %{_libdir}/lib*.a
289
290 %if %{without hvm}
291 %files hotplug
292 %defattr(644,root,root,755)
293 %attr(755,root,root) /etc/hotplug/*
294 %endif
295
296 %files udev
297 %defattr(644,root,root,755)
298 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
299
300 %files -n python-xen
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{py_sitedir}/fsimage.so
303 %{py_sitedir}/grub
304 %dir %{py_sitedir}/xen
305 %dir %{py_sitedir}/xen/lowlevel
306 %{py_sitedir}/xen/lowlevel/*.py*
307 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
308 %{py_sitedir}/xen/sv
309 %{py_sitedir}/xen/util
310 %{py_sitedir}/xen/web
311 %{py_sitedir}/xen/xend
312 %{py_sitedir}/xen/xm
313 %{py_sitedir}/xen/xsview
314 %{py_sitedir}/xen/*.py*
315 %if "%{py_ver}" > "2.4"
316 %{py_sitedir}/*.egg-info
317 %endif
This page took 0.204533 seconds and 3 git commands to generate.