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
22 %define _snap 20070116
24 Summary(pl.UTF-8): VirtualBox
29 Group: Applications/Emulators
30 Source0: %{name}-%{version}_%{_snap}.tar.bz2
31 # Source0-md5: 8554cf552c3ad07b2ae5229c3f8825dc
32 Patch0: %{name}-configure.patch
33 Patch1: %{name}-qt-paths.patch
34 URL: http://www.virtualbox.org/
35 BuildRequires: SDL-devel
39 BuildRequires: gcc >= 5:3.2.3
41 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
42 BuildRequires: libIDL-devel
43 BuildRequires: libuuid-devel
44 BuildRequires: libxslt-progs
45 BuildRequires: qt-devel >= 6:3.3.6
46 BuildRequires: rpmbuild(macros) >= 1.329
47 BuildRequires: xalan-c-devel >= 1.10.0
48 #BuildRequires: xcursor-devel
49 BuildRequires: xerces-c-devel >= 2.6.0
50 BuildRequires: xorg-lib-libXcursor-devel
51 BuildRequires: zlib-devel >= 1.2.1
52 ExclusiveArch: %{ix86} %{x8664}
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 InnoTek VirtualBox is a general-purpose full virtualizer for x86
63 hardware. Targeted at server, desktop and embedded use, it is now the
64 only professional-quality virtualization solution that is also Open
67 Some of the features of VirtualBox are:
69 Modularity: VirtualBox has an extremely modular design with
70 well-defined internal programming interfaces and a client/server
71 design. This makes it easy to control it from several interfaces at
72 once: for example, you can start a virtual machine in a typical
73 virtual machine GUI and then control that machine from the command
74 line. VirtualBox also comes with a full Software Development Kit: even
75 though it is Open Source Software, you don't have to hack the source
76 to write a new interface for VirtualBox.
78 Virtual machine descriptions in XML: the configuration settings of
79 virtual machines are stored entirely in XML and are independent of the
80 local machines. Virtual machine definitions can therefore easily be
81 ported to other computers.
83 %description -l pl.UTF-8
84 InnoTek VirtualBox jest emulatorem sprzętu x86. Kierowany do
85 zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie
86 jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym
87 również jako Otwarte Oprogramowanie.
89 Przykładowe cechy VirtualBoksa:
91 Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z
92 dobrze zaprojektowanym wewnętrznym interfejsem programowym typu
93 klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą
94 różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z
95 poziomu interfejsu graficznego, a później kontrolować ją z linii
96 poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co
97 pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną.
99 Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn
100 wirtualnych są w całości przechowywane w XML-u i są niezależne od
101 lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść
102 konfigurację maszyny wirtualnej na inny komputer.
104 %package -n kernel%{_alt_kernel}-misc-vboxdrv
105 Summary: Linux kernel module for VirtualBox
106 Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa
107 Release: %{_rel}@%{_kernel_ver_str}
109 Requires(post,postun): /sbin/depmod
110 Requires: dev >= 2.9.0-7
111 %if %{with dist_kernel}
112 %requires_releq_kernel_up
113 Requires(postun): %releq_kernel_up
115 Provides: kernel(vboxdrv) = %{version}-%{_rel}
117 %description -n kernel%{_alt_kernel}-misc-vboxdrv
118 Linux kernel module vboxdrv for VirtualBox.
120 %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8
121 Moduł jądra Linuksa vboxdrv dla VirtualBoksa.
123 %package -n kernel%{_alt_kernel}-smp-misc-vboxdrv
124 Summary: Linux SMP kernel module for VirtualBox
125 Summary(pl.UTF-8): Moduł jądra Linuksa SMP dla VirtualBoksa
126 Release: %{_rel}@%{_kernel_ver_str}
128 Requires(post,postun): /sbin/depmod
129 Requires: dev >= 2.9.0-7
130 %if %{with dist_kernel}
131 %requires_releq_kernel_smp
132 Requires(postun): %releq_kernel_smp
134 Provides: kernel(vboxdrv) = %{version}-%{_rel}
136 %description -n kernel%{_alt_kernel}-smp-misc-vboxdrv
137 Linux SMP kernel module vboxdrv for VirtualBox.
139 %description -n kernel%{_alt_kernel}-smp-misc-vboxdrv -l pl.UTF-8
140 Moduł jądra Linuksa SMP vboxdrv dla VirtualBoksa.
149 --with-gcc="%{__cc}" \
150 --with-g++="%{__cxx}"
154 cd out/linux.%{_outdir}/release/bin/src
155 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
156 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
160 install -d o/include/linux
161 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
162 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
163 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
164 %if %{with dist_kernel}
165 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
167 touch o/include/config/MARKER
168 ln -sf %{_kernelsrcdir}/scripts o/scripts
170 ln -sf ../../include/VBox o/include/VBox
171 ln -sf ../../include/iprt o/include/iprt
172 %{__make} -C %{_kernelsrcdir} clean \
173 SYSSRC=%{_kernelsrcdir} \
177 %{__make} -C %{_kernelsrcdir} modules \
178 CC="%{__cc}" CPP="%{__cpp}" \
179 SYSSRC=%{_kernelsrcdir} \
183 mv vboxdrv.ko vboxdrv-$cfg.ko
187 rm -rf $RPM_BUILD_ROOT
190 $RPM_BUILD_ROOT%{_bindir} \
191 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
193 install out/linux.%{_outdir}/release/bin/{VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox} \
194 $RPM_BUILD_ROOT%{_bindir}
195 install out/linux.%{_outdir}/release/bin/VBox{DD,DD2,REM,REMImp,RT,VMM,XML,XPCOM,XPCOMIPCC}.so \
196 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
197 install out/linux.%{_outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \
198 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
201 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
202 %if %{with smp} && %{with dist_kernel}
203 install out/linux.%{_outdir}/release/bin/src/vboxdrv-smp.ko \
204 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/vboxdrv.ko
209 rm -rf $RPM_BUILD_ROOT
211 %post -n kernel%{_alt_kernel}-misc-vboxdrv
212 %depmod %{_kernel_ver}
214 %postun -n kernel%{_alt_kernel}-misc-vboxdrv
215 %depmod %{_kernel_ver}
217 %if %{with smp} && %{with dist_kernel}
218 %post -n kernel%{_alt_kernel}-smp-misc-vboxdrv
219 %depmod %{_kernel_ver}smp
221 %postun -n kernel%{_alt_kernel}-smp-misc-vboxdrv
222 %depmod %{_kernel_ver}smp
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{_bindir}/VBox*
228 %attr(755,root,root) %{_bindir}/VirtualBox
229 %{_libdir}/VirtualBox
231 %files -n kernel%{_alt_kernel}-misc-vboxdrv
232 %defattr(644,root,root,755)
234 %if %{with smp} && %{with dist_kernel}
235 %files -n kernel%{_alt_kernel}-smp-misc-vboxdrv
236 %defattr(644,root,root,755)