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