]>
Commit | Line | Data |
---|---|---|
1 | # NOTE | |
2 | # - https://www.virtualbox.org/wiki/Linux%20build%20instructions | |
3 | # TODO | |
4 | # - java bindings | |
5 | # - Package SDK. | |
6 | # - Check License of VBoxGuestAdditions_*.iso, it's probably not GPL v2. | |
7 | # If so check if it is distributable. | |
8 | # - guest x11 additions: currently incomplete/untested | |
9 | # - enable VDE networking: --enable-vde | |
10 | # - initscripts for webservice | |
11 | # - fix desc for dkms packages (proper wording needed), kernel modules desc is mess as well | |
12 | # | |
13 | # Conditional build: | |
14 | %bcond_with all_langs # build with all manual translations | |
15 | %bcond_without doc # don't build the documentation | |
16 | %bcond_without debuginfo # disable debuginfo creation (to save space when compiling) | |
17 | %bcond_without kernel # don't build kernel module | |
18 | %bcond_without userspace # don't build userspace package | |
19 | %bcond_with webservice # webservice (SOAP) support | |
20 | %bcond_without lightdm # lightdm greeter | |
21 | %bcond_without dkms # build dkms package | |
22 | %bcond_without verbose | |
23 | %bcond_without gui # disable Qt4 GUI frontend build | |
24 | ||
25 | %if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace} | |
26 | %{error:kernel and userspace cannot be built at the same time on PLD builders} | |
27 | exit 1 | |
28 | %endif | |
29 | ||
30 | %if %{with kernel} | |
31 | %define _duplicate_files_terminate_build 0 | |
32 | %endif | |
33 | ||
34 | %if %{without userspace} | |
35 | # nothing to be placed to debuginfo package | |
36 | %undefine with_debuginfo | |
37 | %endif | |
38 | ||
39 | %if %{without debuginfo} | |
40 | %define _enable_debug_packages 0 | |
41 | %endif | |
42 | ||
43 | %define qtver 5.6.0 | |
44 | ||
45 | %define rel 1 | |
46 | %define pname VirtualBox | |
47 | Summary: VirtualBox - x86 hardware virtualizer | |
48 | Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86 | |
49 | Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel} | |
50 | Version: 5.2.8 | |
51 | Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}} | |
52 | License: GPL v2 | |
53 | Group: Applications/Emulators | |
54 | Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}.tar.bz2 | |
55 | # Source0-md5: e731ea9c5c31096ec4c2a3bfba26665c | |
56 | Source1: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso | |
57 | # Source1-md5: 3fb71656e8720342ab6ea4022d3dec9c | |
58 | Source2: vboxservice.init | |
59 | Source3: vboxservice.service | |
60 | Source4: vboxservice.sysconfig | |
61 | Source5: mount.vdi | |
62 | Source6: udev.rules | |
63 | Source7: %{pname}-virtualbox-host-modules-load.conf | |
64 | Source8: %{pname}-virtualbox-guest-modules-load.conf | |
65 | Source9: vboxautostart.init | |
66 | Source10: autostart.cfg | |
67 | Patch0: %{pname}-version-error.patch | |
68 | Patch1: %{pname}-VBoxSysInfo.patch | |
69 | Patch2: %{pname}-warning_workaround.patch | |
70 | Patch3: %{pname}-dri.patch | |
71 | Patch4: wrapper.patch | |
72 | Patch5: xserver-1.12.patch | |
73 | Patch6: hardening-shared.patch | |
74 | Patch7: lightdm-greeter-makefile.patch | |
75 | Patch8: lightdm-greeter-g++-link.patch | |
76 | Patch9: pld-guest.patch | |
77 | Patch10: 16-no-update.patch | |
78 | Patch11: %{pname}-all-translations.patch | |
79 | Patch12: x32.patch | |
80 | Patch13: %{pname}-no-scrextend.patch | |
81 | Patch14: %{pname}-multipython.patch | |
82 | Patch15: %{pname}-lightdm-1.19.2.patch | |
83 | Patch16: %{pname}-no-vboxvideo.patch | |
84 | Patch17: %{pname}-kerndir.patch | |
85 | URL: http://www.virtualbox.org/ | |
86 | %if %{with userspace} | |
87 | %ifarch %{x8664} | |
88 | BuildRequires: gcc-multilib-32 | |
89 | BuildRequires: glibc-devel(i686) | |
90 | BuildRequires: libstdc++-multilib-32-devel | |
91 | BuildRequires: libstdc++-multilib-32-static | |
92 | %endif | |
93 | %if "%{pld_release}" == "ac" | |
94 | BuildRequires: XFree86-devel | |
95 | %else | |
96 | BuildRequires: xorg-lib-libX11-devel | |
97 | BuildRequires: xorg-lib-libXcomposite-devel | |
98 | BuildRequires: xorg-lib-libXcursor-devel | |
99 | BuildRequires: xorg-lib-libXdamage-devel | |
100 | BuildRequires: xorg-lib-libXext-devel | |
101 | BuildRequires: xorg-lib-libXinerama-devel | |
102 | BuildRequires: xorg-lib-libXmu-devel | |
103 | BuildRequires: xorg-lib-libXrandr-devel | |
104 | BuildRequires: xorg-proto-glproto-devel | |
105 | BuildRequires: xorg-xserver-server-devel | |
106 | %endif | |
107 | BuildRequires: OpenGL-GLU-devel | |
108 | BuildRequires: OpenGL-devel | |
109 | BuildRequires: Qt5Core-devel >= %{qtver} | |
110 | BuildRequires: Qt5DBus-devel >= %{qtver} | |
111 | BuildRequires: Qt5Gui-devel >= %{qtver} | |
112 | BuildRequires: Qt5Network-devel >= %{qtver} | |
113 | BuildRequires: Qt5OpenGL-devel >= %{qtver} | |
114 | BuildRequires: Qt5PrintSupport-devel >= %{qtver} | |
115 | BuildRequires: Qt5Widgets-devel >= %{qtver} | |
116 | BuildRequires: Qt5X11Extras-devel >= %{qtver} | |
117 | BuildRequires: Qt5Xml-devel >= %{qtver} | |
118 | BuildRequires: SDL-devel >= 1.2.7 | |
119 | BuildRequires: acpica | |
120 | BuildRequires: alsa-lib-devel >= 1.0.6 | |
121 | BuildRequires: bash | |
122 | BuildRequires: bcc | |
123 | BuildRequires: bin86 | |
124 | BuildRequires: curl-devel >= 7.19.1 | |
125 | BuildRequires: device-mapper-devel >= 1.02 | |
126 | %{?with_doc:BuildRequires: docbook-dtd44-xml} | |
127 | BuildRequires: fakeroot | |
128 | %{?with_lightdm:BuildRequires: fltk-devel} | |
129 | BuildRequires: gcc >= 5:3.2.3 | |
130 | %{?with_webservice:BuildRequires: gsoap-devel} | |
131 | BuildRequires: issue | |
132 | BuildRequires: kBuild >= 0.1.9998.3093 | |
133 | BuildRequires: libIDL-devel | |
134 | BuildRequires: libcap-static | |
135 | BuildRequires: libdrm-devel | |
136 | BuildRequires: libpng-devel >= 1.2.5 | |
137 | BuildRequires: libstdc++-devel >= 5:3.2.3 | |
138 | BuildRequires: libstdc++-static >= 5:3.2.3 | |
139 | BuildRequires: libuuid-devel | |
140 | BuildRequires: libvncserver-devel >= 0.9.9 | |
141 | BuildRequires: libvpx-devel >= 0.9.5 | |
142 | BuildRequires: libxml2-devel >= 2.6.26 | |
143 | BuildRequires: libxslt-devel >= 1.1.17 | |
144 | BuildRequires: libxslt-progs >= 1.1.17 | |
145 | %{?with_lightdm:BuildRequires: lightdm-libs-qt5-devel} | |
146 | BuildRequires: makeself | |
147 | BuildRequires: mkisofs | |
148 | BuildRequires: openssl-devel >= 0.9.8 | |
149 | BuildRequires: pam-devel | |
150 | BuildRequires: pixman-devel | |
151 | BuildRequires: pkgconfig | |
152 | BuildRequires: pulseaudio-devel >= 0.9.0 | |
153 | BuildRequires: python-devel >= 2.3 | |
154 | BuildRequires: python-modules | |
155 | BuildRequires: qt5-build | |
156 | BuildRequires: qt5-linguist | |
157 | BuildRequires: rpmbuild(macros) >= 1.715 | |
158 | BuildRequires: sed >= 4.0 | |
159 | %if %{with doc} | |
160 | BuildRequires: texlive-fonts-bitstream | |
161 | BuildRequires: texlive-fonts-other | |
162 | BuildRequires: texlive-fonts-type1-bitstream | |
163 | BuildRequires: texlive-format-pdflatex | |
164 | BuildRequires: texlive-latex-ucs | |
165 | BuildRequires: texlive-xetex | |
166 | %endif | |
167 | BuildRequires: which | |
168 | BuildRequires: xalan-c-devel >= 1.10.0 | |
169 | BuildRequires: xerces-c-devel >= 2.6.0 | |
170 | BuildRequires: yasm >= 0.5.1 | |
171 | BuildRequires: zlib-devel >= 1.2.1 | |
172 | %endif | |
173 | %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}} | |
174 | Requires(post,preun): /sbin/chkconfig | |
175 | Requires(postun): /usr/sbin/groupdel | |
176 | Requires(pre): /usr/bin/getgid | |
177 | Requires(pre): /usr/sbin/groupadd | |
178 | Requires: libvncserver >= 0.9.9 | |
179 | Requires: udev-core | |
180 | Provides: group(vbox) | |
181 | Obsoletes: VirtualBox-udev < 4.2.10-5 | |
182 | ExclusiveArch: %{ix86} %{x8664} %{?with_kernel:x32} | |
183 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
184 | ||
185 | %ifarch %{x8664} | |
186 | %define vbox_arch amd64 | |
187 | %else | |
188 | %define vbox_arch x86 | |
189 | %endif | |
190 | %define vbox_platform linux.%{vbox_arch} | |
191 | %define outdir out/%{vbox_platform}/release/bin | |
192 | %define objdir out/%{vbox_platform}/release/obj | |
193 | ||
194 | %define filterout -Werror=format-security | |
195 | ||
196 | %description | |
197 | Oracle VirtualBox is a general-purpose full virtualizer for x86 | |
198 | hardware. Targeted at server, desktop and embedded use, it is now the | |
199 | only professional-quality virtualization solution that is also Open | |
200 | Source Software. | |
201 | ||
202 | Some of the features of VirtualBox are: | |
203 | ||
204 | Modularity: VirtualBox has an extremely modular design with | |
205 | well-defined internal programming interfaces and a client/server | |
206 | design. This makes it easy to control it from several interfaces at | |
207 | once: for example, you can start a virtual machine in a typical | |
208 | virtual machine GUI and then control that machine from the command | |
209 | line. VirtualBox also comes with a full Software Development Kit: even | |
210 | though it is Open Source Software, you don't have to hack the source | |
211 | to write a new interface for VirtualBox. | |
212 | ||
213 | Virtual machine descriptions in XML: the configuration settings of | |
214 | virtual machines are stored entirely in XML and are independent of the | |
215 | local machines. Virtual machine definitions can therefore easily be | |
216 | ported to other computers. | |
217 | ||
218 | You should install this package in your Host OS. | |
219 | ||
220 | %description -l pl.UTF-8 | |
221 | Oracle VirtualBox jest emulatorem sprzętu x86. Kierowany do zastosowań | |
222 | serwerowych, desktopowych oraz wbudowanych jest obecnie jedynym | |
223 | wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym również jako | |
224 | Otwarte Oprogramowanie. | |
225 | ||
226 | Przykładowe cechy VirtualBoksa: | |
227 | ||
228 | Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z | |
229 | dobrze zaprojektowanym wewnętrznym interfejsem programowym typu | |
230 | klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą | |
231 | różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z | |
232 | poziomu interfejsu graficznego, a później kontrolować ją z linii | |
233 | poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co | |
234 | pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną. | |
235 | ||
236 | Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn | |
237 | wirtualnych są w całości przechowywane w XML-u i są niezależne od | |
238 | lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść | |
239 | konfigurację maszyny wirtualnej na inny komputer. | |
240 | ||
241 | %package gui | |
242 | Summary: Qt GUI part for VirtualBox | |
243 | Group: X11/Applications | |
244 | Requires: %{name} = %{version}-%{release} | |
245 | Requires: Qt5Core >= %{qtver} | |
246 | Requires: Qt5Gui-platform-xcb >= %{qtver} | |
247 | Requires: desktop-file-utils | |
248 | Requires: desktop-file-utils | |
249 | Requires: fontconfig | |
250 | Requires: fonts-Type1-urw | |
251 | Requires: gtk-update-icon-cache | |
252 | Requires: hicolor-icon-theme | |
253 | Requires: shared-mime-info | |
254 | Suggests: Qt5Gui-platform-xcb-glx >= %{qtver} | |
255 | Suggests: Qt5Gui-platform-xcb-egl >= %{qtver} | |
256 | Suggests: gxmessage | |
257 | Conflicts: %{name} < 4.3.8-3 | |
258 | ||
259 | %description gui | |
260 | Qt GUI part for VirtualBox. | |
261 | ||
262 | %package doc | |
263 | Summary: VirtualBox documentation | |
264 | Group: Documentation | |
265 | ||
266 | %description doc | |
267 | This package contains VirtualBox User Manual. | |
268 | ||
269 | %package additions | |
270 | Summary: VirtualBox Guest Additions | |
271 | Group: Base | |
272 | Requires: %{name} = %{version} | |
273 | %if "%{_rpmversion}" >= "5" | |
274 | BuildArch: noarch | |
275 | %endif | |
276 | ||
277 | %description additions | |
278 | VirtualBox Guest Additions. | |
279 | ||
280 | This package contains ISO9660 image with drivers for Guest OS. | |
281 | ||
282 | You should install this package in your Host OS. | |
283 | ||
284 | %package guest | |
285 | Summary: VirtualBox Guest tools | |
286 | Group: Base | |
287 | Provides: group(vboxsf) | |
288 | Requires(post): systemd-units >= 38 | |
289 | Requires(post,preun): /sbin/chkconfig | |
290 | Requires(postun): /usr/sbin/groupdel | |
291 | Requires(pre): /usr/bin/getgid | |
292 | Requires(pre): /usr/sbin/groupadd | |
293 | Requires: rc-scripts | |
294 | Requires: systemd-units >= 38 | |
295 | Suggests: kernel(vboxguest) | |
296 | Suggests: kernel(vboxsf) | |
297 | Suggests: pam-pam_vbox | |
298 | ||
299 | %description guest | |
300 | Tools that utilize kernel modules for supporting integration with the | |
301 | Host, including file sharing. | |
302 | ||
303 | You should install this package in your Guest OS for base VirtualBox | |
304 | communication | |
305 | ||
306 | %package guest-x11 | |
307 | Summary: VirtualBox Guest X11 Additions | |
308 | Group: X11/Applications | |
309 | Requires: %{name}-guest = %{version}-%{release} | |
310 | Requires: xorg-app-xrandr | |
311 | Requires: xorg-driver-video-vboxvideo = %{version}-%{release} | |
312 | Requires: kernel(vboxvideo) | |
313 | Obsoletes: xorg-driver-input-vboxmouse < %{version}-%{release} | |
314 | ||
315 | %description guest-x11 | |
316 | Tools for X11 session that utilize kernel modules for supporting | |
317 | integration with the Host, like tracking of mouse pointer movement and | |
318 | X.org X11 video and mouse drivers | |
319 | ||
320 | You should install this package in your Guest OS for X11 session. | |
321 | ||
322 | %package webservice | |
323 | Summary: VirtualBox Web Service | |
324 | Group: Applications/Emulators | |
325 | Requires: %{name} = %{version}-%{release} | |
326 | ||
327 | %description webservice | |
328 | This package contains VirtualBox web service API daemon. It allows to | |
329 | control virtual machines via web interface. | |
330 | ||
331 | %package -n lightdm-greeter-vbox | |
332 | Summary: VirtualBox greeter for lightdm | |
333 | Group: Themes | |
334 | # NOTE: '#' in url is lost because rpm treats it as comment, even hacking with | |
335 | # macros doesn't help as rpmbuild takes final result to parse | |
336 | URL: http://www.virtualbox.org/manual/ch09.html#autologon_unix_lightdm | |
337 | Requires: %{name} = %{version}-%{release} | |
338 | Requires: kernel(vboxguest) | |
339 | Requires: lightdm >= 1.0.1 | |
340 | Requires: pam-pam_vbox = %{version}-%{release} | |
341 | Provides: lightdm-greeter | |
342 | ||
343 | %description -n lightdm-greeter-vbox | |
344 | VirtualBox greeter for LightDM. | |
345 | ||
346 | %package -n pam-pam_vbox | |
347 | Summary: PAM module to perform automated guest logons | |
348 | Group: Base | |
349 | ||
350 | %description -n pam-pam_vbox | |
351 | PAM module (Pluggable Authentication Module) which can be used to | |
352 | perform automated guest logons. | |
353 | ||
354 | %package -n xorg-driver-video-vboxvideo | |
355 | Summary: X.org video driver for VirtualBox guest OS | |
356 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie | |
357 | Group: X11/Applications | |
358 | Requires: Mesa-dri-driver-swrast | |
359 | Requires: xorg-driver-video-modesetting | |
360 | Requires: xorg-xserver-libdri >= 1.7.4 | |
361 | Requires: xorg-xserver-server >= 1.0.99.901 | |
362 | %{?requires_xorg_xserver_videodrv} | |
363 | Provides: OpenGL = 2.1 | |
364 | Provides: OpenGL-GLX = 1.3 | |
365 | Provides: xorg-xserver-module(glx) | |
366 | ||
367 | %description -n xorg-driver-video-vboxvideo | |
368 | X.org video driver for VirtualBox guest OS. | |
369 | ||
370 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
371 | Sterownik grafiki dla systemu gościa w VirtualBoksie. | |
372 | ||
373 | %package -n dkms-vboxguest | |
374 | Summary: VirtualBox kernel modules source for Linux Guest | |
375 | Summary(pl.UTF-8): Moduły VirtualBoksa do jądra Linuksa dla systemu gościa | |
376 | License: GPL v2+ | |
377 | Group: Base/Kernel | |
378 | Requires: dkms | |
379 | %if "%{_rpmversion}" >= "5" | |
380 | BuildArch: noarch | |
381 | %endif | |
382 | ||
383 | %description -n dkms-vboxguest | |
384 | This package contains DKMS-ready VirtualBox Guest Additions for Linux | |
385 | Module, host file system access (Shared Folders) and DRM support for | |
386 | Linux guest system. | |
387 | ||
388 | %description -n dkms-vboxguest -l pl.UTF-8 | |
389 | Ten pakiet zawiera moduł jądra Linuksa vboxguest dla VirtualBoksa - | |
390 | dodatki dla systemu gościa, dostęp do plików systemu głównego z | |
391 | poziomu systemu gościa i sterownik obsługi DRM. | |
392 | ||
393 | %package -n dkms-vboxhost | |
394 | Summary: VirtualBox Support Drivers source | |
395 | Summary(pl.UTF-8): Moduły jądra Linuksa dla VirtualBoksa | |
396 | License: GPL v2+ | |
397 | Group: Base/Kernel | |
398 | Requires: dkms | |
399 | %if "%{_rpmversion}" >= "5" | |
400 | BuildArch: noarch | |
401 | %endif | |
402 | ||
403 | %description -n dkms-vboxhost | |
404 | This package contains DKMS enabled sourcecode of VirtualBox Support | |
405 | Driver, Network Adapter Driver, Network Filter Driver and PCI card | |
406 | passthrough driver that works as host proxy between guest and PCI | |
407 | hardware. | |
408 | ||
409 | %description -n dkms-vboxhost -l pl.UTF-8 | |
410 | Ten pakiet zawiera sterownik wsparcia dla systemu głównego, sterownik | |
411 | witrualnej karty sieciowej, sterownik filtrowania sieci dla systemu | |
412 | głównego oraz sterownik, ktory działa jako proxy między gościem i | |
413 | gospodarzem sprzętu PCI. | |
414 | ||
415 | # KERNEL PACKAGES | |
416 | ||
417 | # KEEP ALL REGULAR SUBPACKAGES BEFORE KERNEL PACKAGES. | |
418 | ||
419 | %define kernel_pkg()\ | |
420 | %package -n kernel%{_alt_kernel}-virtualbox-guest\ | |
421 | Summary: VirtualBox kernel modules for Linux Guest\ | |
422 | Summary(pl.UTF-8): Moduły VirtualBoksa do jądra Linuksa dla systemu gościa\ | |
423 | Release: %{rel}@%{_kernel_ver_str}\ | |
424 | Group: Base/Kernel\ | |
425 | Requires(post,postun): /sbin/depmod\ | |
426 | Requires(post): systemd-units >= 38\ | |
427 | Requires: dev >= 2.9.0-7\ | |
428 | Requires: systemd-units >= 38\ | |
429 | %requires_releq_kernel\ | |
430 | Requires: %{releq_kernel -n drm}\ | |
431 | Requires(postun): %releq_kernel\ | |
432 | Provides: kernel(vboxguest) = %{version}-%{rel}\ | |
433 | Provides: kernel(vboxsf) = %{version}-%{rel}\ | |
434 | Provides: kernel(vboxvideo) = %{version}-%{rel}\ | |
435 | Obsoletes: kernel-init-guest\ | |
436 | Conflicts: kernel%{_alt_kernel}-virtualbox-host\ | |
437 | \ | |
438 | %description -n kernel%{_alt_kernel}-virtualbox-guest\ | |
439 | This package contains VirtualBox Guest Additions for Linux Module,\ | |
440 | host file system access (Shared Folders) and DRM support for\ | |
441 | Linux guest system.\ | |
442 | \ | |
443 | %description -n kernel%{_alt_kernel}-virtualbox-guest -l pl.UTF-8\ | |
444 | Ten pakiet zawiera moduł jądra Linuksa vboxguest dla VirtualBoksa -\ | |
445 | dodatki dla systemu gościa, dostęp do plików systemu głównego z\ | |
446 | poziomu systemu gościa i sterownik obsługi DRM.\ | |
447 | \ | |
448 | %package -n kernel%{_alt_kernel}-virtualbox-host\ | |
449 | Summary: VirtualBox Support Drivers\ | |
450 | Summary(pl.UTF-8): Moduły jądra Linuksa dla VirtualBoksa\ | |
451 | Release: %{rel}@%{_kernel_ver_str}\ | |
452 | Group: Base/Kernel\ | |
453 | Requires(post,postun): /sbin/depmod\ | |
454 | Requires(post): systemd-units >= 38\ | |
455 | Requires: dev >= 2.9.0-7\ | |
456 | %requires_releq_kernel\ | |
457 | Requires(postun): %releq_kernel\ | |
458 | Requires: systemd-units >= 38\ | |
459 | Provides: kernel(vboxdrv) = %{version}-%{rel}\ | |
460 | Provides: kernel(vboxnetadp) = %{version}-%{rel}\ | |
461 | Provides: kernel(vboxnetflt) = %{version}-%{rel}\ | |
462 | Provides: kernel(vboxpci) = %{version}-%{rel}\ | |
463 | Obsoletes: kernel-init-host\ | |
464 | \ | |
465 | %description -n kernel%{_alt_kernel}-virtualbox-host\ | |
466 | This package contains VirtualBox Support Driver, Network Adapter\ | |
467 | Driver, Network Filter Driver and PCI card passthrough driver that\ | |
468 | works as host proxy between guest and PCI hardware.\ | |
469 | \ | |
470 | %description -n kernel%{_alt_kernel}-virtualbox-host -l pl.UTF-8\ | |
471 | Ten pakiet zawiera sterownik wsparcia dla systemu głównego, sterownik\ | |
472 | witrualnej karty sieciowej, sterownik filtrowania sieci dla systemu\ | |
473 | głównego oraz sterownik, ktory działa jako proxy między gościem i\ | |
474 | gospodarzem sprzętu PCI.\ | |
475 | \ | |
476 | %if %{with kernel}\ | |
477 | %files -n kernel%{_alt_kernel}-virtualbox-guest\ | |
478 | %defattr(644,root,root,755)\ | |
479 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/virtualbox-guest.conf\ | |
480 | /lib/modules/%{_kernel_ver}/misc/vboxguest.ko*\ | |
481 | /lib/modules/%{_kernel_ver}/misc/vboxsf.ko*\ | |
482 | %if %{_kernel_version_code} < %{_kernel_version_magic 4 13 0}\ | |
483 | /lib/modules/%{_kernel_ver}/misc/vboxvideo.ko*\ | |
484 | %endif\ | |
485 | \ | |
486 | %files -n kernel%{_alt_kernel}-virtualbox-host\ | |
487 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/virtualbox-host.conf\ | |
488 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko*\ | |
489 | /lib/modules/%{_kernel_ver}/misc/vboxnetadp.ko*\ | |
490 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko*\ | |
491 | /lib/modules/%{_kernel_ver}/misc/vboxpci.ko*\ | |
492 | %endif\ | |
493 | \ | |
494 | %post -n kernel%{_alt_kernel}-virtualbox-guest\ | |
495 | %depmod %{_kernel_ver}\ | |
496 | \ | |
497 | %postun -n kernel%{_alt_kernel}-virtualbox-guest\ | |
498 | %depmod %{_kernel_ver}\ | |
499 | \ | |
500 | %post -n kernel%{_alt_kernel}-virtualbox-host\ | |
501 | %depmod %{_kernel_ver}\ | |
502 | \ | |
503 | %postun -n kernel%{_alt_kernel}-virtualbox-host\ | |
504 | %depmod %{_kernel_ver}\ | |
505 | %{nil} | |
506 | ||
507 | %define build_kernel_pkg()\ | |
508 | export KERN_DIR=%{_kernelsrcdir}\ | |
509 | cd PLD-MODULE-BUILD/HostDrivers\ | |
510 | %build_kernel_modules -m vboxdrv -C vboxdrv\ | |
511 | %build_kernel_modules -m vboxnetadp -C vboxnetadp\ | |
512 | %build_kernel_modules -m vboxnetflt -C vboxnetflt\ | |
513 | %build_kernel_modules -m vboxpci -C vboxpci\ | |
514 | cd ../GuestDrivers\ | |
515 | %build_kernel_modules -m vboxguest -C vboxguest\ | |
516 | cp -a vboxguest/Module.symvers vboxsf\ | |
517 | %build_kernel_modules -m vboxsf -C vboxsf -c\ | |
518 | %if %{_kernel_version_code} < %{_kernel_version_magic 4 13 0}\ | |
519 | %build_kernel_modules -m vboxvideo -C vboxvideo\ | |
520 | %endif\ | |
521 | cd ../..\ | |
522 | %install_kernel_modules -D PLD-MODULE-BUILD/installed -m PLD-MODULE-BUILD/HostDrivers/vboxdrv/vboxdrv,PLD-MODULE-BUILD/HostDrivers/vboxnetadp/vboxnetadp,PLD-MODULE-BUILD/HostDrivers/vboxnetflt/vboxnetflt,PLD-MODULE-BUILD/HostDrivers/vboxpci/vboxpci,PLD-MODULE-BUILD/GuestDrivers/vboxguest/vboxguest,PLD-MODULE-BUILD/GuestDrivers/vboxsf/vboxsf -d misc\ | |
523 | %if %{_kernel_version_code} < %{_kernel_version_magic 4 13 0}\ | |
524 | %install_kernel_modules -D PLD-MODULE-BUILD/installed -m PLD-MODULE-BUILD/GuestDrivers/vboxvideo/vboxvideo -d misc\ | |
525 | %endif\ | |
526 | %{nil} | |
527 | ||
528 | %{?with_kernel:%{expand:%create_kernel_packages}} | |
529 | ||
530 | %prep | |
531 | %setup -q -n %{pname}-%{version} | |
532 | %patch0 -p1 | |
533 | %patch1 -p1 | |
534 | %patch2 -p1 | |
535 | %patch3 -p1 | |
536 | %patch4 -p1 | |
537 | %patch5 -p1 | |
538 | %patch6 -p1 | |
539 | %patch7 -p1 | |
540 | %patch8 -p1 | |
541 | %patch9 -p1 | |
542 | %patch10 -p1 | |
543 | %if %{with all_langs} | |
544 | %patch11 -p0 | |
545 | %endif | |
546 | %patch12 -p1 | |
547 | %patch13 -p1 | |
548 | %patch14 -p0 | |
549 | %patch15 -p0 | |
550 | %patch16 -p0 | |
551 | %patch17 -p1 | |
552 | ||
553 | %{__sed} -i -e 's,@VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \ | |
554 | -e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in | |
555 | ||
556 | # Respect LDFLAGS | |
557 | %{__sed} -i -e "s@_LDFLAGS\.%{vbox_arch}*.*=@& %{rpmldflags}@g" \ | |
558 | -i Config.kmk src/libs/xpcom18a4/Config.kmk | |
559 | ||
560 | %{__sed} -i -e 's#@INSTALL_DIR@#%{_libdir}/%{pname}#' src/VBox/Installer/linux/VBox.sh | |
561 | ||
562 | %if %{with kernel} | |
563 | install -d PLD-MODULE-BUILD/{GuestDrivers,HostDrivers} | |
564 | cd PLD-MODULE-BUILD | |
565 | ../src/VBox/Additions/linux/export_modules.sh guest-modules.tar.gz | |
566 | tar -zxf guest-modules.tar.gz -C GuestDrivers | |
567 | ||
568 | ../src/VBox/HostDrivers/linux/export_modules.sh host-modules.tar.gz --without-hardening | |
569 | tar -zxf host-modules.tar.gz -C HostDrivers | |
570 | cd - | |
571 | %endif | |
572 | ||
573 | # using system kBuild package | |
574 | %{__rm} -r kBuild | |
575 | ||
576 | # use linux icon for now | |
577 | cp -p src/VBox/Frontends/VirtualBox/images/os_{linux26,pld}.png | |
578 | cp -p src/VBox/Frontends/VirtualBox/images/os_{linux26,pld}_64.png | |
579 | ||
580 | # don't force whole userspace to be built with -fPIC | |
581 | # see https://www.virtualbox.org/pipermail/vbox-dev/2015-February/012863.html | |
582 | %define filterout_c -fPIC | |
583 | %define filterout_cxx -fPIC | |
584 | ||
585 | cat <<'EOF'>> LocalConfig.kmk | |
586 | %{?with_verbose:KBUILD_VERBOSE=3} | |
587 | USERNAME=%(id -un) | |
588 | VBOX_BUILD_PUBLISHER=_PLD | |
589 | VBOX_VERSION_STRING=$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)_PLD | |
590 | XSERVER_VERSION=%(rpm -q --queryformat '%{V}\n' xorg-xserver-server-devel | awk -F. '{ print $1 $2 }' 2>/dev/null || echo ERROR) | |
591 | VBOX_USE_SYSTEM_XORG_HEADERS=1 | |
592 | VBOX_USE_SYSTEM_GL_HEADERS=1 | |
593 | %if %{with lightdm} | |
594 | VBOX_WITH_LIGHTDM_GREETER=1 | |
595 | VBOX_WITH_LIGHTDM_GREETER_PACKING=1 | |
596 | %endif | |
597 | TOOL_GCC3_CFLAGS=%{rpmcflags} | |
598 | TOOL_GCC3_CXXFLAGS=%{rpmcxxflags} | |
599 | VBOX_GCC_OPT=%{rpmcxxflags} | |
600 | ||
601 | VBOX_PATH_APP_PRIVATE_ARCH := %{_libdir}/%{pname} | |
602 | VBOX_PATH_APP_PRIVATE := %{_datadir}/%{pname} | |
603 | VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) | |
604 | VBOX_WITH_ORIGIN := | |
605 | VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) | |
606 | #VBOX_PATH_APP_DOCS := %{_docdir}/%{pname}-doc-%{version} | |
607 | VBOX_PATH_DOCBOOK_DTD := %{_datadir}/sgml/docbook/xml-dtd-4.4 | |
608 | ||
609 | # don't build testcases to save time, they are not needed for the package | |
610 | VBOX_WITH_TESTCASES := | |
611 | VBOX_WITH_TESTSUITE := | |
612 | ||
613 | VBOX_WITH_VRDP_RDESKTOP= | |
614 | VBOX_WITH_MULTIVERSION_PYTHON=0 | |
615 | EOF | |
616 | ||
617 | %undefine filterout_c | |
618 | %undefine filterout_cxx | |
619 | ||
620 | %build | |
621 | %if %{with userspace} | |
622 | ./configure \ | |
623 | --with-gcc="%{__cc}" \ | |
624 | --with-g++="%{__cxx}" \ | |
625 | %{!?with_doc:--disable-docs} \ | |
626 | --disable-java \ | |
627 | --disable-hardening \ | |
628 | --disable-kmods \ | |
629 | --enable-vnc \ | |
630 | %{!?with_gui:--disable-qt} \ | |
631 | %{__enable webservice} \ | |
632 | %{nil} | |
633 | ||
634 | . "$PWD/env.sh" | |
635 | kmk %{?_smp_mflags} | |
636 | %endif | |
637 | ||
638 | %{?with_kernel:%{expand:%build_kernel_packages}} | |
639 | ||
640 | %install | |
641 | rm -rf $RPM_BUILD_ROOT | |
642 | ||
643 | %if %{with userspace} | |
644 | install -d $RPM_BUILD_ROOT{%{_bindir},/sbin,%{_sbindir},%{_libdir}/%{pname}/ExtensionPacks} \ | |
645 | $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_datadir}/mime/packages} \ | |
646 | $RPM_BUILD_ROOT/etc/sysconfig \ | |
647 | $RPM_BUILD_ROOT%{_sysconfdir}/vbox/autostart \ | |
648 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,dri,input} \ | |
649 | $RPM_BUILD_ROOT{/lib/udev,/etc/udev/rules.d} \ | |
650 | $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir},%{_usrsrc}} | |
651 | ||
652 | # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition | |
653 | if cp -al COPYING $RPM_BUILD_ROOT/COPYING; then | |
654 | l=l | |
655 | %{__rm} $RPM_BUILD_ROOT/COPYING | |
656 | fi | |
657 | ||
658 | install -d $RPM_BUILD_ROOT%{_datadir}/%{pname} | |
659 | ||
660 | cp -a$l %{outdir}/* $RPM_BUILD_ROOT%{_libdir}/%{pname} | |
661 | cp -p$l %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{pname}/VBoxGuestAdditions.iso || | |
662 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{pname}/VBoxGuestAdditions.iso | |
663 | ||
664 | %if %{without gui} | |
665 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{pname}/icons | |
666 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/virtualbox.xml | |
667 | %endif | |
668 | ||
669 | # vboxvideo | |
670 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions/VBoxOGL.so,%{_libdir}/xorg/modules/dri/vboxvideo_dri.so} | |
671 | # XXX: where else to install them that vboxvideo_dri.so finds them? patch with rpath? | |
672 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxEGL.so | |
673 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLarrayspu.so | |
674 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLcrutil.so | |
675 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLerrorspu.so | |
676 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLfeedbackspu.so | |
677 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLpackspu.so | |
678 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLpassthroughspu.so | |
679 | ||
680 | # Guest Only Tools | |
681 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxClient | |
682 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxControl | |
683 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxService | |
684 | install -d $RPM_BUILD_ROOT/etc/xdg/autostart | |
685 | cp -p src/VBox/Additions/x11/Installer/vboxclient.desktop \ | |
686 | $RPM_BUILD_ROOT/etc/xdg/autostart/vboxclient.desktop | |
687 | install -p src/VBox/Additions/x11/Installer/98vboxadd-xclient $RPM_BUILD_ROOT%{_bindir}/VBoxClient-all | |
688 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxservice | |
689 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/vboxservice.service | |
690 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/vboxservice | |
691 | ||
692 | install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxautostart | |
693 | %{__sed} -i -e 's#@INSTALL_DIR@#%{_libdir}/%{pname}#' $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxautostart | |
694 | cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/vbox | |
695 | ||
696 | %if %{with lightdm} | |
697 | install -d $RPM_BUILD_ROOT%{_datadir}/xgreeters | |
698 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_sbindir}}/vbox-greeter | |
699 | cp -p %{objdir}/Additions/Installer/linux/other/vbox-greeter.desktop $RPM_BUILD_ROOT%{_datadir}/xgreeters | |
700 | %endif | |
701 | ||
702 | %if %{with dkms} | |
703 | mv $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions/src $RPM_BUILD_ROOT%{_usrsrc}/vboxguest-%{version}-%{rel} | |
704 | %endif | |
705 | ||
706 | # pam | |
707 | install -d $RPM_BUILD_ROOT/%{_lib}/security | |
708 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,/%{_lib}/security}/pam_vbox.so | |
709 | ||
710 | # mount.vboxsf | |
711 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions/mount.vboxsf $RPM_BUILD_ROOT/sbin/mount.vboxsf | |
712 | ||
713 | # mount.vdi | |
714 | install -p %{SOURCE5} $RPM_BUILD_ROOT/sbin/mount.vdi | |
715 | ||
716 | # these belong to .iso | |
717 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions/autorun.sh | |
718 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions/runasroot.sh | |
719 | ||
720 | # unknown - checkme | |
721 | %if 1 | |
722 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/SUPInstall | |
723 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/SUPLoggerCtl | |
724 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/SUPUninstall | |
725 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/load.sh | |
726 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/loadall.sh | |
727 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/vboxshell.py | |
728 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/xpidl | |
729 | %endif | |
730 | ||
731 | # manual installation steps based on src/VBox/Installer/linux/install.sh | |
732 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/VirtualBox | |
733 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/VBoxManage | |
734 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/VBoxSDL | |
735 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/VBoxVRDP | |
736 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/VBoxHeadless | |
737 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/VBoxBalloonCtrl | |
738 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/VBoxAutostart | |
739 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/vboxwebsrv | |
740 | ln -sf %{_libdir}/%{pname}/vbox-img $RPM_BUILD_ROOT%{_bindir}/vbox-img | |
741 | ln -sf %{_libdir}/%{pname}/VBox.sh $RPM_BUILD_ROOT%{_bindir}/VBoxDTrace | |
742 | cp -p $RPM_BUILD_ROOT%{_libdir}/%{pname}/icons/128x128/virtualbox.png $RPM_BUILD_ROOT%{_pixmapsdir}/virtualbox.png | |
743 | mv $RPM_BUILD_ROOT%{_libdir}/%{pname}/virtualbox.desktop $RPM_BUILD_ROOT%{_desktopdir}/virtualbox.desktop | |
744 | mv $RPM_BUILD_ROOT%{_libdir}/%{pname}/virtualbox.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/virtualbox.xml | |
745 | ||
746 | mv $RPM_BUILD_ROOT%{_libdir}/%{pname}/nls $RPM_BUILD_ROOT%{_datadir}/%{pname} | |
747 | ||
748 | ( | |
749 | cd $RPM_BUILD_ROOT%{_libdir}/%{pname}/icons | |
750 | for i in *; do | |
751 | cd $i | |
752 | for j in *; do | |
753 | if expr "$j" : "virtualbox\..*" > /dev/null; then | |
754 | dst=apps | |
755 | else | |
756 | dst=mimetypes | |
757 | fi | |
758 | if [ ! -e $RPM_BUILD_ROOT%{_iconsdir}/hicolor/$i/$dst ]; then | |
759 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/$i/$dst | |
760 | fi | |
761 | mv $RPM_BUILD_ROOT%{_libdir}/%{pname}/icons/$i/$j $RPM_BUILD_ROOT%{_iconsdir}/hicolor/$i/$dst/$j | |
762 | done | |
763 | cd - | |
764 | done | |
765 | ) | |
766 | ||
767 | rm -r $RPM_BUILD_ROOT%{_libdir}/%{pname}/icons | |
768 | ||
769 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname},/lib/udev}/VBoxCreateUSBNode.sh | |
770 | cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/udev/rules.d/60-vboxdrv.rules | |
771 | ||
772 | %if %{with dkms} | |
773 | mv $RPM_BUILD_ROOT%{_libdir}/%{pname}/src $RPM_BUILD_ROOT%{_usrsrc}/vboxhost-%{version}-%{rel} | |
774 | %endif | |
775 | ||
776 | # cleanup unpackaged | |
777 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{pname}/{sdk,testcase} | |
778 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{pname}/dtrace | |
779 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/vboxkeyboard.tar.bz2 | |
780 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/tst* | |
781 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/scripts/generated.sh | |
782 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/ExtensionPacks/VNC/ExtPack-license.* | |
783 | ||
784 | %if %{with gui} | |
785 | # weird icon size | |
786 | %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/40x40 | |
787 | %endif | |
788 | ||
789 | # duplicate, we already have virtualbox.png (128x128), this is 32x32 | |
790 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{pname}/VBox.png | |
791 | ||
792 | %if %{with doc} | |
793 | ln -sf %{_docdir}/%{pname}-doc-%{version}/UserManual.pdf $RPM_BUILD_ROOT%{_libdir}/%{pname}/UserManual.pdf | |
794 | %if %{with all_langs} | |
795 | ln -sf %{_docdir}/%{pname}-doc-%{version}/UserManual_fr_FR.pdf $RPM_BUILD_ROOT%{_libdir}/%{pname}/UserManual_fr_FR.pdf | |
796 | %endif | |
797 | %endif | |
798 | %endif | |
799 | ||
800 | %if %{with kernel} | |
801 | install -d $RPM_BUILD_ROOT{/etc/modules-load.d,/sbin} | |
802 | ||
803 | cp -a PLD-MODULE-BUILD/installed/* $RPM_BUILD_ROOT | |
804 | ||
805 | # Tell systemd to load modules | |
806 | cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/modules-load.d/virtualbox-host.conf | |
807 | cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/modules-load.d/virtualbox-guest.conf | |
808 | %endif | |
809 | ||
810 | %clean | |
811 | rm -rf $RPM_BUILD_ROOT | |
812 | ||
813 | %pre | |
814 | %groupadd -g 221 -r -f vbox | |
815 | ||
816 | %post | |
817 | /sbin/chkconfig --add vboxautostart | |
818 | %service -n vboxautostart restart | |
819 | ||
820 | for i in /sys/bus/usb/devices/*; do | |
821 | if [ -r "$i/dev" ]; then | |
822 | dev="`cat "$i/dev" 2>/dev/null || true`" | |
823 | major="`expr "$dev" : '\(.*\):' 2> /dev/null || true`" | |
824 | minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null || true`" | |
825 | class="`cat $i/bDeviceClass 2> /dev/null || true`" | |
826 | /lib/udev/VBoxCreateUSBNode.sh "$major" "$minor" "$class" vbox 2>/dev/null | |
827 | fi | |
828 | done | |
829 | ||
830 | cat << 'EOF' | |
831 | You must install vboxdrv kernel modules for this software to work: | |
832 | kernel*-virtualbox-host-%{version}-%{rel}@* | |
833 | ||
834 | On Guest Linux system you might want to install: | |
835 | kernel*-virtualbox-guest-%{version}-%{rel}@* | |
836 | ||
837 | EOF | |
838 | ||
839 | %preun | |
840 | if [ "$1" = "0" ]; then | |
841 | /sbin/chkconfig --del vboxautostart | |
842 | %service vboxautostart -q stop | |
843 | fi | |
844 | ||
845 | ||
846 | %postun | |
847 | if [ "$1" = "0" ]; then | |
848 | %groupremove vbox | |
849 | fi | |
850 | ||
851 | %post gui | |
852 | %update_desktop_database | |
853 | %update_icon_cache hicolor | |
854 | %update_mime_database | |
855 | ||
856 | %postun gui | |
857 | %update_desktop_database | |
858 | %update_icon_cache hicolor | |
859 | %update_mime_database | |
860 | ||
861 | %pre guest | |
862 | # Add a group "vboxsf" for Shared Folders access | |
863 | # All users which want to access the auto-mounted Shared Folders have to be added to this group. | |
864 | %groupadd -g 266 -r -f vboxsf | |
865 | ||
866 | %post guest | |
867 | /sbin/chkconfig --add vboxservice | |
868 | %service vboxservice restart | |
869 | %systemd_post vboxservice.service | |
870 | ||
871 | %preun guest | |
872 | if [ "$1" = "0" ]; then | |
873 | /sbin/chkconfig --del vboxservice | |
874 | %service vboxservice -q stop | |
875 | fi | |
876 | %systemd_preun vboxservice.service | |
877 | ||
878 | %postun guest | |
879 | if [ "$1" = "0" ]; then | |
880 | %groupremove vboxsf | |
881 | fi | |
882 | %systemd_reload | |
883 | ||
884 | %triggerpostun guest -- VirtualBox-guest < 4.3.0-1 | |
885 | %systemd_trigger vboxservice.service | |
886 | ||
887 | %pre -n lightdm-greeter-vbox | |
888 | %addusertogroup xdm vbox | |
889 | ||
890 | %post -n dkms-vboxguest | |
891 | dkms add -m vboxguest -v %{version}-%{rel} --rpm_safe_upgrade && \ | |
892 | dkms build -m vboxguest -v %{version}-%{rel} --rpm_safe_upgrade && \ | |
893 | dkms install -m vboxguest -v %{version}-%{rel} --rpm_safe_upgrade || : | |
894 | ||
895 | %preun -n dkms-vboxguest | |
896 | dkms remove -m vboxguest -v %{version}-%{rel} --rpm_safe_upgrade --all || : | |
897 | ||
898 | %post -n dkms-vboxhost | |
899 | dkms add -m vboxhost -v %{version}-%{rel} --rpm_safe_upgrade && \ | |
900 | dkms build -m vboxhost -v %{version}-%{rel} --rpm_safe_upgrade && \ | |
901 | dkms install -m vboxhost -v %{version}-%{rel} --rpm_safe_upgrade || : | |
902 | ||
903 | %preun -n dkms-vboxhost | |
904 | dkms remove -m vboxhost -v %{version}-%{rel} --rpm_safe_upgrade --all || : | |
905 | ||
906 | %if %{with userspace} | |
907 | %files | |
908 | %defattr(644,root,root,755) | |
909 | %dir %attr(751,root,root) %{_sysconfdir}/vbox | |
910 | %dir %attr(770,root,vbox) %{_sysconfdir}/vbox/autostart | |
911 | %attr(640,root,vbox) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vbox/autostart.cfg | |
912 | %attr(754,root,root) /etc/rc.d/init.d/vboxautostart | |
913 | %attr(755,root,root) /sbin/mount.vdi | |
914 | %attr(755,root,root) %{_bindir}/VBoxAutostart | |
915 | %attr(755,root,root) %{_bindir}/VBoxBalloonCtrl | |
916 | %attr(755,root,root) %{_bindir}/VBoxDTrace | |
917 | %attr(755,root,root) %{_bindir}/VBoxHeadless | |
918 | %attr(755,root,root) %{_bindir}/VBoxManage | |
919 | %attr(755,root,root) %{_bindir}/VBoxSDL | |
920 | %attr(755,root,root) %{_bindir}/VBoxVRDP | |
921 | %attr(755,root,root) %{_bindir}/vbox-img | |
922 | %dir %{_libdir}/%{pname} | |
923 | # libraries | |
924 | %attr(755,root,root) %{_libdir}/%{pname}/DbgPlugInDiggers.so | |
925 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxAuth.so | |
926 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxAuthSimple.so | |
927 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDD.so | |
928 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDD2.so | |
929 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDDU.so | |
930 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDragAndDropSvc.so | |
931 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxGuestControlSvc.so | |
932 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxGuestPropSvc.so | |
933 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxHostChannel.so | |
934 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxKeyboard.so | |
935 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxOGLhostcrutil.so | |
936 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxOGLhosterrorspu.so | |
937 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxOGLrenderspu.so | |
938 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxPython*.so | |
939 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxREM.so | |
940 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxRT.so | |
941 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSharedClipboard.so | |
942 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSharedCrOpenGL.so | |
943 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSharedFolders.so | |
944 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxVMM.so | |
945 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxXPCOM.so | |
946 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxXPCOMC.so | |
947 | %ifarch %{ix86} | |
948 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxREM32.so | |
949 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxREM64.so | |
950 | %endif | |
951 | ||
952 | # binaries | |
953 | %attr(755,root,root) %{_libdir}/%{pname}/VBox.sh | |
954 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxAutostart | |
955 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxBalloonCtrl | |
956 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDTrace | |
957 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxExtPackHelperApp | |
958 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxHeadless | |
959 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxManage | |
960 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxNetAdpCtl | |
961 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxNetDHCP | |
962 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxNetNAT | |
963 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSDL | |
964 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSVC | |
965 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxTunctl | |
966 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxVMMPreload | |
967 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxVolInfo | |
968 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxXPCOMIPCD | |
969 | %attr(755,root,root) %{_libdir}/%{pname}/iPxeBaseBin | |
970 | %if %{with doc} | |
971 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxManageHelp | |
972 | %endif | |
973 | %dir %{_libdir}/%{pname}/tools | |
974 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTCat | |
975 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTChMod | |
976 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTDbgSymCache | |
977 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTGzip | |
978 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTHttp | |
979 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTIsoMaker | |
980 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTKrnlModInfo | |
981 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTLdrFlt | |
982 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTLs | |
983 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTManifest | |
984 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTMkDir | |
985 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTRm | |
986 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTRmDir | |
987 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTShutdown | |
988 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTSignTool | |
989 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTTar | |
990 | %attr(755,root,root) %{_libdir}/%{pname}/tools/RTUnzip | |
991 | %attr(755,root,root) %{_libdir}/%{pname}/tools/scm | |
992 | ||
993 | %dir %{_libdir}/%{pname}/ExtensionPacks | |
994 | %{_libdir}/%{pname}/ExtensionPacks/VNC/ExtPack.xml | |
995 | %dir %{_libdir}/%{pname}/ExtensionPacks/VNC | |
996 | %dir %{_libdir}/%{pname}/ExtensionPacks/VNC/linux* | |
997 | %attr(755,root,root) %{_libdir}/%{pname}/ExtensionPacks/VNC/linux*/VBoxVNC*.so | |
998 | %dir %{_libdir}/%{pname}/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack | |
999 | %{_libdir}/%{pname}/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/ExtPack.xml | |
1000 | %dir %{_libdir}/%{pname}/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux* | |
1001 | %attr(755,root,root) %{_libdir}/%{pname}/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux*/VBoxDTrace*.so | |
1002 | %{_libdir}/%{pname}/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux*/VBoxDTraceR0.debug | |
1003 | %{_libdir}/%{pname}/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux*/VBoxDTraceR0.r0 | |
1004 | ||
1005 | %{_libdir}/%{pname}/VBoxCpuReport | |
1006 | %{_libdir}/%{pname}/VBoxDD2R0.debug | |
1007 | %{_libdir}/%{pname}/VBoxDD2R0.r0 | |
1008 | %{_libdir}/%{pname}/VBoxDD2RC.debug | |
1009 | %{_libdir}/%{pname}/VBoxDD2RC.rc | |
1010 | %{_libdir}/%{pname}/VBoxDDRC.debug | |
1011 | %{_libdir}/%{pname}/VBoxDDRC.rc | |
1012 | %{_libdir}/%{pname}/VBoxDDR0.debug | |
1013 | %{_libdir}/%{pname}/VBoxDDR0.r0 | |
1014 | %{_libdir}/%{pname}/VBoxEFI32.fd | |
1015 | %{_libdir}/%{pname}/VBoxEFI64.fd | |
1016 | %{_libdir}/%{pname}/VMMRC.debug | |
1017 | %{_libdir}/%{pname}/VMMRC.rc | |
1018 | %{_libdir}/%{pname}/VMMR0.debug | |
1019 | %{_libdir}/%{pname}/VMMR0.r0 | |
1020 | ||
1021 | %dir %{_libdir}/%{pname}/components | |
1022 | %{_libdir}/%{pname}/components/VBoxXPCOMBase.xpt | |
1023 | %{_libdir}/%{pname}/components/VirtualBox_XPCOM.xpt | |
1024 | %attr(755,root,root) %{_libdir}/%{pname}/components/VBoxC.so | |
1025 | %attr(755,root,root) %{_libdir}/%{pname}/components/VBoxSVCM.so | |
1026 | %attr(755,root,root) %{_libdir}/%{pname}/components/VBoxXPCOMIPCC.so | |
1027 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSysInfo.sh | |
1028 | ||
1029 | %{_libdir}/%{pname}/UnattendedTemplates | |
1030 | ||
1031 | %dir %{_datadir}/%{pname} | |
1032 | ||
1033 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/*.rules | |
1034 | %attr(755,root,root) /lib/udev/VBoxCreateUSBNode.sh | |
1035 | ||
1036 | %if %{with gui} | |
1037 | %files gui | |
1038 | %defattr(644,root,root,755) | |
1039 | %attr(755,root,root) %{_bindir}/VirtualBox | |
1040 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDbg.so | |
1041 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxTestOGL | |
1042 | %attr(755,root,root) %{_libdir}/%{pname}/VirtualBox | |
1043 | %dir %{_datadir}/%{pname}/nls | |
1044 | %lang(bg) %{_datadir}/%{pname}/nls/*_bg.qm | |
1045 | %lang(ca) %{_datadir}/%{pname}/nls/*_ca.qm | |
1046 | %lang(ca_VA) %{_datadir}/%{pname}/nls/*_ca_VA.qm | |
1047 | %lang(cs) %{_datadir}/%{pname}/nls/*_cs.qm | |
1048 | %lang(da) %{_datadir}/%{pname}/nls/*_da.qm | |
1049 | %lang(de) %{_datadir}/%{pname}/nls/*_de.qm | |
1050 | %lang(en) %{_datadir}/%{pname}/nls/*_el.qm | |
1051 | %lang(en) %{_datadir}/%{pname}/nls/*_en.qm | |
1052 | %lang(es) %{_datadir}/%{pname}/nls/*_es.qm | |
1053 | %lang(eu) %{_datadir}/%{pname}/nls/*_eu.qm | |
1054 | %lang(fa) %{_datadir}/%{pname}/nls/*_fa.qm | |
1055 | %lang(fi) %{_datadir}/%{pname}/nls/*_fi.qm | |
1056 | %lang(fr) %{_datadir}/%{pname}/nls/*_fr.qm | |
1057 | %lang(gl) %{_datadir}/%{pname}/nls/*_gl.qm | |
1058 | %lang(he) %{_datadir}/%{pname}/nls/*_he.qm | |
1059 | %lang(hu) %{_datadir}/%{pname}/nls/*_hu.qm | |
1060 | %lang(id) %{_datadir}/%{pname}/nls/*_id.qm | |
1061 | %lang(it) %{_datadir}/%{pname}/nls/*_it.qm | |
1062 | %lang(ja) %{_datadir}/%{pname}/nls/*_ja.qm | |
1063 | %lang(km_KH) %{_datadir}/%{pname}/nls/*_km_KH.qm | |
1064 | %lang(ko) %{_datadir}/%{pname}/nls/*_ko.qm | |
1065 | %lang(lt) %{_datadir}/%{pname}/nls/*_lt.qm | |
1066 | %lang(nl) %{_datadir}/%{pname}/nls/*_nl.qm | |
1067 | %lang(pl) %{_datadir}/%{pname}/nls/*_pl.qm | |
1068 | %lang(pt) %{_datadir}/%{pname}/nls/*_pt.qm | |
1069 | %lang(pt_BR) %{_datadir}/%{pname}/nls/*_pt_BR.qm | |
1070 | %lang(ro) %{_datadir}/%{pname}/nls/*_ro.qm | |
1071 | %lang(ru) %{_datadir}/%{pname}/nls/*_ru.qm | |
1072 | %lang(sk) %{_datadir}/%{pname}/nls/*_sk.qm | |
1073 | %lang(sk) %{_datadir}/%{pname}/nls/*_sl.qm | |
1074 | %lang(sr) %{_datadir}/%{pname}/nls/*_sr.qm | |
1075 | %lang(sv) %{_datadir}/%{pname}/nls/*_sv.qm | |
1076 | %lang(th) %{_datadir}/%{pname}/nls/*_th.qm | |
1077 | %lang(tr) %{_datadir}/%{pname}/nls/*_tr.qm | |
1078 | %lang(uk) %{_datadir}/%{pname}/nls/*_uk.qm | |
1079 | %lang(zh_CN) %{_datadir}/%{pname}/nls/*_zh_CN.qm | |
1080 | %lang(zh_TW) %{_datadir}/%{pname}/nls/*_zh_TW.qm | |
1081 | %{_desktopdir}/virtualbox.desktop | |
1082 | %{_pixmapsdir}/virtualbox.png | |
1083 | %{_iconsdir}/hicolor/*/apps/virtualbox.png | |
1084 | %{_iconsdir}/hicolor/*/apps/virtualbox.svg | |
1085 | %{_iconsdir}/hicolor/*/mimetypes/virtualbox-*.png | |
1086 | %{_datadir}/mime/packages/virtualbox.xml | |
1087 | %endif | |
1088 | ||
1089 | %files additions | |
1090 | %defattr(644,root,root,755) | |
1091 | %{_datadir}/%{pname}/VBoxGuestAdditions.iso | |
1092 | ||
1093 | %files guest | |
1094 | %defattr(644,root,root,755) | |
1095 | %attr(755,root,root) /sbin/mount.vboxsf | |
1096 | %attr(754,root,root) /etc/rc.d/init.d/vboxservice | |
1097 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vboxservice | |
1098 | %{systemdunitdir}/vboxservice.service | |
1099 | %attr(755,root,root) %{_bindir}/VBoxControl | |
1100 | %attr(755,root,root) %{_bindir}/VBoxService | |
1101 | ||
1102 | %files guest-x11 | |
1103 | %defattr(644,root,root,755) | |
1104 | /etc/xdg/autostart/vboxclient.desktop | |
1105 | %attr(755,root,root) %{_bindir}/VBoxClient | |
1106 | %attr(755,root,root) %{_bindir}/VBoxClient-all | |
1107 | ||
1108 | %if %{with webservice} | |
1109 | %files webservice | |
1110 | %defattr(644,root,root,755) | |
1111 | %attr(755,root,root) %{_bindir}/vboxwebsrv | |
1112 | %attr(755,root,root) %{_libdir}/%{pname}/vboxwebsrv | |
1113 | %attr(755,root,root) %{_libdir}/%{pname}/webtest | |
1114 | %endif | |
1115 | ||
1116 | %if %{with lightdm} | |
1117 | %files -n lightdm-greeter-vbox | |
1118 | %defattr(644,root,root,755) | |
1119 | %attr(755,root,root) %{_sbindir}/vbox-greeter | |
1120 | %{_datadir}/xgreeters/vbox-greeter.desktop | |
1121 | %endif | |
1122 | ||
1123 | %files -n pam-pam_vbox | |
1124 | %defattr(644,root,root,755) | |
1125 | %attr(755,root,root) /%{_lib}/security/pam_vbox.so | |
1126 | ||
1127 | %if %{with doc} | |
1128 | %files doc | |
1129 | %defattr(644,root,root,755) | |
1130 | # this is a symlink... | |
1131 | %doc %{_libdir}/%{pname}/UserManual.pdf | |
1132 | %if %{with all_langs} | |
1133 | %lang(fr) %doc %{_libdir}/%{pname}/UserManual_fr_FR.pdf | |
1134 | %endif | |
1135 | # ..to this file | |
1136 | %doc %{outdir}/UserManual.pdf | |
1137 | %if %{with all_langs} | |
1138 | %lang(fr) %doc %{outdir}/UserManual_fr_FR.pdf | |
1139 | %endif | |
1140 | %endif | |
1141 | ||
1142 | %files -n xorg-driver-video-vboxvideo | |
1143 | %defattr(644,root,root,755) | |
1144 | %attr(755,root,root) %{_libdir}/xorg/modules/dri/vboxvideo_dri.so | |
1145 | # vboxvideo_dri.so deps | |
1146 | %attr(755,root,root) %{_libdir}/VBoxEGL.so | |
1147 | %attr(755,root,root) %{_libdir}/VBoxOGLarrayspu.so | |
1148 | %attr(755,root,root) %{_libdir}/VBoxOGLcrutil.so | |
1149 | %attr(755,root,root) %{_libdir}/VBoxOGLerrorspu.so | |
1150 | %attr(755,root,root) %{_libdir}/VBoxOGLfeedbackspu.so | |
1151 | %attr(755,root,root) %{_libdir}/VBoxOGLpackspu.so | |
1152 | %attr(755,root,root) %{_libdir}/VBoxOGLpassthroughspu.so | |
1153 | ||
1154 | %if %{with dkms} | |
1155 | %files -n dkms-vboxguest | |
1156 | %defattr(644,root,root,755) | |
1157 | %{_usrsrc}/vboxguest-%{version}-%{rel} | |
1158 | ||
1159 | %files -n dkms-vboxhost | |
1160 | %defattr(644,root,root,755) | |
1161 | %{_usrsrc}/vboxhost-%{version}-%{rel} | |
1162 | %endif | |
1163 | %endif |