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