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