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