]> git.pld-linux.org Git - packages/xen.git/blob - xen.spec
- python packaging fixes (merge from XEN_3_0_2)
[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.1
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:       ZopeInterface
48 Requires:       bridge-utils
49 Requires:       coreutils
50 Requires:       diffutils
51 Requires:       gawk
52 Requires:       iptables
53 Requires:       kernel(xen0) = %{major}
54 Requires:       losetup
55 Requires:       net-tools
56 Requires:       rc-scripts
57 Requires:       sed
58 Requires:       util-linux-ng
59 Requires:       which
60 Obsoletes:      xen-doc
61 ExclusiveArch:  %{ix86} %{x8664}
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %ifnarch i686 athlon pentium3 pentium4
65 %undefine       with_pae
66 %endif
67
68 %description
69 This package contains the Xen hypervisor and Xen tools, needed to run
70 virtual machines on x86 systems, together with the kernel-xen*
71 packages. Information on how to use Xen can be found at the Xen
72 project pages.
73
74 Virtualisation can be used to run multiple versions or multiple Linux
75 distributions on one system, or to test untrusted applications in a
76 sandboxed environment. Note that the Xen technology is still in
77 development, and this RPM has received extremely little testing. Don't
78 be surprised if this RPM eats your data, drinks your coffee or makes
79 fun of you in front of your friends.
80
81 %description -l pl.UTF-8
82 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
83 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
84 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
85 projektu.
86
87 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
88 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
89 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
90 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
91 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
92 się wyśmiewał w obecności przyjaciół.
93
94 %package libs
95 Summary:        xen libraries
96 Summary(pl.UTF-8):      Biblioteki xena
97 Group:          Libraries
98
99 %description libs
100 xen libraries.
101
102 %description libs -l pl.UTF-8
103 Biblioteki xena.
104
105 %package hotplug
106 Summary:        xen hotplug
107 Group:          Application/System
108
109 %description hotplug
110 xen hotplug.
111
112 %package udev
113 Summary:        xen udev
114 Group:          Application/System
115
116 %description udev
117 xen udev.
118
119 %package devel
120 Summary:        Header files for xen
121 Summary(pl.UTF-8):      Pliki nagłówkowe xena
122 Group:          Development/Libraries
123 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
124
125 %description devel
126 Header files for xen.
127
128 %description devel -l pl.UTF-8
129 Pliki nagłówkowe xena.
130
131 %package static
132 Summary:        Static xen libraries
133 Summary(pl.UTF-8):      Statyczne biblioteki xena
134 Group:          Development/Libraries
135 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
136
137 %description static
138 Static xen libraries.
139
140 %description static -l pl.UTF-8
141 Statyczne biblioteki xena.
142
143 %prep
144 %setup -q
145 %patch0 -p1
146 %patch1 -p1
147
148 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -fv
149
150 %build
151 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
152 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
153 %{__make} -j1 xen tools \
154         %{?with_pae:XEN_TARGET_X86_PAE=y} \
155         CC="%{__cc}" \
156         CXX="%{__cxx}"
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
161
162 %{__make} install-xen install-tools install-docs \
163         CC="%{__cc}" \
164         CXX="%{__cxx}" \
165         %{?with_pae:XEN_TARGET_X86_PAE=y} \
166         DESTDIR=$RPM_BUILD_ROOT \
167         XEN_PYTHON_NATIVE_INSTALL=1
168
169 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
170 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
171 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
172
173 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
174 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
175
176 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
177 cp -a dist/install/etc/hotplug $RPM_BUILD_ROOT%{_sysconfdir}
178
179 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
180 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
181
182 %py_postclean
183 rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
184 rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
185 rm -rf $RPM_BUILD_ROOT/etc/init.d
186 rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz
187 rm -f $RPM_BUILD_ROOT/boot/xen-3.gz
188
189 %clean
190 rm -rf $RPM_BUILD_ROOT
191
192 %post
193 /sbin/chkconfig --add xend
194 /sbin/chkconfig --add xendomains
195
196 %preun
197 if [ "$1" = "0" ]; then
198         %service xend stop
199         /sbin/chkconfig --del xend
200
201         %service xendomains stop
202         /sbin/chkconfig --del xendomains
203 fi
204
205 %post   libs -p /sbin/ldconfig
206 %postun libs -p /sbin/ldconfig
207
208 %files
209 %defattr(644,root,root,755)
210 %doc COPYING README docs/misc/*
211 %doc docs/html/*
212 /boot/%{name}-syms-%{version}
213 /boot/%{name}-%{version}.gz
214 /boot/%{name}.gz
215 %attr(754,root,root) /etc/rc.d/init.d/*
216 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
217 %dir %{_sysconfdir}/xen
218 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
219 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
220 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b*
221 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12]
222 %dir %{_sysconfdir}/xen/auto
223 %dir %{_sysconfdir}/xen/scripts
224 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
225 %attr(755,root,root) %{_bindir}/*
226 %attr(755,root,root) %{_sbindir}/*
227 %dir %{_libdir}/%{name}
228 %dir %{_libdir}/%{name}/bin
229 %attr(744,root,root) %{_libdir}/%{name}/bin/*
230 %if "%{_lib}" != "lib"
231 %dir %{_prefix}/lib/%{name}
232 %endif
233 %dir %{_prefix}/lib/%{name}/boot
234 %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
235 %{_datadir}/xen
236 %{py_sitedir}/fsimage.so
237 %{py_sitedir}/grub
238 %dir %{py_sitedir}/xen
239 %dir %{py_sitedir}/xen/lowlevel
240 %{py_sitedir}/xen/lowlevel/*.py*
241 %attr(755,root,root) %{py_sitedir}/xen/lowlevel/*.so
242 %{py_sitedir}/xen/sv
243 %{py_sitedir}/xen/util
244 %{py_sitedir}/xen/web
245 %{py_sitedir}/xen/xend
246 %{py_sitedir}/xen/xm
247 %{py_sitedir}/xen/xsview
248 %{py_sitedir}/xen/*.py*
249 %if "%{py_ver}" > "2.4"
250 %{py_sitedir}/*.egg-info
251 %endif
252 %{_mandir}/man?/*
253 %{_sharedstatedir}/xen
254 %{_sharedstatedir}/xenstored
255 %dir /var/run/xen-hotplug
256 %dir %attr(700,root,root) /var/run/xend
257 %dir /var/run/xenstored
258
259 %files libs
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_libdir}/lib*.so.*
262 %dir %{_libdir}/fs
263 %dir %{_libdir}/fs/ext2fs-lib
264 %dir %{_libdir}/fs/fat
265 %dir %{_libdir}/fs/iso9660
266 %dir %{_libdir}/fs/reiserfs
267 %dir %{_libdir}/fs/ufs
268 %attr(755,root,root) %{_libdir}/fs/*/*.so
269
270 %if %{without hvm}
271 %files hotplug
272 %defattr(644,root,root,755)
273 %attr(755,root,root) /etc/hotplug/*
274 %endif
275
276 %files udev
277 %defattr(644,root,root,755)
278 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
279
280 %files devel
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/lib*.so
283 %{_includedir}/*
284
285 %files static
286 %defattr(644,root,root,755)
287 %{_libdir}/lib*.a
This page took 0.04631 seconds and 4 git commands to generate.