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