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