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