]> git.pld-linux.org Git - packages/VirtualBox.git/blame - VirtualBox.spec
- added UserManual
[packages/VirtualBox.git] / VirtualBox.spec
CommitLineData
48363591 1#
2# TODO:
48363591 3# - Home page says that some addons should be compiled, I don't see any except.
4# vboxaddon kernel module and {vboxmouse,vboxvideo)_drv.so. Are they required?
05f1b1f5 5# - .desktop file
6# - it seems that VBoxSVC should not be started by init script but I'm still
7# testing this
8# - /dev/vboxdrv should belong to vboxusers group and have rw rights to it
48363591 9# - Devel stuff is not packaged yet.
eba4b2aa
JB
10# - Now its EA ix86 x8664, but looking into autogenerated env.sh suggests that
11# code may be compiled exclusively for i686.
32b670ab 12# - use %kernel_build macros
48363591 13#
14# Conditional build:
15%bcond_without dist_kernel # without distribution kernel
05f1b1f5 16%bcond_without up # without up packages
48363591 17%bcond_without smp # without SMP kernel modules
05f1b1f5 18
19%define _rel 0.2
20
48363591 21Summary: VirtualBox
4dab3322 22Summary(pl.UTF-8): VirtualBox
48363591 23Name: VirtualBox
722f3faf 24Version: 1.3.6
05f1b1f5 25Release: %{_rel}
48363591 26License: GPL v2
27Group: Applications/Emulators
245db1e9 28Source0: http://www.virtualbox.org/download/%{version}/VirtualBox-OSE-%{version}.tar.bz2
722f3faf 29# Source0-md5: 70c24ccee8b5778efd8d22f9996fbec9
05f1b1f5 30Source1: virtualbox.init
7d1c0a63 31Source2: http://www.virtualbox.org/download/UserManual.pdf
32# Source2-md5: 2e5458bd5b4b9acd18cc86866e8a7284
48363591 33Patch0: %{name}-configure.patch
34Patch1: %{name}-qt-paths.patch
35URL: http://www.virtualbox.org/
36BuildRequires: SDL-devel
e5aaadde 37BuildRequires: bash
48363591 38BuildRequires: bcc
39BuildRequires: bin86
eba4b2aa 40BuildRequires: gcc >= 5:3.2.3
48363591 41BuildRequires: iasl
42%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
43BuildRequires: libIDL-devel
44BuildRequires: libuuid-devel
e5aaadde 45BuildRequires: libxslt-progs
46BuildRequires: qt-devel >= 6:3.3.6
48363591 47BuildRequires: rpmbuild(macros) >= 1.329
e5aaadde 48BuildRequires: xalan-c-devel >= 1.10.0
eba4b2aa 49#BuildRequires: xcursor-devel
e5aaadde 50BuildRequires: xerces-c-devel >= 2.6.0
eba4b2aa 51BuildRequires: xorg-lib-libXcursor-devel
e5aaadde 52BuildRequires: zlib-devel >= 1.2.1
05f1b1f5 53Requires: kernel(vboxdrv) = %{version}-%{_rel}
eba4b2aa 54ExclusiveArch: %{ix86} %{x8664}
48363591 55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
eba4b2aa 57%ifarch %{x8664}
5088674d 58%define _outdir amd64
59%else
60%define _outdir x86
61%endif
62
48363591 63%description
64InnoTek VirtualBox is a general-purpose full virtualizer for x86
65hardware. Targeted at server, desktop and embedded use, it is now the
66only professional-quality virtualization solution that is also Open
67Source Software.
68
69Some of the features of VirtualBox are:
70
71Modularity: VirtualBox has an extremely modular design with
72well-defined internal programming interfaces and a client/server
73design. This makes it easy to control it from several interfaces at
74once: for example, you can start a virtual machine in a typical
75virtual machine GUI and then control that machine from the command
76line. VirtualBox also comes with a full Software Development Kit: even
77though it is Open Source Software, you don't have to hack the source
78to write a new interface for VirtualBox.
79
80Virtual machine descriptions in XML: the configuration settings of
81virtual machines are stored entirely in XML and are independent of the
82local machines. Virtual machine definitions can therefore easily be
83ported to other computers.
84
fd8fc899
JR
85%description -l pl.UTF-8
86InnoTek VirtualBox jest emulatorem sprzętu x86. Kierowany do
87zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie
88jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym
89również jako Otwarte Oprogramowanie.
48363591 90
fd8fc899 91Przykładowe cechy VirtualBoksa:
48363591 92
fd8fc899
JR
93Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z
94dobrze zaprojektowanym wewnętrznym interfejsem programowym typu
95klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą
96różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z
97poziomu interfejsu graficznego, a później kontrolować ją z linii
98poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co
99pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną.
48363591 100
fd8fc899
JR
101Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn
102wirtualnych są w całości przechowywane w XML-u i są niezależne od
103lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść
104konfigurację maszyny wirtualnej na inny komputer.
48363591 105
106%package -n kernel%{_alt_kernel}-misc-vboxdrv
eba4b2aa 107Summary: Linux kernel module for VirtualBox
4dab3322 108Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa
48363591 109Release: %{_rel}@%{_kernel_ver_str}
110Group: Base/Kernel
111Requires(post,postun): /sbin/depmod
112Requires: dev >= 2.9.0-7
113%if %{with dist_kernel}
114%requires_releq_kernel_up
115Requires(postun): %releq_kernel_up
116%endif
117Provides: kernel(vboxdrv) = %{version}-%{_rel}
118
119%description -n kernel%{_alt_kernel}-misc-vboxdrv
eba4b2aa 120Linux kernel module vboxdrv for VirtualBox.
48363591 121
fd8fc899
JR
122%description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8
123Moduł jądra Linuksa vboxdrv dla VirtualBoksa.
48363591 124
125%package -n kernel%{_alt_kernel}-smp-misc-vboxdrv
eba4b2aa 126Summary: Linux SMP kernel module for VirtualBox
4dab3322 127Summary(pl.UTF-8): Moduł jądra Linuksa SMP dla VirtualBoksa
48363591 128Release: %{_rel}@%{_kernel_ver_str}
129Group: Base/Kernel
130Requires(post,postun): /sbin/depmod
131Requires: dev >= 2.9.0-7
132%if %{with dist_kernel}
133%requires_releq_kernel_smp
134Requires(postun): %releq_kernel_smp
135%endif
136Provides: kernel(vboxdrv) = %{version}-%{_rel}
137
138%description -n kernel%{_alt_kernel}-smp-misc-vboxdrv
eba4b2aa 139Linux SMP kernel module vboxdrv for VirtualBox.
48363591 140
fd8fc899
JR
141%description -n kernel%{_alt_kernel}-smp-misc-vboxdrv -l pl.UTF-8
142Moduł jądra Linuksa SMP vboxdrv dla VirtualBoksa.
48363591 143
144%prep
b8f15f8d 145%setup -q -n %{name}-OSE-%{version}
48363591 146%patch0 -p0
147%patch1 -p0
148
5085c54c
ER
149cat > VBox.sh <<'EOF'
150#!/bin/sh
151
152if [ ! -c /dev/vboxdrv ]; then
153 echo "Special character device /dev/vboxdrv doesn't exists!"
154 echo "Check your installation and if vboxdrv kernel module is loaded."
155 exit 1
156fi
157
158if [ ! -w /dev/vboxdrv ]; then
159 echo "You don't have write access to /dev/vboxdrv!"
160 echo "Correct this situation or contact with your system administrator."
161 exit 1
162fi
163
164BINFILE=$(basename "$0")
165LD_LIBRARY_PATH=%{_libdir}/VirtualBox %{_libdir}/VirtualBox/$BINFILE ${1:+"$@"}
166EOF
167
48363591 168%build
05f1b1f5 169KDIR="%{_builddir}/%{buildsubdir}/kernel"
170mkdir -p $KDIR
171cp -a %{_kernelsrcdir}/include $KDIR
172%ifarch %{x8664}
173ln -sf $KDIR/include/asm-x86_64 $KDIR/include/asm
174%else
175ln -sf $KDIR/include/asm-i386 $KDIR/include/asm
176%endif
177ln -sf $KDIR/include/linux/autoconf-up.h $KDIR/include/linux/autoconf.h
178
106d8451 179./configure \
180 --with-gcc="%{__cc}" \
05f1b1f5 181 --with-g++="%{__cxx}" \
182 --with-linux="$KDIR"
48363591 183. ./env.sh
184kmk
185
5088674d 186cd out/linux.%{_outdir}/release/bin/src
48363591 187for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
188 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
189 exit 1
190 fi
191 rm -rf o
192 install -d o/include/linux
193 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
194 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
195 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
196%if %{with dist_kernel}
197 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
198%else
199 touch o/include/config/MARKER
200 ln -sf %{_kernelsrcdir}/scripts o/scripts
201%endif
202 ln -sf ../../include/VBox o/include/VBox
203 ln -sf ../../include/iprt o/include/iprt
204 %{__make} -C %{_kernelsrcdir} clean \
205 SYSSRC=%{_kernelsrcdir} \
206 SYSOUT=$PWD/o \
207 M=$PWD O=$PWD/o \
208 %{?with_verbose:V=1}
209 %{__make} -C %{_kernelsrcdir} modules \
210 CC="%{__cc}" CPP="%{__cpp}" \
211 SYSSRC=%{_kernelsrcdir} \
212 SYSOUT=$PWD/o \
213 M=$PWD O=$PWD/o \
214 %{?with_verbose:V=1}
05f1b1f5 215 mv vboxdrv.ko ../../../../../vboxdrv-$cfg.ko
48363591 216done
217
218%install
219rm -rf $RPM_BUILD_ROOT
220
221install -d \
222 $RPM_BUILD_ROOT%{_bindir} \
05f1b1f5 223 $RPM_BUILD_ROOT%{_libdir}/VirtualBox \
224 $RPM_BUILD_ROOT/etc/rc.d/init.d
225
5085c54c
ER
226for f in {VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox}; do
227 install out/linux.%{_outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f
228 install VBox.sh $RPM_BUILD_ROOT%{_bindir}/$f
05f1b1f5 229done
230
231install out/linux.%{_outdir}/release/bin/VBox{C,DD,DD2,REM,REMImp,RT,VMM,XML,XPCOM,XPCOMIPCC}.so \
48363591 232 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
05f1b1f5 233install out/linux.%{_outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0},*.xpt} \
48363591 234 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
235
48363591 236install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
05f1b1f5 237install vboxdrv-up.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vboxdrv.ko
48363591 238%if %{with smp} && %{with dist_kernel}
05f1b1f5 239install vboxdrv-smp.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vboxdrv.ko
48363591 240%endif
241
05f1b1f5 242cp -a out/linux.%{_outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox
243install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/virtualbox
244
7d1c0a63 245cp %{SOURCE2} .
246
48363591 247%clean
248rm -rf $RPM_BUILD_ROOT
249
05f1b1f5 250%post
251/sbin/chkconfig --add virtualbox
252%service virtualbox restart "VBoxSVC daemon"
253
254%preun
255if [ "$1" = "0" ]; then
256 %service virtualbox stop
257 /sbin/chkconfig --del virtualbox
258fi
259
48363591 260%post -n kernel%{_alt_kernel}-misc-vboxdrv
261%depmod %{_kernel_ver}
262
263%postun -n kernel%{_alt_kernel}-misc-vboxdrv
264%depmod %{_kernel_ver}
265
266%if %{with smp} && %{with dist_kernel}
267%post -n kernel%{_alt_kernel}-smp-misc-vboxdrv
268%depmod %{_kernel_ver}smp
269
270%postun -n kernel%{_alt_kernel}-smp-misc-vboxdrv
271%depmod %{_kernel_ver}smp
272%endif
273
274%files
275%defattr(644,root,root,755)
7d1c0a63 276%doc UserManual.pdf
05f1b1f5 277%dir %{_libdir}/VirtualBox
278%dir %{_libdir}/VirtualBox/components
48363591 279%attr(755,root,root) %{_bindir}/VBox*
280%attr(755,root,root) %{_bindir}/VirtualBox
05f1b1f5 281%attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC
282%attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE
283%attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage
284%attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL
285%attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD
286%attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox
287%{_libdir}/VirtualBox/*.gc
288%{_libdir}/VirtualBox/*.r0
289%{_libdir}/VirtualBox/VBox*.so
290%{_libdir}/VirtualBox/*.xpt
291%{_libdir}/VirtualBox/components/*
292%attr(754,root,root) /etc/rc.d/init.d/virtualbox
48363591 293
05f1b1f5 294%if %{with up} || %{without dist_kernel}
48363591 295%files -n kernel%{_alt_kernel}-misc-vboxdrv
296%defattr(644,root,root,755)
05f1b1f5 297/lib/modules/%{_kernel_ver}/misc/vboxdrv.ko.gz
298%endif
48363591 299
300%if %{with smp} && %{with dist_kernel}
301%files -n kernel%{_alt_kernel}-smp-misc-vboxdrv
302%defattr(644,root,root,755)
05f1b1f5 303/lib/modules/%{_kernel_ver}smp/misc/vboxdrv.ko.gz
48363591 304%endif
This page took 0.081007 seconds and 4 git commands to generate.