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