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