]> git.pld-linux.org Git - packages/xen.git/blob - xen.spec
- pass CC also at install stage (used to check gcc version)
[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 rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/COPYING
177
178 %{py_comp} $RPM_BUILD_ROOT%{py_sitedir}
179 %{py_ocomp} $RPM_BUILD_ROOT%{py_sitedir}
180 %{py_comp} $RPM_BUILD_ROOT%{py_sitescriptdir}
181 %{py_ocomp} $RPM_BUILD_ROOT%{py_sitescriptdir}
182
183 cp -a dist/install/etc/udev $RPM_BUILD_ROOT%{_sysconfdir}
184
185 # remove unneeded files
186 #find $RPM_BUILD_ROOT%{py_sitedir} -name '*.py' -exec rm "{}" ";"
187 #find $RPM_BUILD_ROOT%{py_sitescriptdir} -name '*.py' -exec rm "{}" ";"
188 rm -rf $RPM_BUILD_ROOT%{_docdir}/xen
189 rm -rf $RPM_BUILD_ROOT/etc/init.d
190 rm -f $RPM_BUILD_ROOT/boot/xen-3.2.gz
191 rm -f $RPM_BUILD_ROOT/boot/xen-3.gz
192
193 %clean
194 rm -rf $RPM_BUILD_ROOT
195
196 %post
197 /sbin/chkconfig --add xend
198 /sbin/chkconfig --add xendomains
199
200 %preun
201 if [ "$1" = "0" ]; then
202         %service xend stop
203         /sbin/chkconfig --del xend
204
205         %service xendomains stop
206         /sbin/chkconfig --del xendomains
207 fi
208
209 %post   libs -p /sbin/ldconfig
210 %postun libs -p /sbin/ldconfig
211
212 %files
213 %defattr(644,root,root,755)
214 %doc COPYING README docs/misc/*
215 %doc docs/html/*
216 /boot/%{name}-syms-%{version}
217 /boot/%{name}-%{version}.gz
218 /boot/%{name}.gz
219 %attr(754,root,root) /etc/rc.d/init.d/*
220 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
221 %dir %{_sysconfdir}/xen
222 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/qemu-ifup
223 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/*.*
224 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/b*
225 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/xmexample[12]
226 %dir %{_sysconfdir}/xen/auto
227 %dir %{_sysconfdir}/xen/scripts
228 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xen/scripts/*
229 %attr(755,root,root) %{_bindir}/*
230 %attr(755,root,root) %{_sbindir}/*
231 %dir %{_libdir}/%{name}
232 %dir %{_libdir}/%{name}/bin
233 %attr(744,root,root) %{_libdir}/%{name}/bin/*
234 %dir %{_prefix}/lib/%{name}
235 %dir %{_prefix}/lib/%{name}/boot
236 %attr(744,root,root) %{_prefix}/lib/%{name}/boot/hvmloader
237 %{_datadir}/xen
238 %{py_sitedir}/fsimage.so
239 %{py_sitedir}/grub
240 %dir %{py_sitedir}/%{name}
241 %dir %{py_sitedir}/%{name}/lowlevel
242 %{py_sitedir}/%{name}/lowlevel/*.py*
243 %attr(755,root,root) %{py_sitedir}/%{name}/lowlevel/*.so
244 %{py_sitedir}/%{name}/sv
245 %{py_sitedir}/%{name}/util
246 %{py_sitedir}/%{name}/web
247 %{py_sitedir}/%{name}/xend
248 %{py_sitedir}/%{name}/xm
249 %{py_sitedir}/%{name}/xsview
250 %{py_sitedir}/%{name}/*.py*
251 %if "%{py_ver}" > "2.4"
252 %{py_sitedir}/*.egg-info
253 %endif
254 #%{py_sitescriptdir}/*
255 %{_mandir}/man?/*
256 %{_sharedstatedir}/xen
257 %{_sharedstatedir}/xenstored
258 %dir /var/run/xen-hotplug
259 %dir %attr(700,root,root) /var/run/xend
260 %dir /var/run/xenstored
261
262 %files libs
263 %defattr(644,root,root,755)
264 %attr(755,root,root) %{_libdir}/lib*.so.*
265 %dir %{_libdir}/fs
266 %dir %{_libdir}/fs/ext2fs-lib
267 %dir %{_libdir}/fs/fat
268 %dir %{_libdir}/fs/iso9660
269 %dir %{_libdir}/fs/reiserfs
270 %dir %{_libdir}/fs/ufs
271 %attr(755,root,root) %{_libdir}/fs/*/*.so
272
273 %if %{without hvm}
274 %files hotplug
275 %defattr(644,root,root,755)
276 %attr(755,root,root) /etc/hotplug/*
277 %endif
278
279 %files udev
280 %defattr(644,root,root,755)
281 %config(noreplace) %verify(not md5 mtime size) /etc/udev/*
282
283 %files devel
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_libdir}/lib*.so
286 %{_includedir}/*
287
288 %files static
289 %defattr(644,root,root,755)
290 %{_libdir}/lib*.a
This page took 0.072491 seconds and 4 git commands to generate.