]> git.pld-linux.org Git - packages/xen.git/blob - xen.spec
- added xen-blktap-no-aio-epoll.patch to allow tap:aio VBD
[packages/xen.git] / xen.spec
1 # TODO:
2 # - pldized init scripts
3 # - script for rc-boot
4 #
5 # Conditional build:
6 %bcond_with     pae             # build with PAE (HIGHMEM64G) support
7 %bcond_with     hvm             # build with hvm (full virtualization) support
8 #
9 Summary:        Xen - a virtual machine monitor
10 Summary(pl.UTF-8):      Xen - monitor maszyny wirtualnej
11 Name:           xen
12 %define         _major  3.0.4
13 %define         _minor  1
14 Version:        %{_major}_%{_minor}
15 Release:        0.5
16 License:        GPL
17 Group:          Applications/System
18 Source0:        http://bits.xensource.com/oss-xen/release/%{_major}-%{_minor}/src.tgz/%{name}-%{version}-src.tgz
19 # Source0-md5:  e85e16ad3dc354338e3ac4a8951f9649
20 Source1:        %{name}-xend.init
21 Source2:        %{name}-xendomains.init
22 Patch0:         %{name}-python_scripts.patch
23 Patch1:         %{name}-bash_scripts.patch
24 #Patch2:                %{name}-bridge_setup.patch
25 Patch3:         %{name}-reisermodule.patch
26 Patch4:         %{name}-gcc.patch
27 Patch5:         %{name}-blktap-no-aio-epoll.patch
28 URL:            http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
29 BuildRequires:  xorg-lib-libX11-devel
30 BuildRequires:  curl-devel
31 BuildRequires:  latex2html
32 BuildRequires:  libidn-devel
33 BuildRequires:  ncurses-devel
34 BuildRequires:  python-TwistedCore
35 BuildRequires:  python-TwistedWeb
36 BuildRequires:  python-devel
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  rpmbuild(macros) >= 1.268
39 BuildRequires:  tetex-dvips
40 BuildRequires:  tetex-format-latex
41 BuildRequires:  tetex-latex-psnfss
42 BuildRequires:  transfig
43 BuildRequires:  which
44 BuildRequires:  zlib-devel
45 %{?with_hvm:BuildRequires:      bcc}
46 Requires(post): /sbin/ldconfig
47 Requires(post,preun):   /sbin/chkconfig
48 Requires:       ZopeInterface
49 Requires:       bridge-utils
50 Requires:       kernel(xen0) = %{_major}
51 Requires:       losetup
52 Requires:       python-TwistedWeb
53 Requires:       rc-scripts
54 Obsoletes:      xen-doc
55 ExclusiveArch:  %{ix86}
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %define         _version        %(echo %{version} |tr _ -)
59
60 %ifnarch i686 athlon pentium3 pentium4
61 %undefine       with_pae
62 %endif
63
64 %description
65 This package contains the Xen hypervisor and Xen tools, needed to run
66 virtual machines on x86 systems, together with the kernel-xen*
67 packages. Information on how to use Xen can be found at the Xen
68 project pages.
69
70 Virtualisation can be used to run multiple versions or multiple Linux
71 distributions on one system, or to test untrusted applications in a
72 sandboxed environment. Note that the Xen technology is still in
73 development, and this RPM has received extremely little testing. Don't
74 be surprised if this RPM eats your data, drinks your coffee or makes
75 fun of you in front of your friends.
76
77 %description -l pl.UTF-8
78 Ten pakiet zawiera nadzorcę oraz narzędzia Xen, potrzebne do
79 uruchamiania wirtualnych maszyn w systemach x86, wraz z pakietami
80 kernel-xen*. Informacje jak używać Xena można znaleźć na stronach
81 projektu.
82
83 Wirtualizacja może być używana do uruchamiania wielu wersji lub wielu
84 dystrybucji Linuksa na jednym systemie lub do testowania nie zaufanych
85 aplikacji w odizolowanym środowisku. Należy zauważyć, że technologia
86 Xen jest ciągle rozwijana, a ten RPM był słabo testowany. Nie należy
87 być zdziwionym, jeśli ten pakiet zje dane, wypije całą kawę czy będzie
88 się wyśmiewał w obecności przyjaciół.
89
90 %package devel
91 Summary:        Header files for xen
92 Summary(pl.UTF-8):      Pliki nagłówkowe xena
93 Group:          Development/Libraries
94 Requires:       %{name} = %{epoch}:%{version}-%{release}
95
96 %description devel
97 Header files for xen.
98
99 %description devel -l pl.UTF-8
100 Pliki nagłówkowe xena.
101
102 %package static
103 Summary:        Static xen libraries
104 Summary(pl.UTF-8):      Statyczne biblioteki xena
105 Group:          Development/Libraries
106 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
107
108 %description static
109 Static xen libraries.
110
111 %description static -l pl.UTF-8
112 Statyczne biblioteki xena.
113
114 %prep
115 %setup -q -n %{name}-%{version}-src
116 %patch0 -p1
117 %patch1 -p1
118 #%patch2 -p1
119 #%patch3 -p1
120 %patch4 -p1
121 %patch5 -p1
122
123 find . -iregex .*.orig -exec rm {} \;
124
125 chmod -R u+w .
126
127
128 %build
129 CFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
130 CXXFLAGS="%{rpmcflags} -I/usr/include/ncurses" \
131 %{__make} xen tools docs \
132         %{?with_pae:XEN_TARGET_X86_PAE=y} \
133         CC="%{__cc}" \
134         CXX="%{__cxx}"
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT/var/run/{xen-hotplug,xend,xenstored}
139
140 %{__make} install-xen install-tools install-docs \
141         %{?with_pae:XEN_TARGET_X86_PAE=y} \
142         DESTDIR=$RPM_BUILD_ROOT \
143         XEN_PYTHON_NATIVE_INSTALL=1
144
145 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
146 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/xend
147 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xendomains
148
149 install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/xend-db/{domain,vnet}
150 install -d $RPM_BUILD_ROOT%{_sharedstatedir}/xen/save
151
152 rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
153
154 %{py_comp} $RPM_BUILD_ROOT%{py_sitedir}
155 %{py_ocomp} $RPM_BUILD_ROOT%{py_sitedir}
156 %{py_comp} $RPM_BUILD_ROOT%{py_sitescriptdir}
157 %{py_ocomp} $RPM_BUILD_ROOT%{py_sitescriptdir}
158
159
160 find $RPM_BUILD_ROOT%{py_sitedir} -name '*.py' -exec rm "{}" ";"
161 #find $RPM_BUILD_ROOT%{py_sitescriptdir} -name '*.py' -exec rm "{}" ";"
162 rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
163 rm -rf $RPM_BUILD_ROOT/etc/init.d
164
165 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %post
171 /sbin/ldconfig
172 /sbin/chkconfig --add xend
173 /sbin/chkconfig --add xendomains
174
175 %postun -p /sbin/ldconfig
176
177 %preun
178 if [ "$1" = "0" ]; then
179         %service xend stop
180         /sbin/chkconfig --del xend
181
182         %service xendomains stop
183         /sbin/chkconfig --del xendomains
184 fi
185
186 %files
187 %defattr(644,root,root,755)
188 %doc COPYING README docs/misc/*
189 %doc docs/html/*
190 /boot/%{name}-syms-%{_version}
191 /boot/%{name}-%{_version}.gz
192 /boot/%{name}.gz
193 %attr(754,root,root) /etc/rc.d/init.d/*
194 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
195 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
196 #%attr(755,root,root) /etc/hotplug/*
197 %dir %{_sysconfdir}/xen
198 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
199 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
200 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b*
201 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12]
202 %dir %{_sysconfdir}/xen/auto
203 %dir %{_sysconfdir}/xen/scripts
204 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
205 %attr(755,root,root) %{_bindir}/*
206 %attr(755,root,root) %{_sbindir}/*
207 %attr(755,root,root) %{_libdir}/lib*.so.*
208 %dir %{_libdir}/%{name}
209 %dir %{_libdir}/%{name}/bin
210 %attr(744,root,root) %{_libdir}/%{name}/bin/*
211 %if %{with hvm}
212 %dir %{_libdir}/%{name}/boot
213 %attr(744,root,root) %{_libdir}/%{name}/boot/hvmloader
214 %endif
215 %{_datadir}/xen
216 %{py_sitedir}/fsimage.so
217 %{py_sitedir}/grub
218 %dir %{py_sitedir}/%{name}
219 %dir %{py_sitedir}/%{name}/lowlevel
220 %{py_sitedir}/%{name}/lowlevel/*.py*
221 %attr(755,root,root) %{py_sitedir}/%{name}/lowlevel/*.so
222 %{py_sitedir}/%{name}/sv
223 %{py_sitedir}/%{name}/util
224 %{py_sitedir}/%{name}/web
225 %{py_sitedir}/%{name}/xend
226 %{py_sitedir}/%{name}/xm
227 %{py_sitedir}/%{name}/*.py*
228 #%{py_sitescriptdir}/*
229 %{_mandir}/man?/*
230 %{_sharedstatedir}/xen
231 %{_sharedstatedir}/xenstored
232 %dir /var/run/xen-hotplug
233 %dir %attr(700,root,root) /var/run/xend
234 %dir /var/run/xenstored
235
236 %files devel
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/lib*.so
239 %dir %{_libdir}/fs
240 %dir %{_libdir}/fs/ext2fs
241 %dir %{_libdir}/fs/reiserfs
242 %dir %{_libdir}/fs/ufs
243 %attr(755,root,root) %{_libdir}/fs/*/*.so
244 %{_includedir}/*
245
246 %files static
247 %defattr(644,root,root,755)
248 %{_libdir}/lib*.a
This page took 0.09757 seconds and 3 git commands to generate.