]>
Commit | Line | Data |
---|---|---|
48363591 | 1 | # |
2 | # TODO: | |
74268e47 | 3 | # - Find how to compile with PLD CFLAGS/CXXFLAGS/LDFLAGS. |
74268e47 | 4 | # - Package SDK. |
09c79ddb | 5 | # - Package utils (and write initscripts ?) for Guest OS. |
ffb38bb6 | 6 | # - Check License of VBoxGuestAdditions_*.iso, it's probably not GPL v2. |
5f8b0a92 | 7 | # If so check if it is distributable. |
48363591 | 8 | # |
9 | # Conditional build: | |
10 | %bcond_without dist_kernel # without distribution kernel | |
d1c4ec5b | 11 | %bcond_without kernel # don't build kernel module |
d1c4ec5b | 12 | %bcond_without userspace # don't build userspace package |
cc9d49be | 13 | %bcond_with force_userspace # force userspace build (useful if alt_kernel is set) |
b29bcb41 | 14 | %bcond_with verbose |
05f1b1f5 | 15 | |
8833bce1 | 16 | %if %{without kernel} |
17 | %undefine with_dist_kernel | |
18 | %endif | |
bd3faca3 | 19 | %if "%{_alt_kernel}" != "%{nil}" |
20 | %undefine with_userspace | |
21 | %endif | |
cc9d49be AG |
22 | %if %{with force_userspace} |
23 | %define with_userspace 1 | |
24 | %endif | |
05f9288a ER |
25 | %if %{without userspace} |
26 | # nothing to be placed to debuginfo package | |
27 | %define _enable_debug_packages 0 | |
28 | %endif | |
bd3faca3 | 29 | |
b957c74f | 30 | %define rel 3 |
bd3faca3 | 31 | %define pname VirtualBox |
93ccc0e8 ER |
32 | Summary: VirtualBox OSE - x86 hardware virtualizer |
33 | Summary(pl.UTF-8): VirtualBox OSE - wirtualizator sprzętu x86 | |
bd3faca3 | 34 | Name: %{pname}%{_alt_kernel} |
115b8460 | 35 | Version: 3.1.2 |
fe3d1798 | 36 | Release: %{rel} |
48363591 | 37 | License: GPL v2 |
38 | Group: Applications/Emulators | |
0b0842e2 | 39 | Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}-OSE.tar.bz2 |
115b8460 | 40 | # Source0-md5: e7808f16114f5b1a65aa2df1aa33e1a7 |
0b0842e2 | 41 | Source1: http://download.virtualbox.org/virtualbox/%{version}/UserManual.pdf |
115b8460 | 42 | # Source1-md5: 052357bb684515035b3e561b35a1d6f2 |
0b0842e2 | 43 | Source2: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso |
115b8460 | 44 | # Source2-md5: d1ac5c53fb889338849134e07a6bc16f |
67ad4c40 | 45 | Source3: %{pname}-vboxdrv.init |
dc0a2786 | 46 | Source4: %{pname}-vboxguest.init |
11848f5b | 47 | Source5: %{pname}-vboxnetflt.init |
48 | Source6: %{pname}-vboxvfs.init | |
11848f5b | 49 | Source8: %{pname}.sh |
4f09a416 | 50 | Source9: mount.vdi |
bd3faca3 | 51 | Patch0: %{pname}-configure.patch |
006342ee | 52 | Patch1: %{pname}-configure-spaces.patch |
67a4f3c1 | 53 | Patch2: %{pname}-export_modules.patch |
8473a80d | 54 | Patch3: %{pname}-VBoxSysInfo.patch |
48363591 | 55 | URL: http://www.virtualbox.org/ |
ce9843cd | 56 | BuildRequires: rpmbuild(macros) >= 1.379 |
83ffcfa8 | 57 | %if %{with userspace} |
ce9843cd ER |
58 | %ifarch %{x8664} |
59 | BuildRequires: gcc-multilib | |
60 | BuildRequires: glibc-devel(i686) | |
61 | BuildRequires: libstdc++-multilib-devel | |
4fff279a | 62 | BuildRequires: libstdc++-multilib-static |
ce9843cd | 63 | %endif |
ce9843cd ER |
64 | %if "%{pld_release}" == "ac" |
65 | BuildRequires: XFree86-devel | |
66 | %else | |
67 | BuildRequires: xorg-lib-libXcursor-devel | |
68 | BuildRequires: xorg-lib-libXmu-devel | |
69 | %endif | |
00149140 | 70 | BuildRequires: OpenGL-GLU-devel |
523e7409 | 71 | BuildRequires: OpenGL-devel |
cef75615 | 72 | BuildRequires: QtGui-devel |
2d17bb72 | 73 | BuildRequires: QtNetwork-devel |
dd64a424 | 74 | BuildRequires: QtOpenGL-devel |
c574efad | 75 | BuildRequires: SDL-devel >= 1.2.7 |
9a1cb119 | 76 | BuildRequires: acpica |
ba702945 | 77 | BuildRequires: alsa-lib-devel >= 1.0.6 |
e5aaadde | 78 | BuildRequires: bash |
48363591 | 79 | BuildRequires: bcc |
80 | BuildRequires: bin86 | |
07ef7f06 | 81 | BuildRequires: curl-devel |
eba4b2aa | 82 | BuildRequires: gcc >= 5:3.2.3 |
48363591 | 83 | BuildRequires: libIDL-devel |
fa974331 | 84 | BuildRequires: libcap-static |
ff01a704 | 85 | BuildRequires: libpng-devel >= 1.2.5 |
d22f0a53 | 86 | BuildRequires: libstdc++-devel >= 5:3.2.3 |
4fff279a | 87 | BuildRequires: libstdc++-static >= 5:3.2.3 |
48363591 | 88 | BuildRequires: libuuid-devel |
ba702945 | 89 | BuildRequires: libxml2-devel >= 2.6.26 |
76ea5ecb | 90 | BuildRequires: libxslt-devel >= 1.1.17 |
ba702945 | 91 | BuildRequires: libxslt-progs >= 1.1.17 |
0bf43862 | 92 | BuildRequires: pkgconfig |
ba702945 | 93 | BuildRequires: pulseaudio-devel >= 0.9.0 |
523e7409 | 94 | BuildRequires: python-devel |
6055e733 | 95 | BuildRequires: python-modules |
250583d4 | 96 | BuildRequires: qt4-build >= 4.2.0 |
2700662b | 97 | BuildRequires: qt4-linguist |
1e840a77 | 98 | BuildRequires: sed >= 4.0 |
0bf43862 | 99 | BuildRequires: which |
e5aaadde | 100 | BuildRequires: xalan-c-devel >= 1.10.0 |
e5aaadde | 101 | BuildRequires: xerces-c-devel >= 2.6.0 |
102 | BuildRequires: zlib-devel >= 1.2.1 | |
23d9d34e | 103 | %endif |
ce9843cd ER |
104 | %if %{with dist_kernel} |
105 | BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20 | |
83ffcfa8 | 106 | %endif |
0afa64ad | 107 | Requires(post,preun): /sbin/chkconfig |
5f1cec1f ER |
108 | Requires(postun): /usr/sbin/groupdel |
109 | Requires(pre): /usr/bin/getgid | |
110 | Requires(pre): /usr/sbin/groupadd | |
fb661e50 | 111 | Suggests: gxmessage |
5f1cec1f | 112 | Provides: group(vbox) |
eba4b2aa | 113 | ExclusiveArch: %{ix86} %{x8664} |
48363591 | 114 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
115 | ||
eba4b2aa | 116 | %ifarch %{x8664} |
fe3d1798 | 117 | %define outdir amd64 |
5088674d | 118 | %else |
fe3d1798 | 119 | %define outdir x86 |
5088674d | 120 | %endif |
fa974331 | 121 | %define _sbindir /sbin |
5088674d | 122 | |
48363591 | 123 | %description |
93ccc0e8 | 124 | InnoTek VirtualBox OSE is a general-purpose full virtualizer for x86 |
48363591 | 125 | hardware. Targeted at server, desktop and embedded use, it is now the |
126 | only professional-quality virtualization solution that is also Open | |
127 | Source Software. | |
128 | ||
93ccc0e8 | 129 | Some of the features of VirtualBox OSE are: |
48363591 | 130 | |
93ccc0e8 | 131 | Modularity: VirtualBox OSE has an extremely modular design with |
48363591 | 132 | well-defined internal programming interfaces and a client/server |
133 | design. This makes it easy to control it from several interfaces at | |
134 | once: for example, you can start a virtual machine in a typical | |
135 | virtual machine GUI and then control that machine from the command | |
2df47f85 | 136 | line. VirtualBox OSE also comes with a full Software Development Kit: |
137 | even though it is Open Source Software, you don't have to hack the | |
138 | source to write a new interface for VirtualBox OSE. | |
48363591 | 139 | |
140 | Virtual machine descriptions in XML: the configuration settings of | |
141 | virtual machines are stored entirely in XML and are independent of the | |
142 | local machines. Virtual machine definitions can therefore easily be | |
143 | ported to other computers. | |
144 | ||
fd8fc899 | 145 | %description -l pl.UTF-8 |
93ccc0e8 | 146 | InnoTek VirtualBox OSE jest emulatorem sprzętu x86. Kierowany do |
fd8fc899 JR |
147 | zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie |
148 | jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym | |
149 | również jako Otwarte Oprogramowanie. | |
48363591 | 150 | |
fd8fc899 | 151 | Przykładowe cechy VirtualBoksa: |
48363591 | 152 | |
93ccc0e8 | 153 | Modularność: VirtualBox OSE jest wysoce zmodularyzowanym produktem z |
fd8fc899 JR |
154 | dobrze zaprojektowanym wewnętrznym interfejsem programowym typu |
155 | klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą | |
156 | różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z | |
157 | poziomu interfejsu graficznego, a później kontrolować ją z linii | |
2df47f85 | 158 | poleceń. VirtualBox OSE dostarcza również pełny pakiet deweloperski, |
159 | co pozwala stworzyć dowolny inny interfejs zarządzania maszyną | |
160 | wirtualną. | |
48363591 | 161 | |
fd8fc899 JR |
162 | Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn |
163 | wirtualnych są w całości przechowywane w XML-u i są niezależne od | |
164 | lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść | |
165 | konfigurację maszyny wirtualnej na inny komputer. | |
48363591 | 166 | |
abb636b9 | 167 | %package udev |
93ccc0e8 | 168 | Summary: udev rules for VirtualBox OSE kernel modules |
da083e45 | 169 | Summary(pl.UTF-8): Reguły udev dla modułów jądra Linuksa dla VirtualBoksa |
8512deca | 170 | Release: %{rel} |
abb636b9 | 171 | Group: Base/Kernel |
93bf3da1 | 172 | Requires: udev-core |
abb636b9 | 173 | |
174 | %description udev | |
2df47f85 | 175 | udev rules for VirtualBox OSE kernel modules. |
abb636b9 | 176 | |
177 | %description udev -l pl.UTF-8 | |
2df47f85 | 178 | Reguły udev dla modułów jądra Linuksa dla VirtualBoksa. |
abb636b9 | 179 | |
ffb38bb6 ER |
180 | %package additions |
181 | Summary: VirtualBox Guest Additions | |
182 | Group: Base | |
183 | Requires: %{name} = %{version}-%{release} | |
184 | ||
00a4a7ca | 185 | %description additions |
ffb38bb6 ER |
186 | VirtualBox Guest Additions. |
187 | ||
188 | This package contains ISO9660 image with drivers for Guest OS. | |
189 | ||
dc0a2786 | 190 | %package -n kernel%{_alt_kernel}-misc-vboxguest |
b0444796 | 191 | Summary: VirtualBox OSE Guest Additions for Linux Module |
ea074a55 | 192 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 193 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 194 | Group: Base/Kernel |
195 | Requires(post,postun): /sbin/depmod | |
196 | Requires: dev >= 2.9.0-7 | |
197 | %if %{with dist_kernel} | |
198 | %requires_releq_kernel | |
ca8701ad | 199 | Requires(postun): %releq_kernel |
74268e47 | 200 | %endif |
dc0a2786 AG |
201 | Provides: kernel(vboxguest) = %{version}-%{rel} |
202 | Obsoletes: kernel%{_alt_kernel}-misc-vboxadd | |
f7de19b3 | 203 | Conflicts: kernel%{_alt_kernel}-misc-vboxdrv |
74268e47 | 204 | |
dc0a2786 | 205 | %description -n kernel%{_alt_kernel}-misc-vboxguest |
b0444796 | 206 | VirtualBox OSE Guest Additions for Linux Module. |
74268e47 | 207 | |
dc0a2786 AG |
208 | %description -n kernel%{_alt_kernel}-misc-vboxguest -l pl.UTF-8 |
209 | Moduł jądra Linuksa vboxguest dla VirtualBoksa OSE - dodatki dla systemu | |
4f09a416 | 210 | gościa. |
74268e47 | 211 | |
48363591 | 212 | %package -n kernel%{_alt_kernel}-misc-vboxdrv |
b0444796 | 213 | Summary: VirtualBox OSE Support Driver |
ea074a55 | 214 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 215 | Release: %{rel}@%{_kernel_ver_str} |
48363591 | 216 | Group: Base/Kernel |
217 | Requires(post,postun): /sbin/depmod | |
218 | Requires: dev >= 2.9.0-7 | |
219 | %if %{with dist_kernel} | |
d6f0c54e | 220 | %requires_releq_kernel |
221 | Requires(postun): %releq_kernel | |
48363591 | 222 | %endif |
fe3d1798 | 223 | Provides: kernel(vboxdrv) = %{version}-%{rel} |
48363591 | 224 | |
225 | %description -n kernel%{_alt_kernel}-misc-vboxdrv | |
b0444796 | 226 | VirtualBox OSE Support Driver. |
48363591 | 227 | |
fd8fc899 | 228 | %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8 |
ea074a55 | 229 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik wsparcia dla |
230 | systemu głównego. | |
48363591 | 231 | |
1dda2f69 | 232 | %package -n kernel%{_alt_kernel}-misc-vboxnetflt |
233 | Summary: VirtualBox OSE Guest Additions for Linux Module | |
ea074a55 | 234 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
1dda2f69 | 235 | Release: %{rel}@%{_kernel_ver_str} |
236 | Group: Base/Kernel | |
237 | Requires(post,postun): /sbin/depmod | |
238 | Requires: dev >= 2.9.0-7 | |
239 | Requires: kernel%{_alt_kernel}-misc-vboxdrv | |
240 | %if %{with dist_kernel} | |
241 | %requires_releq_kernel | |
242 | Requires(postun): %releq_kernel | |
243 | %endif | |
244 | Provides: kernel(vboxnetflt) = %{version}-%{rel} | |
245 | ||
246 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt | |
ea074a55 | 247 | VirtualBox OSE Network Filter Driver. |
1dda2f69 | 248 | |
249 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt -l pl.UTF-8 | |
4f09a416 ER |
250 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik filtrowania sieci |
251 | dla systemu głównego. | |
1dda2f69 | 252 | |
74268e47 | 253 | %package -n kernel%{_alt_kernel}-misc-vboxvfs |
b0444796 | 254 | Summary: Host file system access VFS for VirtualBox OSE |
ea074a55 | 255 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 256 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 257 | Group: Base/Kernel |
258 | Requires(post,postun): /sbin/depmod | |
259 | Requires: dev >= 2.9.0-7 | |
dc0a2786 | 260 | Requires: kernel%{_alt_kernel}-misc-vboxguest |
74268e47 | 261 | %if %{with dist_kernel} |
262 | %requires_releq_kernel | |
263 | Requires(postun): %releq_kernel | |
264 | %endif | |
fe3d1798 | 265 | Provides: kernel(vboxvfs) = %{version}-%{rel} |
74268e47 | 266 | |
267 | %description -n kernel%{_alt_kernel}-misc-vboxvfs | |
b0444796 | 268 | Host file system access VFS for VirtualBox OSE. |
74268e47 | 269 | |
270 | %description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8 | |
4f09a416 ER |
271 | Moduł jądra Linuksa dla VirtualBoksa OSE - dostęp do plików systemu |
272 | głównego z poziomu systemu gościa. | |
74268e47 | 273 | |
67a4f3c1 | 274 | %package -n kernel%{_alt_kernel}-misc-vboxvideo |
275 | Summary: DRM support for VirtualBox OSE | |
276 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE | |
277 | Release: %{rel}@%{_kernel_ver_str} | |
278 | Group: Base/Kernel | |
279 | Requires(post,postun): /sbin/depmod | |
280 | Requires: dev >= 2.9.0-7 | |
281 | %if %{with dist_kernel} | |
282 | %requires_releq_kernel | |
283 | Requires(postun): %releq_kernel | |
284 | %endif | |
285 | Provides: kernel(vboxvideo) = %{version}-%{rel} | |
286 | ||
287 | %description -n kernel%{_alt_kernel}-misc-vboxvideo | |
288 | DRM support for VirtualBox OSE. | |
289 | ||
290 | %description -n kernel%{_alt_kernel}-misc-vboxvideo -l pl.UTF-8 | |
291 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik obsługi DRM. | |
292 | ||
09c79ddb | 293 | %package -n xorg-driver-input-vboxmouse |
93ccc0e8 | 294 | Summary: X.org mouse driver for VirtualBox OSE guest OS |
ea074a55 | 295 | Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 296 | Release: %{rel} |
09c79ddb | 297 | Group: X11/Applications |
298 | Requires: xorg-xserver-server >= 1.0.99.901 | |
6369aec7 | 299 | Requires: xorg-xserver-server(xinput-abi) <= 7.0 |
fa974331 | 300 | Requires: xorg-xserver-server(xinput-abi) >= 4.0 |
09c79ddb | 301 | |
302 | %description -n xorg-driver-input-vboxmouse | |
93ccc0e8 | 303 | X.org mouse driver for VirtualBox OSE guest OS. |
09c79ddb | 304 | |
305 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
fe3d1798 | 306 | Sterownik myszy dla systemu gościa w VirtualBoksie. |
09c79ddb | 307 | |
308 | %package -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 309 | Summary: X.org video driver for VirtualBox OSE guest OS |
ea074a55 | 310 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 311 | Release: %{rel} |
09c79ddb | 312 | Group: X11/Applications |
fa974331 | 313 | Requires: xorg-xserver-server >= 1.0.99.901 |
6369aec7 | 314 | Requires: xorg-xserver-server(videodrv-abi) <= 6.0 |
e8585a55 | 315 | Requires: xorg-xserver-server(videodrv-abi) >= 2.0 |
09c79ddb | 316 | |
317 | %description -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 318 | X.org video driver for VirtualBox OSE guest OS. |
09c79ddb | 319 | |
320 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
ea074a55 | 321 | Sterownik grafiki dla systemu gościa w VirtualBoksie OSE. |
09c79ddb | 322 | |
48363591 | 323 | %prep |
506ebac4 | 324 | %setup -q -n %{pname}-%{version}_OSE |
e709ce6b | 325 | %patch0 -p1 |
006342ee AM |
326 | %patch1 -p1 |
327 | %patch2 -p1 | |
8473a80d | 328 | %patch3 -p1 |
fddcb741 | 329 | |
0b6de2b7 ER |
330 | %{__sed} -i -e 's,$VBOX_DOC_PATH,%{_docdir}/%{name}-%{version},' src/VBox/Installer/linux/virtualbox.desktop |
331 | %{__sed} -i -e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/linux/virtualbox.desktop | |
332 | ||
33233365 | 333 | cat <<'EOF' > udev.conf |
334 | KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660" | |
dc0a2786 | 335 | KERNEL=="vboxguest", NAME="%k", GROUP="vbox", MODE="0660" |
33233365 | 336 | EOF |
23d9d34e | 337 | |
0b6de2b7 | 338 | cp -a %{SOURCE1} . |
11848f5b | 339 | sed 's#@LIBDIR@#%{_libdir}#' < %{SOURCE8} > VirtualBox-wrapper.sh |
fa19f650 | 340 | |
83ffcfa8 | 341 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD |
342 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
343 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
f2dd3ab3 | 344 | ../src/VBox/HostDrivers/linux/export_modules modules.tar.gz --without-hardening && \ |
83ffcfa8 | 345 | tar -zxf modules.tar.gz && rm -f modules.tar.gz |
05f1b1f5 | 346 | |
fddcb741 | 347 | %build |
83ffcfa8 | 348 | %if %{with userspace} |
106d8451 | 349 | ./configure \ |
ae1bbc88 | 350 | --with-gcc="%{__cc}" \ |
351 | --with-g++="%{__cxx}" \ | |
5a497466 | 352 | --disable-hardening \ |
655754f2 | 353 | --disable-kmods |
48363591 | 354 | |
0864aefd | 355 | . ./env.sh && \ |
006342ee | 356 | kmk -j1 %{?with_verbose:KBUILD_VERBOSE=3} USER=$(id -un) |
48363591 | 357 | %endif |
74268e47 | 358 | |
359 | %if %{with kernel} | |
83ffcfa8 | 360 | cd PLD-MODULE-BUILD |
dc0a2786 | 361 | %build_kernel_modules -m vboxguest -C vboxguest |
74268e47 | 362 | %build_kernel_modules -m vboxdrv -C vboxdrv |
1dda2f69 | 363 | %build_kernel_modules -m vboxnetflt -C vboxnetflt |
dc0a2786 | 364 | cp -a vboxguest/Module.symvers vboxvfs |
83ffcfa8 | 365 | %build_kernel_modules -m vboxvfs -C vboxvfs -c |
67a4f3c1 | 366 | %build_kernel_modules -m vboxvideo -C vboxvideo_drm |
74268e47 | 367 | cd .. |
50863744 | 368 | %{__cc} %{rpmcflags} %{rpmldflags} -Wall -Werror src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c -o mount.vboxsf |
d1c4ec5b | 369 | %endif |
48363591 | 370 | |
371 | %install | |
372 | rm -rf $RPM_BUILD_ROOT | |
373 | ||
d1c4ec5b | 374 | %if %{with userspace} |
48363591 | 375 | install -d \ |
50863744 | 376 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_pixmapsdir},%{_desktopdir}} \ |
2dda8d86 | 377 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox \ |
a70507fb | 378 | |
50863744 | 379 | install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/mount.vdi |
70ce4861 | 380 | install -p VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
5b399826 | 381 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox}; do |
70ce4861 | 382 | install -p out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 383 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 384 | done |
385 | ||
70ce4861 | 386 | install -p out/linux.%{outdir}/release/bin/VBox{TestOGL,NetAdpCtl,NetDHCP} \ |
5b399826 | 387 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 388 | install -p out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 389 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 390 | install -p out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 391 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 392 | install -p out/linux.%{outdir}/release/bin/VBoxSysInfo.sh \ |
2a9de9cd | 393 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
48363591 | 394 | |
916ab34d | 395 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 396 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 397 | |
70ce4861 | 398 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
399 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
400 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 401 | |
c7f37a9d | 402 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
1365dd46 | 403 | |
6369aec7 | 404 | install -p out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_17.so \ |
09c79ddb | 405 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
6369aec7 | 406 | install -p out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_17.so \ |
09c79ddb | 407 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
408 | ||
70ce4861 | 409 | install -p out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
0b6de2b7 | 410 | cp -a out/linux.%{outdir}/release/bin/virtualbox.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop |
d1c4ec5b | 411 | |
33233365 | 412 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
70ce4861 | 413 | cp -a udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules |
da083e45 | 414 | %endif |
33233365 | 415 | |
da083e45 | 416 | %if %{with kernel} |
50863744 | 417 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,modprobe.d},%{_sbindir}} |
70ce4861 | 418 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
dc0a2786 | 419 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxguest |
70ce4861 ER |
420 | install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt |
421 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxvfs | |
83ffcfa8 | 422 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc |
dc0a2786 | 423 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxguest/vboxguest -d misc |
1dda2f69 | 424 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxnetflt/vboxnetflt -d misc |
83ffcfa8 | 425 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc |
67a4f3c1 | 426 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvideo_drm/vboxvideo -d misc |
fa974331 | 427 | |
50863744 ER |
428 | install -p mount.vboxsf $RPM_BUILD_ROOT%{_sbindir}/mount.vboxsf |
429 | ||
70ce4861 | 430 | cat <<'EOF' > $RPM_BUILD_ROOT/etc/modprobe.d/vboxvfs.conf |
ffb38bb6 | 431 | # Filesystem name has got it's name from Shared Folders, while module is from VFS |
70ce4861 ER |
432 | alias vboxsf vboxvfs |
433 | EOF | |
d1c4ec5b | 434 | %endif |
05f1b1f5 | 435 | |
48363591 | 436 | %clean |
437 | rm -rf $RPM_BUILD_ROOT | |
438 | ||
3b63d3e8 | 439 | %pre |
440 | %groupadd -g 221 -r -f vbox | |
441 | ||
14561782 | 442 | %post |
d8ed80f4 | 443 | cat << 'EOF' |
7841ddfd ER |
444 | You must also install kernel module for this software to work: |
445 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
446 | ||
447 | Additionally you might want to install: | |
05f12a30 ER |
448 | kernel-misc-vboxnetflt-%{version}-%{rel}@%{_kernel_ver_str} |
449 | ||
fa974331 | 450 | On Guest Linux system you might want to install: |
dc0a2786 | 451 | kernel-misc-vboxguest-%{version}-%{rel}@%{_kernel_ver_str} |
7841ddfd | 452 | kernel-misc-vboxvfs-%{version}-%{rel}@%{_kernel_ver_str} |
67a4f3c1 | 453 | kernel-misc-vboxvideo-%{version}-%{rel}@%{_kernel_ver_str} |
7841ddfd ER |
454 | |
455 | NOTE: for different kernel brands append after word kernel the brand, like: | |
456 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
457 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
458 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
459 | ...etc. | |
d8ed80f4 | 460 | |
7d4acef5 | 461 | Depending on which kernel brand You use. |
d8ed80f4 | 462 | |
463 | EOF | |
464 | ||
3b63d3e8 | 465 | %postun |
466 | if [ "$1" = "0" ]; then | |
467 | %groupremove vbox | |
468 | fi | |
469 | ||
dc0a2786 | 470 | %post -n kernel%{_alt_kernel}-misc-vboxguest |
74268e47 | 471 | %depmod %{_kernel_ver} |
dc0a2786 AG |
472 | /sbin/chkconfig --add vboxguest |
473 | %service vboxguest restart "VirtualBox OSE Guest additions driver" | |
74268e47 | 474 | |
dc0a2786 | 475 | %postun -n kernel%{_alt_kernel}-misc-vboxguest |
74268e47 | 476 | %depmod %{_kernel_ver} |
477 | ||
dc0a2786 | 478 | %preun -n kernel%{_alt_kernel}-misc-vboxguest |
270f67bc | 479 | if [ "$1" = "0" ]; then |
dc0a2786 AG |
480 | %service vboxguest stop |
481 | /sbin/chkconfig --del vboxguest | |
270f67bc | 482 | fi |
483 | ||
48363591 | 484 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
485 | %depmod %{_kernel_ver} | |
270f67bc | 486 | /sbin/chkconfig --add vboxdrv |
ffb38bb6 | 487 | %service vboxdrv restart "VirtualBox OSE Support Driver" |
48363591 | 488 | |
489 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
490 | %depmod %{_kernel_ver} | |
491 | ||
270f67bc | 492 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
493 | if [ "$1" = "0" ]; then | |
494 | %service vboxdrv stop | |
495 | /sbin/chkconfig --del vboxdrv | |
496 | fi | |
497 | ||
1dda2f69 | 498 | %post -n kernel%{_alt_kernel}-misc-vboxnetflt |
499 | %depmod %{_kernel_ver} | |
11848f5b | 500 | /sbin/chkconfig --add vboxnetflt |
fd488e66 | 501 | %service vboxnetflt restart "VirtualBox OSE Network Filter driver" |
1dda2f69 | 502 | |
503 | %postun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
504 | %depmod %{_kernel_ver} | |
505 | ||
11848f5b | 506 | %preun -n kernel%{_alt_kernel}-misc-vboxnetflt |
507 | if [ "$1" = "0" ]; then | |
508 | %service vboxnetflt stop | |
509 | /sbin/chkconfig --del vboxnetflt | |
510 | fi | |
511 | ||
74268e47 | 512 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
513 | %depmod %{_kernel_ver} | |
ca8701ad | 514 | /sbin/chkconfig --add vboxvfs |
fa974331 | 515 | %service vboxvfs restart "VirtualBox OSE Host file system access VFS" |
74268e47 | 516 | |
517 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
518 | %depmod %{_kernel_ver} | |
519 | ||
ca8701ad | 520 | %preun -n kernel%{_alt_kernel}-misc-vboxvfs |
521 | if [ "$1" = "0" ]; then | |
522 | %service vboxvfs stop | |
523 | /sbin/chkconfig --del vboxvfs | |
524 | fi | |
525 | ||
67a4f3c1 | 526 | %post -n kernel%{_alt_kernel}-misc-vboxvideo |
527 | %depmod %{_kernel_ver} | |
528 | ||
529 | %postun -n kernel%{_alt_kernel}-misc-vboxvideo | |
530 | %depmod %{_kernel_ver} | |
531 | ||
d1c4ec5b | 532 | %if %{with userspace} |
48363591 | 533 | %files |
534 | %defattr(644,root,root,755) | |
7d1c0a63 | 535 | %doc UserManual.pdf |
8833bce1 | 536 | %dir %{_libdir}/VirtualBox |
916ab34d | 537 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 538 | %dir %{_libdir}/VirtualBox/components |
539 | %dir %{_libdir}/VirtualBox/nls | |
85b005e2 | 540 | %attr(755,root,root) %{_bindir}/VBoxBFE |
541 | %attr(755,root,root) %{_bindir}/VBoxHeadless | |
542 | %attr(755,root,root) %{_bindir}/VBoxManage | |
543 | %attr(755,root,root) %{_bindir}/VBoxSDL | |
544 | %attr(755,root,root) %{_bindir}/VBoxSVC | |
545 | %attr(755,root,root) %{_bindir}/VBoxTunctl | |
546 | %attr(755,root,root) %{_bindir}/VBoxXPCOMIPCD | |
48363591 | 547 | %attr(755,root,root) %{_bindir}/VirtualBox |
4f09a416 | 548 | %attr(755,root,root) /sbin/mount.vdi |
05f1b1f5 | 549 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
550 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 551 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 552 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
553 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
5b399826 | 554 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTestOGL |
8bb99fd5 | 555 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 556 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
85b005e2 | 557 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD.so |
558 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD2.so | |
559 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDDU.so | |
560 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxGuestPropSvc.so | |
561 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxKeyboard.so | |
5b399826 MM |
562 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetAdpCtl |
563 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetDHCP | |
85b005e2 | 564 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhostcrutil.so |
565 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhosterrorspu.so | |
566 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLrenderspu.so | |
567 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython.so | |
568 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython2_6.so | |
569 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM.so | |
f701b529 | 570 | %ifarch %{ix86} |
5b399826 MM |
571 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM32.so |
572 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM64.so | |
f701b529 | 573 | %endif |
85b005e2 | 574 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxRT.so |
85b005e2 | 575 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedClipboard.so |
576 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedCrOpenGL.so | |
577 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedFolders.so | |
578 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxVMM.so | |
579 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOM.so | |
580 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMC.so | |
fdd1c725 | 581 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
582 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
2a9de9cd | 583 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSysInfo.sh |
85b005e2 | 584 | %{_libdir}/VirtualBox/VBoxDD2GC.gc |
585 | %{_libdir}/VirtualBox/VBoxDDGC.gc | |
586 | %{_libdir}/VirtualBox/VMMGC.gc | |
587 | %{_libdir}/VirtualBox/VBoxDD2R0.r0 | |
588 | %{_libdir}/VirtualBox/VBoxDDR0.r0 | |
589 | %{_libdir}/VirtualBox/VMMR0.r0 | |
85b005e2 | 590 | %{_libdir}/VirtualBox/components/VBoxC.so |
591 | %{_libdir}/VirtualBox/components/VBoxSVCM.so | |
592 | %{_libdir}/VirtualBox/components/VBoxXPCOMBase.xpt | |
593 | %{_libdir}/VirtualBox/components/VBoxXPCOMIPCC.so | |
594 | %{_libdir}/VirtualBox/components/VirtualBox_XPCOM.xpt | |
89ce7412 | 595 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
c5e10a4d | 596 | %lang(bg) %{_libdir}/VirtualBox/nls/*_bg.qm |
72d5ea57 | 597 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 598 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
dc0a2786 | 599 | %lang(da) %{_libdir}/VirtualBox/nls/*_da.qm |
89ce7412 | 600 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm |
11de52da | 601 | %lang(el) %{_libdir}/VirtualBox/nls/*_el.qm |
89ce7412 | 602 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm |
603 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
604 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
605 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
606 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 607 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 608 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
609 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
c5e10a4d | 610 | %lang(km_KH) %{_libdir}/VirtualBox/nls/*_km_KH.qm |
89ce7412 | 611 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm |
72d5ea57 | 612 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 613 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 614 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 615 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 616 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
617 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
618 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 619 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 620 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 621 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
85b005e2 | 622 | %lang(uk) %{_libdir}/VirtualBox/nls/*_uk.qm |
89ce7412 | 623 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
624 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 625 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 626 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 627 | |
ffb38bb6 ER |
628 | %files additions |
629 | %{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso | |
630 | ||
abb636b9 | 631 | %files udev |
632 | %defattr(644,root,root,755) | |
633 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
634 | ||
09c79ddb | 635 | %files -n xorg-driver-input-vboxmouse |
636 | %defattr(644,root,root,755) | |
637 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
638 | ||
639 | %files -n xorg-driver-video-vboxvideo | |
640 | %defattr(644,root,root,755) | |
641 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 642 | %endif |
48363591 | 643 | |
d1c4ec5b | 644 | %if %{with kernel} |
dc0a2786 | 645 | %files -n kernel%{_alt_kernel}-misc-vboxguest |
74268e47 | 646 | %defattr(644,root,root,755) |
dc0a2786 AG |
647 | %attr(754,root,root) /etc/rc.d/init.d/vboxguest |
648 | /lib/modules/%{_kernel_ver}/misc/vboxguest.ko* | |
74268e47 | 649 | |
d1c4ec5b | 650 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 651 | %defattr(644,root,root,755) |
67ad4c40 | 652 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 653 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 654 | |
1dda2f69 | 655 | %files -n kernel%{_alt_kernel}-misc-vboxnetflt |
656 | %defattr(644,root,root,755) | |
11848f5b | 657 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetflt |
1dda2f69 | 658 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko* |
659 | ||
74268e47 | 660 | %files -n kernel%{_alt_kernel}-misc-vboxvfs |
661 | %defattr(644,root,root,755) | |
11848f5b | 662 | %attr(754,root,root) /etc/rc.d/init.d/vboxvfs |
50863744 | 663 | %attr(755,root,root) %{_sbindir}/mount.vboxsf |
70ce4861 | 664 | /etc/modprobe.d/vboxvfs.conf |
74268e47 | 665 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* |
67a4f3c1 | 666 | |
667 | %files -n kernel%{_alt_kernel}-misc-vboxvideo | |
668 | %defattr(644,root,root,755) | |
669 | /lib/modules/%{_kernel_ver}/misc/vboxvideo.ko* | |
670 | %endif |