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