]>
Commit | Line | Data |
---|---|---|
48363591 | 1 | # |
2 | # TODO: | |
74268e47 | 3 | # - Find how to compile with PLD CFLAGS/CXXFLAGS/LDFLAGS. |
74268e47 | 4 | # - Package SDK. |
09c79ddb | 5 | # - Package utils (and write initscripts ?) for Guest OS. |
fdd1c725 | 6 | # - Add udev rule. |
48363591 | 7 | # |
8 | # Conditional build: | |
9 | %bcond_without dist_kernel # without distribution kernel | |
d1c4ec5b | 10 | %bcond_without kernel # don't build kernel module |
d1c4ec5b | 11 | %bcond_without userspace # don't build userspace package |
05f1b1f5 | 12 | |
74268e47 | 13 | %define _rel 1 |
05f1b1f5 | 14 | |
8833bce1 | 15 | %if %{without kernel} |
16 | %undefine with_dist_kernel | |
17 | %endif | |
18 | ||
d1c4ec5b JB |
19 | Summary: VirtualBox - x86 hardware virtualizer |
20 | Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86 | |
48363591 | 21 | Name: VirtualBox |
d6f0c54e | 22 | Version: 1.5.0 |
05f1b1f5 | 23 | Release: %{_rel} |
48363591 | 24 | License: GPL v2 |
25 | Group: Applications/Emulators | |
5f1cec1f | 26 | Source0: http://www.virtualbox.org/download/%{version}/%{name}-%{version}_OSE.tar.bz2 |
d6f0c54e | 27 | # Source0-md5: 56c074900260c109ed735c08e726fe81 |
fdd1c725 | 28 | Source1: http://www.virtualbox.org/download/UserManual.pdf |
7d1c0a63 | 29 | # Source2-md5: 2e5458bd5b4b9acd18cc86866e8a7284 |
fdd1c725 | 30 | Source2: %{name}.desktop |
31 | Source3: %{name}.sh | |
48363591 | 32 | Patch0: %{name}-configure.patch |
33 | Patch1: %{name}-qt-paths.patch | |
74268e47 | 34 | Patch2: %{name}-shared-libstdc++.patch |
48363591 | 35 | URL: http://www.virtualbox.org/ |
36 | BuildRequires: SDL-devel | |
e5aaadde | 37 | BuildRequires: bash |
48363591 | 38 | BuildRequires: bcc |
39 | BuildRequires: bin86 | |
eba4b2aa | 40 | BuildRequires: gcc >= 5:3.2.3 |
48363591 | 41 | BuildRequires: iasl |
42 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7} | |
43 | BuildRequires: libIDL-devel | |
44 | BuildRequires: libuuid-devel | |
e5aaadde | 45 | BuildRequires: libxslt-progs |
46 | BuildRequires: qt-devel >= 6:3.3.6 | |
d6f0c54e | 47 | BuildRequires: qt-linguist |
48363591 | 48 | BuildRequires: rpmbuild(macros) >= 1.329 |
e5aaadde | 49 | BuildRequires: xalan-c-devel >= 1.10.0 |
e5aaadde | 50 | BuildRequires: xerces-c-devel >= 2.6.0 |
eba4b2aa | 51 | BuildRequires: xorg-lib-libXcursor-devel |
e5aaadde | 52 | BuildRequires: zlib-devel >= 1.2.1 |
5f1cec1f ER |
53 | Requires(postun): /usr/sbin/groupdel |
54 | Requires(pre): /usr/bin/getgid | |
55 | Requires(pre): /usr/sbin/groupadd | |
fb661e50 | 56 | Suggests: gxmessage |
5f1cec1f | 57 | Provides: group(vbox) |
eba4b2aa | 58 | ExclusiveArch: %{ix86} %{x8664} |
48363591 | 59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
60 | ||
eba4b2aa | 61 | %ifarch %{x8664} |
5088674d | 62 | %define _outdir amd64 |
63 | %else | |
64 | %define _outdir x86 | |
65 | %endif | |
66 | ||
48363591 | 67 | %description |
68 | InnoTek VirtualBox is a general-purpose full virtualizer for x86 | |
69 | hardware. Targeted at server, desktop and embedded use, it is now the | |
70 | only professional-quality virtualization solution that is also Open | |
71 | Source Software. | |
72 | ||
73 | Some of the features of VirtualBox are: | |
74 | ||
75 | Modularity: VirtualBox has an extremely modular design with | |
76 | well-defined internal programming interfaces and a client/server | |
77 | design. This makes it easy to control it from several interfaces at | |
78 | once: for example, you can start a virtual machine in a typical | |
79 | virtual machine GUI and then control that machine from the command | |
80 | line. VirtualBox also comes with a full Software Development Kit: even | |
81 | though it is Open Source Software, you don't have to hack the source | |
82 | to write a new interface for VirtualBox. | |
83 | ||
84 | Virtual machine descriptions in XML: the configuration settings of | |
85 | virtual machines are stored entirely in XML and are independent of the | |
86 | local machines. Virtual machine definitions can therefore easily be | |
87 | ported to other computers. | |
88 | ||
fd8fc899 JR |
89 | %description -l pl.UTF-8 |
90 | InnoTek VirtualBox jest emulatorem sprzętu x86. Kierowany do | |
91 | zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie | |
92 | jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym | |
93 | również jako Otwarte Oprogramowanie. | |
48363591 | 94 | |
fd8fc899 | 95 | Przykładowe cechy VirtualBoksa: |
48363591 | 96 | |
fd8fc899 JR |
97 | Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z |
98 | dobrze zaprojektowanym wewnętrznym interfejsem programowym typu | |
99 | klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą | |
100 | różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z | |
101 | poziomu interfejsu graficznego, a później kontrolować ją z linii | |
102 | poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co | |
103 | pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną. | |
48363591 | 104 | |
fd8fc899 JR |
105 | Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn |
106 | wirtualnych są w całości przechowywane w XML-u i są niezależne od | |
107 | lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść | |
108 | konfigurację maszyny wirtualnej na inny komputer. | |
48363591 | 109 | |
74268e47 | 110 | %package -n kernel%{_alt_kernel}-misc-vboxadd |
111 | Summary: Linux kernel module for VirtualBox | |
112 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
113 | Release: %{_rel}@%{_kernel_ver_str} | |
114 | Group: Base/Kernel | |
115 | Requires(post,postun): /sbin/depmod | |
116 | Requires: dev >= 2.9.0-7 | |
117 | %if %{with dist_kernel} | |
118 | %requires_releq_kernel | |
119 | Requires(postun): %releq_kernel | |
120 | %endif | |
121 | Provides: kernel(vboxadd) = %{version}-%{_rel} | |
122 | ||
123 | %description -n kernel%{_alt_kernel}-misc-vboxadd | |
124 | Linux kernel module vboxadd for VirtualBox. | |
125 | ||
126 | %description -n kernel%{_alt_kernel}-misc-vboxadd -l pl.UTF-8 | |
127 | Moduł jądra Linuksa vboxadd dla VirtualBoksa. | |
128 | ||
48363591 | 129 | %package -n kernel%{_alt_kernel}-misc-vboxdrv |
eba4b2aa | 130 | Summary: Linux kernel module for VirtualBox |
4dab3322 | 131 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa |
48363591 | 132 | Release: %{_rel}@%{_kernel_ver_str} |
133 | Group: Base/Kernel | |
134 | Requires(post,postun): /sbin/depmod | |
135 | Requires: dev >= 2.9.0-7 | |
136 | %if %{with dist_kernel} | |
d6f0c54e | 137 | %requires_releq_kernel |
138 | Requires(postun): %releq_kernel | |
48363591 | 139 | %endif |
140 | Provides: kernel(vboxdrv) = %{version}-%{_rel} | |
141 | ||
142 | %description -n kernel%{_alt_kernel}-misc-vboxdrv | |
eba4b2aa | 143 | Linux kernel module vboxdrv for VirtualBox. |
48363591 | 144 | |
fd8fc899 JR |
145 | %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8 |
146 | Moduł jądra Linuksa vboxdrv dla VirtualBoksa. | |
48363591 | 147 | |
74268e47 | 148 | %package -n kernel%{_alt_kernel}-misc-vboxvfs |
149 | Summary: Linux kernel module for VirtualBox | |
150 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
151 | Release: %{_rel}@%{_kernel_ver_str} | |
152 | Group: Base/Kernel | |
153 | Requires(post,postun): /sbin/depmod | |
154 | Requires: dev >= 2.9.0-7 | |
155 | %if %{with dist_kernel} | |
156 | %requires_releq_kernel | |
157 | Requires(postun): %releq_kernel | |
158 | %endif | |
159 | Provides: kernel(vboxvfs) = %{version}-%{_rel} | |
160 | ||
161 | %description -n kernel%{_alt_kernel}-misc-vboxvfs | |
162 | Linux kernel module vboxvfs for VirtualBox. | |
163 | ||
164 | %description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8 | |
165 | Moduł jądra Linuksa vboxvfs dla VirtualBoksa. | |
166 | ||
09c79ddb | 167 | %package -n xorg-driver-input-vboxmouse |
168 | Summary: X.org mouse driver for VirtualBox guest OS | |
169 | Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBox'ie | |
170 | Release: %{_rel} | |
171 | Group: X11/Applications | |
172 | Requires: xorg-xserver-server >= 1.0.99.901 | |
173 | ||
174 | %description -n xorg-driver-input-vboxmouse | |
175 | X.org mouse driver for VirtualBox guest OS. | |
176 | ||
177 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
178 | Sterownik myszy dla systemu gościa w VirtualBox'ie. | |
179 | ||
180 | %package -n xorg-driver-video-vboxvideo | |
181 | Summary: X.org video driver for VirtualBox guest OS | |
182 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBox'ie | |
183 | Release: %{_rel} | |
184 | Group: X11/Applications | |
185 | Requires: xorg-xserver-server >= 1.0.99.901 | |
186 | ||
187 | %description -n xorg-driver-video-vboxvideo | |
188 | X.org video driver for VirtualBox guest OS. | |
189 | ||
190 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
191 | Sterownik grafiki dla systemu gościa w VirtualBox'ie. | |
192 | ||
48363591 | 193 | %prep |
d6f0c54e | 194 | %setup -q -n %{name}-%{version}_OSE |
48363591 | 195 | %patch0 -p0 |
196 | %patch1 -p0 | |
74268e47 | 197 | %patch2 -p1 |
fdd1c725 | 198 | install %{SOURCE1} . |
fa19f650 | 199 | |
48363591 | 200 | %build |
05f1b1f5 | 201 | KDIR="%{_builddir}/%{buildsubdir}/kernel" |
202 | mkdir -p $KDIR | |
74268e47 | 203 | cp -Ra %{_kernelsrcdir}/include $KDIR |
05f1b1f5 | 204 | %ifarch %{x8664} |
205 | ln -sf $KDIR/include/asm-x86_64 $KDIR/include/asm | |
206 | %else | |
207 | ln -sf $KDIR/include/asm-i386 $KDIR/include/asm | |
208 | %endif | |
74268e47 | 209 | |
210 | %if %{with dist_kernel} | |
211 | [ ! -f $KDIR/include/linux/autoconf.h ] && \ | |
212 | ln -sf $KDIR/include/linux/autoconf-dist.h $KDIR/include/linux/autoconf.h | |
213 | %else | |
214 | [ ! -f $KDIR/include/linux/autoconf.h ] && \ | |
215 | ln -sf $KDIR/include/linux/autoconf-nondist.h $KDIR/include/linux/autoconf.h | |
216 | %endif | |
05f1b1f5 | 217 | |
106d8451 | 218 | ./configure \ |
219 | --with-gcc="%{__cc}" \ | |
05f1b1f5 | 220 | --with-g++="%{__cxx}" \ |
221 | --with-linux="$KDIR" | |
48363591 | 222 | |
74268e47 | 223 | %if %{with userspace} |
224 | . ./env.sh && kmk -j1 | |
48363591 | 225 | %endif |
74268e47 | 226 | |
227 | %if %{with kernel} | |
228 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD | |
229 | ||
230 | ../src/VBox/HostDrivers/Support/linux/export_modules modules.tar.gz && \ | |
231 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
232 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
233 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
234 | ||
235 | %build_kernel_modules -m vboxadd -C vboxadd | |
236 | %build_kernel_modules -m vboxdrv -C vboxdrv | |
237 | %build_kernel_modules -m vboxvfs -C vboxvfs | |
238 | cd .. | |
d1c4ec5b | 239 | %endif |
48363591 | 240 | |
241 | %install | |
242 | rm -rf $RPM_BUILD_ROOT | |
243 | ||
d1c4ec5b | 244 | %if %{with userspace} |
48363591 | 245 | install -d \ |
d89980c7 | 246 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ |
05f1b1f5 | 247 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox \ |
09c79ddb | 248 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers \ |
249 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input | |
05f1b1f5 | 250 | |
fdd1c725 | 251 | install %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/VirtualBox-wrapper.sh |
09c79ddb | 252 | for f in {VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox,vditool}; do |
5085c54c | 253 | install out/linux.%{_outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 254 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 255 | done |
256 | ||
d6f0c54e | 257 | install out/linux.%{_outdir}/release/bin/VBox*.so \ |
48363591 | 258 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
05f1b1f5 | 259 | install out/linux.%{_outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0},*.xpt} \ |
48363591 | 260 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
261 | ||
d1c4ec5b | 262 | cp -a out/linux.%{_outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
8833bce1 | 263 | |
264 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
265 | cp -a out/linux.%{_outdir}/release/bin/nls/VirtualBox* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
266 | ||
09c79ddb | 267 | install out/linux.%{_outdir}/release/bin/additions/mountvboxsf \ |
268 | $RPM_BUILD_ROOT%{_bindir} | |
269 | ||
270 | install out/linux.%{_outdir}/release/bin/additions/vboxmouse_drv_71.so \ | |
271 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
272 | ||
273 | install out/linux.%{_outdir}/release/bin/additions/vboxvideo_drv_71.so \ | |
274 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
275 | ||
b1f8956a | 276 | install out/linux.%{_outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
fdd1c725 | 277 | install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
d1c4ec5b JB |
278 | %endif |
279 | ||
280 | %if %{with kernel} | |
74268e47 | 281 | cd PLD-MODULE-BUILD |
282 | for MODULE in *; do | |
283 | [ ! -d $MODULE ] && continue; | |
284 | ||
285 | cd $MODULE | |
286 | %install_kernel_modules -m $MODULE -d misc | |
287 | cd .. | |
288 | done | |
289 | cd .. | |
d1c4ec5b | 290 | %endif |
05f1b1f5 | 291 | |
48363591 | 292 | %clean |
293 | rm -rf $RPM_BUILD_ROOT | |
294 | ||
3b63d3e8 | 295 | %pre |
296 | %groupadd -g 221 -r -f vbox | |
297 | ||
3b63d3e8 | 298 | %postun |
299 | if [ "$1" = "0" ]; then | |
300 | %groupremove vbox | |
301 | fi | |
302 | ||
74268e47 | 303 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
304 | %depmod %{_kernel_ver} | |
305 | ||
306 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
307 | %depmod %{_kernel_ver} | |
308 | ||
48363591 | 309 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
310 | %depmod %{_kernel_ver} | |
311 | ||
312 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
313 | %depmod %{_kernel_ver} | |
314 | ||
74268e47 | 315 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
316 | %depmod %{_kernel_ver} | |
317 | ||
318 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
319 | %depmod %{_kernel_ver} | |
320 | ||
d1c4ec5b | 321 | %if %{with userspace} |
48363591 | 322 | %files |
323 | %defattr(644,root,root,755) | |
7d1c0a63 | 324 | %doc UserManual.pdf |
8833bce1 | 325 | %dir %{_libdir}/VirtualBox |
326 | %dir %{_libdir}/VirtualBox/components | |
327 | %dir %{_libdir}/VirtualBox/nls | |
4c18fded | 328 | %attr(755,root,root) %{_bindir}/mountvboxsf |
329 | %attr(755,root,root) %{_bindir}/vditool | |
48363591 | 330 | %attr(755,root,root) %{_bindir}/VBox* |
331 | %attr(755,root,root) %{_bindir}/VirtualBox | |
fdd1c725 | 332 | %attr(755,root,root) %{_libdir}/VirtualBox/vditool |
05f1b1f5 | 333 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
334 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
335 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage | |
336 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
337 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD | |
8833bce1 | 338 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so |
fdd1c725 | 339 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
340 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
05f1b1f5 | 341 | %{_libdir}/VirtualBox/*.gc |
342 | %{_libdir}/VirtualBox/*.r0 | |
05f1b1f5 | 343 | %{_libdir}/VirtualBox/*.xpt |
344 | %{_libdir}/VirtualBox/components/* | |
8833bce1 | 345 | %lang(ar) %{_libdir}/VirtualBox/nls/VirtualBox_ar.qm |
346 | %lang(cs) %{_libdir}/VirtualBox/nls/VirtualBox_cs.qm | |
347 | %lang(de) %{_libdir}/VirtualBox/nls/VirtualBox_de.qm | |
348 | %lang(es) %{_libdir}/VirtualBox/nls/VirtualBox_es.qm | |
349 | %lang(fi) %{_libdir}/VirtualBox/nls/VirtualBox_fi.qm | |
350 | %lang(fr) %{_libdir}/VirtualBox/nls/VirtualBox_fr.qm | |
351 | %lang(hu) %{_libdir}/VirtualBox/nls/VirtualBox_hu.qm | |
352 | %lang(it) %{_libdir}/VirtualBox/nls/VirtualBox_it.qm | |
353 | %lang(ja) %{_libdir}/VirtualBox/nls/VirtualBox_ja.qm | |
354 | %lang(ko) %{_libdir}/VirtualBox/nls/VirtualBox_ko.qm | |
355 | %lang(pl) %{_libdir}/VirtualBox/nls/VirtualBox_pl.qm | |
356 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/VirtualBox_pt_BR.qm | |
357 | %lang(ro) %{_libdir}/VirtualBox/nls/VirtualBox_ro.qm | |
358 | %lang(ru) %{_libdir}/VirtualBox/nls/VirtualBox_ru.qm | |
359 | %lang(sv) %{_libdir}/VirtualBox/nls/VirtualBox_sv.qm | |
360 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/VirtualBox_zh_CN.qm | |
361 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/VirtualBox_zh_TW.qm | |
d89980c7 | 362 | %{_pixmapsdir}/VBox.png |
363 | %{_desktopdir}/%{name}.desktop | |
09c79ddb | 364 | |
365 | %files -n xorg-driver-input-vboxmouse | |
366 | %defattr(644,root,root,755) | |
367 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
368 | ||
369 | %files -n xorg-driver-video-vboxvideo | |
370 | %defattr(644,root,root,755) | |
371 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 372 | %endif |
48363591 | 373 | |
d1c4ec5b | 374 | %if %{with kernel} |
74268e47 | 375 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
376 | %defattr(644,root,root,755) | |
377 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* | |
378 | ||
d1c4ec5b | 379 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 380 | %defattr(644,root,root,755) |
d1c4ec5b | 381 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 382 | |
383 | %files -n kernel%{_alt_kernel}-misc-vboxvfs | |
384 | %defattr(644,root,root,755) | |
385 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* | |
05f1b1f5 | 386 | %endif |