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