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