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