3 # - Doesn't compile without /usr/src/linux/include/linux/autoconf.h so one must
4 # symlink it before building package. This is because during compilation kernel
5 # module is being build. Since we are building kernel modules later
6 # sources/makefiles probably needs some hacking to drop this requirement.
7 # - Home page says that some addons should be compiled, I don't see any except.
8 # vboxaddon kernel module and {vboxmouse,vboxvideo)_drv.so. Are they required?
9 # - BR list was a quickie so it may be incomplete or too big.
10 # - R list probably required.
11 # - .desktop file, some wrapper to launch VirtualBox (LD_LIBRARY_PATH must include
12 # %{_libdir}/VirtualBox), maybe some init script to launch VBoxSVC.
13 # - Devel stuff is not packaged yet.
14 # - Now its EA ix86 x8664, but looking into autogenerated env.sh suggests that
15 # code may be compiled exclusively for i686.
16 # - use %kernel_build macros
19 %bcond_without dist_kernel # without distribution kernel
20 %bcond_without smp # without SMP kernel modules
23 Summary(pl.UTF-8): VirtualBox
28 Group: Applications/Emulators
29 Source0: http://www.virtualbox.org/download/%{version}/VirtualBox-OSE-%{version}.tar.bz2
30 # Source0-md5: 67853add4afc2eace5d8f45cfe9a32c5
31 Patch0: %{name}-configure.patch
32 Patch1: %{name}-qt-paths.patch
33 URL: http://www.virtualbox.org/
34 BuildRequires: SDL-devel
38 BuildRequires: gcc >= 5:3.2.3
40 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
41 BuildRequires: libIDL-devel
42 BuildRequires: libuuid-devel
43 BuildRequires: libxslt-progs
44 BuildRequires: qt-devel >= 6:3.3.6
45 BuildRequires: rpmbuild(macros) >= 1.329
46 BuildRequires: xalan-c-devel >= 1.10.0
47 #BuildRequires: xcursor-devel
48 BuildRequires: xerces-c-devel >= 2.6.0
49 BuildRequires: xorg-lib-libXcursor-devel
50 BuildRequires: zlib-devel >= 1.2.1
51 ExclusiveArch: %{ix86} %{x8664}
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 InnoTek VirtualBox is a general-purpose full virtualizer for x86
62 hardware. Targeted at server, desktop and embedded use, it is now the
63 only professional-quality virtualization solution that is also Open
66 Some of the features of VirtualBox are:
68 Modularity: VirtualBox has an extremely modular design with
69 well-defined internal programming interfaces and a client/server
70 design. This makes it easy to control it from several interfaces at
71 once: for example, you can start a virtual machine in a typical
72 virtual machine GUI and then control that machine from the command
73 line. VirtualBox also comes with a full Software Development Kit: even
74 though it is Open Source Software, you don't have to hack the source
75 to write a new interface for VirtualBox.
77 Virtual machine descriptions in XML: the configuration settings of
78 virtual machines are stored entirely in XML and are independent of the
79 local machines. Virtual machine definitions can therefore easily be
80 ported to other computers.
82 %description -l pl.UTF-8
83 InnoTek VirtualBox jest emulatorem sprzętu x86. Kierowany do
84 zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie
85 jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym
86 również jako Otwarte Oprogramowanie.
88 Przykładowe cechy VirtualBoksa:
90 Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z
91 dobrze zaprojektowanym wewnętrznym interfejsem programowym typu
92 klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą
93 różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z
94 poziomu interfejsu graficznego, a później kontrolować ją z linii
95 poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co
96 pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną.
98 Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn
99 wirtualnych są w całości przechowywane w XML-u i są niezależne od
100 lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść
101 konfigurację maszyny wirtualnej na inny komputer.
103 %package -n kernel%{_alt_kernel}-misc-vboxdrv
104 Summary: Linux kernel module for VirtualBox
105 Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa
106 Release: %{_rel}@%{_kernel_ver_str}
108 Requires(post,postun): /sbin/depmod
109 Requires: dev >= 2.9.0-7
110 %if %{with dist_kernel}
111 %requires_releq_kernel_up
112 Requires(postun): %releq_kernel_up
114 Provides: kernel(vboxdrv) = %{version}-%{_rel}
116 %description -n kernel%{_alt_kernel}-misc-vboxdrv
117 Linux kernel module vboxdrv for VirtualBox.
119 %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8
120 Moduł jądra Linuksa vboxdrv dla VirtualBoksa.
122 %package -n kernel%{_alt_kernel}-smp-misc-vboxdrv
123 Summary: Linux SMP kernel module for VirtualBox
124 Summary(pl.UTF-8): Moduł jądra Linuksa SMP dla VirtualBoksa
125 Release: %{_rel}@%{_kernel_ver_str}
127 Requires(post,postun): /sbin/depmod
128 Requires: dev >= 2.9.0-7
129 %if %{with dist_kernel}
130 %requires_releq_kernel_smp
131 Requires(postun): %releq_kernel_smp
133 Provides: kernel(vboxdrv) = %{version}-%{_rel}
135 %description -n kernel%{_alt_kernel}-smp-misc-vboxdrv
136 Linux SMP kernel module vboxdrv for VirtualBox.
138 %description -n kernel%{_alt_kernel}-smp-misc-vboxdrv -l pl.UTF-8
139 Moduł jądra Linuksa SMP vboxdrv dla VirtualBoksa.
148 --with-gcc="%{__cc}" \
149 --with-g++="%{__cxx}"
153 cd out/linux.%{_outdir}/release/bin/src
154 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
155 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
159 install -d o/include/linux
160 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
161 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
162 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
163 %if %{with dist_kernel}
164 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
166 touch o/include/config/MARKER
167 ln -sf %{_kernelsrcdir}/scripts o/scripts
169 ln -sf ../../include/VBox o/include/VBox
170 ln -sf ../../include/iprt o/include/iprt
171 %{__make} -C %{_kernelsrcdir} clean \
172 SYSSRC=%{_kernelsrcdir} \
176 %{__make} -C %{_kernelsrcdir} modules \
177 CC="%{__cc}" CPP="%{__cpp}" \
178 SYSSRC=%{_kernelsrcdir} \
182 mv vboxdrv.ko vboxdrv-$cfg.ko
186 rm -rf $RPM_BUILD_ROOT
189 $RPM_BUILD_ROOT%{_bindir} \
190 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
192 install out/linux.%{_outdir}/release/bin/{VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox} \
193 $RPM_BUILD_ROOT%{_bindir}
194 install out/linux.%{_outdir}/release/bin/VBox{DD,DD2,REM,REMImp,RT,VMM,XML,XPCOM,XPCOMIPCC}.so \
195 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
196 install out/linux.%{_outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \
197 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
200 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
201 %if %{with smp} && %{with dist_kernel}
202 install out/linux.%{_outdir}/release/bin/src/vboxdrv-smp.ko \
203 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vboxdrv.ko
208 rm -rf $RPM_BUILD_ROOT
210 %post -n kernel%{_alt_kernel}-misc-vboxdrv
211 %depmod %{_kernel_ver}
213 %postun -n kernel%{_alt_kernel}-misc-vboxdrv
214 %depmod %{_kernel_ver}
216 %if %{with smp} && %{with dist_kernel}
217 %post -n kernel%{_alt_kernel}-smp-misc-vboxdrv
218 %depmod %{_kernel_ver}smp
220 %postun -n kernel%{_alt_kernel}-smp-misc-vboxdrv
221 %depmod %{_kernel_ver}smp
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_bindir}/VBox*
227 %attr(755,root,root) %{_bindir}/VirtualBox
228 %{_libdir}/VirtualBox
230 %files -n kernel%{_alt_kernel}-misc-vboxdrv
231 %defattr(644,root,root,755)
233 %if %{with smp} && %{with dist_kernel}
234 %files -n kernel%{_alt_kernel}-smp-misc-vboxdrv
235 %defattr(644,root,root,755)