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