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