]>
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 | |
ba1c4334 | 30 | %define rel 2 |
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 | |
74268e47 | 203 | |
dc0a2786 | 204 | %description -n kernel%{_alt_kernel}-misc-vboxguest |
b0444796 | 205 | VirtualBox OSE Guest Additions for Linux Module. |
74268e47 | 206 | |
dc0a2786 AG |
207 | %description -n kernel%{_alt_kernel}-misc-vboxguest -l pl.UTF-8 |
208 | Moduł jądra Linuksa vboxguest dla VirtualBoksa OSE - dodatki dla systemu | |
4f09a416 | 209 | gościa. |
74268e47 | 210 | |
48363591 | 211 | %package -n kernel%{_alt_kernel}-misc-vboxdrv |
b0444796 | 212 | Summary: VirtualBox OSE Support Driver |
ea074a55 | 213 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 214 | Release: %{rel}@%{_kernel_ver_str} |
48363591 | 215 | Group: Base/Kernel |
216 | Requires(post,postun): /sbin/depmod | |
217 | Requires: dev >= 2.9.0-7 | |
218 | %if %{with dist_kernel} | |
d6f0c54e | 219 | %requires_releq_kernel |
220 | Requires(postun): %releq_kernel | |
48363591 | 221 | %endif |
fe3d1798 | 222 | Provides: kernel(vboxdrv) = %{version}-%{rel} |
48363591 | 223 | |
224 | %description -n kernel%{_alt_kernel}-misc-vboxdrv | |
b0444796 | 225 | VirtualBox OSE Support Driver. |
48363591 | 226 | |
fd8fc899 | 227 | %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8 |
ea074a55 | 228 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik wsparcia dla |
229 | systemu głównego. | |
48363591 | 230 | |
1dda2f69 | 231 | %package -n kernel%{_alt_kernel}-misc-vboxnetflt |
232 | Summary: VirtualBox OSE Guest Additions for Linux Module | |
ea074a55 | 233 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
1dda2f69 | 234 | Release: %{rel}@%{_kernel_ver_str} |
235 | Group: Base/Kernel | |
236 | Requires(post,postun): /sbin/depmod | |
237 | Requires: dev >= 2.9.0-7 | |
238 | Requires: kernel%{_alt_kernel}-misc-vboxdrv | |
239 | %if %{with dist_kernel} | |
240 | %requires_releq_kernel | |
241 | Requires(postun): %releq_kernel | |
242 | %endif | |
243 | Provides: kernel(vboxnetflt) = %{version}-%{rel} | |
244 | ||
245 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt | |
ea074a55 | 246 | VirtualBox OSE Network Filter Driver. |
1dda2f69 | 247 | |
248 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt -l pl.UTF-8 | |
4f09a416 ER |
249 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik filtrowania sieci |
250 | dla systemu głównego. | |
1dda2f69 | 251 | |
74268e47 | 252 | %package -n kernel%{_alt_kernel}-misc-vboxvfs |
b0444796 | 253 | Summary: Host file system access VFS for VirtualBox OSE |
ea074a55 | 254 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 255 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 256 | Group: Base/Kernel |
257 | Requires(post,postun): /sbin/depmod | |
258 | Requires: dev >= 2.9.0-7 | |
dc0a2786 | 259 | Requires: kernel%{_alt_kernel}-misc-vboxguest |
74268e47 | 260 | %if %{with dist_kernel} |
261 | %requires_releq_kernel | |
262 | Requires(postun): %releq_kernel | |
263 | %endif | |
fe3d1798 | 264 | Provides: kernel(vboxvfs) = %{version}-%{rel} |
74268e47 | 265 | |
266 | %description -n kernel%{_alt_kernel}-misc-vboxvfs | |
b0444796 | 267 | Host file system access VFS for VirtualBox OSE. |
74268e47 | 268 | |
269 | %description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8 | |
4f09a416 ER |
270 | Moduł jądra Linuksa dla VirtualBoksa OSE - dostęp do plików systemu |
271 | głównego z poziomu systemu gościa. | |
74268e47 | 272 | |
67a4f3c1 | 273 | %package -n kernel%{_alt_kernel}-misc-vboxvideo |
274 | Summary: DRM support for VirtualBox OSE | |
275 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE | |
276 | Release: %{rel}@%{_kernel_ver_str} | |
277 | Group: Base/Kernel | |
278 | Requires(post,postun): /sbin/depmod | |
279 | Requires: dev >= 2.9.0-7 | |
280 | %if %{with dist_kernel} | |
281 | %requires_releq_kernel | |
282 | Requires(postun): %releq_kernel | |
283 | %endif | |
284 | Provides: kernel(vboxvideo) = %{version}-%{rel} | |
285 | ||
286 | %description -n kernel%{_alt_kernel}-misc-vboxvideo | |
287 | DRM support for VirtualBox OSE. | |
288 | ||
289 | %description -n kernel%{_alt_kernel}-misc-vboxvideo -l pl.UTF-8 | |
290 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik obsługi DRM. | |
291 | ||
09c79ddb | 292 | %package -n xorg-driver-input-vboxmouse |
93ccc0e8 | 293 | Summary: X.org mouse driver for VirtualBox OSE guest OS |
ea074a55 | 294 | Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 295 | Release: %{rel} |
09c79ddb | 296 | Group: X11/Applications |
297 | Requires: xorg-xserver-server >= 1.0.99.901 | |
6369aec7 | 298 | Requires: xorg-xserver-server(xinput-abi) <= 7.0 |
fa974331 | 299 | Requires: xorg-xserver-server(xinput-abi) >= 4.0 |
09c79ddb | 300 | |
301 | %description -n xorg-driver-input-vboxmouse | |
93ccc0e8 | 302 | X.org mouse driver for VirtualBox OSE guest OS. |
09c79ddb | 303 | |
304 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
fe3d1798 | 305 | Sterownik myszy dla systemu gościa w VirtualBoksie. |
09c79ddb | 306 | |
307 | %package -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 308 | Summary: X.org video driver for VirtualBox OSE guest OS |
ea074a55 | 309 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 310 | Release: %{rel} |
09c79ddb | 311 | Group: X11/Applications |
fa974331 | 312 | Requires: xorg-xserver-server >= 1.0.99.901 |
6369aec7 | 313 | Requires: xorg-xserver-server(videodrv-abi) <= 6.0 |
e8585a55 | 314 | Requires: xorg-xserver-server(videodrv-abi) >= 2.0 |
09c79ddb | 315 | |
316 | %description -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 317 | X.org video driver for VirtualBox OSE guest OS. |
09c79ddb | 318 | |
319 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
ea074a55 | 320 | Sterownik grafiki dla systemu gościa w VirtualBoksie OSE. |
09c79ddb | 321 | |
48363591 | 322 | %prep |
506ebac4 | 323 | %setup -q -n %{pname}-%{version}_OSE |
e709ce6b | 324 | %patch0 -p1 |
006342ee AM |
325 | %patch1 -p1 |
326 | %patch2 -p1 | |
8473a80d | 327 | %patch3 -p1 |
fddcb741 | 328 | |
0b6de2b7 ER |
329 | %{__sed} -i -e 's,$VBOX_DOC_PATH,%{_docdir}/%{name}-%{version},' src/VBox/Installer/linux/virtualbox.desktop |
330 | %{__sed} -i -e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/linux/virtualbox.desktop | |
331 | ||
33233365 | 332 | cat <<'EOF' > udev.conf |
333 | KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660" | |
dc0a2786 | 334 | KERNEL=="vboxguest", NAME="%k", GROUP="vbox", MODE="0660" |
33233365 | 335 | EOF |
23d9d34e | 336 | |
0b6de2b7 | 337 | cp -a %{SOURCE1} . |
11848f5b | 338 | sed 's#@LIBDIR@#%{_libdir}#' < %{SOURCE8} > VirtualBox-wrapper.sh |
fa19f650 | 339 | |
83ffcfa8 | 340 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD |
341 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
342 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
f2dd3ab3 | 343 | ../src/VBox/HostDrivers/linux/export_modules modules.tar.gz --without-hardening && \ |
83ffcfa8 | 344 | tar -zxf modules.tar.gz && rm -f modules.tar.gz |
05f1b1f5 | 345 | |
fddcb741 | 346 | %build |
83ffcfa8 | 347 | %if %{with userspace} |
106d8451 | 348 | ./configure \ |
ae1bbc88 | 349 | --with-gcc="%{__cc}" \ |
350 | --with-g++="%{__cxx}" \ | |
5a497466 | 351 | --disable-hardening \ |
655754f2 | 352 | --disable-kmods |
48363591 | 353 | |
0864aefd | 354 | . ./env.sh && \ |
006342ee | 355 | kmk -j1 %{?with_verbose:KBUILD_VERBOSE=3} USER=$(id -un) |
48363591 | 356 | %endif |
74268e47 | 357 | |
358 | %if %{with kernel} | |
83ffcfa8 | 359 | cd PLD-MODULE-BUILD |
dc0a2786 | 360 | %build_kernel_modules -m vboxguest -C vboxguest |
74268e47 | 361 | %build_kernel_modules -m vboxdrv -C vboxdrv |
1dda2f69 | 362 | %build_kernel_modules -m vboxnetflt -C vboxnetflt |
dc0a2786 | 363 | cp -a vboxguest/Module.symvers vboxvfs |
83ffcfa8 | 364 | %build_kernel_modules -m vboxvfs -C vboxvfs -c |
67a4f3c1 | 365 | %build_kernel_modules -m vboxvideo -C vboxvideo_drm |
74268e47 | 366 | cd .. |
50863744 | 367 | %{__cc} %{rpmcflags} %{rpmldflags} -Wall -Werror src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c -o mount.vboxsf |
d1c4ec5b | 368 | %endif |
48363591 | 369 | |
370 | %install | |
371 | rm -rf $RPM_BUILD_ROOT | |
372 | ||
d1c4ec5b | 373 | %if %{with userspace} |
48363591 | 374 | install -d \ |
50863744 | 375 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_pixmapsdir},%{_desktopdir}} \ |
2dda8d86 | 376 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox \ |
a70507fb | 377 | |
50863744 | 378 | install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/mount.vdi |
70ce4861 | 379 | install -p VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
5b399826 | 380 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox}; do |
70ce4861 | 381 | install -p out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 382 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 383 | done |
384 | ||
70ce4861 | 385 | install -p out/linux.%{outdir}/release/bin/VBox{TestOGL,NetAdpCtl,NetDHCP} \ |
5b399826 | 386 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 387 | install -p out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 388 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 389 | install -p out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 390 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 391 | install -p out/linux.%{outdir}/release/bin/VBoxSysInfo.sh \ |
2a9de9cd | 392 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
48363591 | 393 | |
916ab34d | 394 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 395 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 396 | |
70ce4861 | 397 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
398 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
399 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 400 | |
c7f37a9d | 401 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
1365dd46 | 402 | |
6369aec7 | 403 | install -p out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_17.so \ |
09c79ddb | 404 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
6369aec7 | 405 | install -p out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_17.so \ |
09c79ddb | 406 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
407 | ||
70ce4861 | 408 | install -p out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
0b6de2b7 | 409 | cp -a out/linux.%{outdir}/release/bin/virtualbox.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop |
d1c4ec5b | 410 | |
33233365 | 411 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
70ce4861 | 412 | cp -a udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules |
da083e45 | 413 | %endif |
33233365 | 414 | |
da083e45 | 415 | %if %{with kernel} |
50863744 | 416 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,modprobe.d},%{_sbindir}} |
70ce4861 | 417 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
dc0a2786 | 418 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxguest |
70ce4861 ER |
419 | install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt |
420 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxvfs | |
83ffcfa8 | 421 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc |
dc0a2786 | 422 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxguest/vboxguest -d misc |
1dda2f69 | 423 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxnetflt/vboxnetflt -d misc |
83ffcfa8 | 424 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc |
67a4f3c1 | 425 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvideo_drm/vboxvideo -d misc |
fa974331 | 426 | |
50863744 ER |
427 | install -p mount.vboxsf $RPM_BUILD_ROOT%{_sbindir}/mount.vboxsf |
428 | ||
70ce4861 | 429 | cat <<'EOF' > $RPM_BUILD_ROOT/etc/modprobe.d/vboxvfs.conf |
ffb38bb6 | 430 | # Filesystem name has got it's name from Shared Folders, while module is from VFS |
70ce4861 ER |
431 | alias vboxsf vboxvfs |
432 | EOF | |
d1c4ec5b | 433 | %endif |
05f1b1f5 | 434 | |
48363591 | 435 | %clean |
436 | rm -rf $RPM_BUILD_ROOT | |
437 | ||
3b63d3e8 | 438 | %pre |
439 | %groupadd -g 221 -r -f vbox | |
440 | ||
14561782 | 441 | %post |
d8ed80f4 | 442 | cat << 'EOF' |
7841ddfd ER |
443 | You must also install kernel module for this software to work: |
444 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
445 | ||
446 | Additionally you might want to install: | |
05f12a30 ER |
447 | kernel-misc-vboxnetflt-%{version}-%{rel}@%{_kernel_ver_str} |
448 | ||
fa974331 | 449 | On Guest Linux system you might want to install: |
dc0a2786 | 450 | kernel-misc-vboxguest-%{version}-%{rel}@%{_kernel_ver_str} |
7841ddfd | 451 | kernel-misc-vboxvfs-%{version}-%{rel}@%{_kernel_ver_str} |
67a4f3c1 | 452 | kernel-misc-vboxvideo-%{version}-%{rel}@%{_kernel_ver_str} |
7841ddfd ER |
453 | |
454 | NOTE: for different kernel brands append after word kernel the brand, like: | |
455 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
456 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
457 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
458 | ...etc. | |
d8ed80f4 | 459 | |
7d4acef5 | 460 | Depending on which kernel brand You use. |
d8ed80f4 | 461 | |
462 | EOF | |
463 | ||
3b63d3e8 | 464 | %postun |
465 | if [ "$1" = "0" ]; then | |
466 | %groupremove vbox | |
467 | fi | |
468 | ||
dc0a2786 | 469 | %post -n kernel%{_alt_kernel}-misc-vboxguest |
74268e47 | 470 | %depmod %{_kernel_ver} |
dc0a2786 AG |
471 | /sbin/chkconfig --add vboxguest |
472 | %service vboxguest restart "VirtualBox OSE Guest additions driver" | |
74268e47 | 473 | |
dc0a2786 | 474 | %postun -n kernel%{_alt_kernel}-misc-vboxguest |
74268e47 | 475 | %depmod %{_kernel_ver} |
476 | ||
dc0a2786 | 477 | %preun -n kernel%{_alt_kernel}-misc-vboxguest |
270f67bc | 478 | if [ "$1" = "0" ]; then |
dc0a2786 AG |
479 | %service vboxguest stop |
480 | /sbin/chkconfig --del vboxguest | |
270f67bc | 481 | fi |
482 | ||
48363591 | 483 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
484 | %depmod %{_kernel_ver} | |
270f67bc | 485 | /sbin/chkconfig --add vboxdrv |
ffb38bb6 | 486 | %service vboxdrv restart "VirtualBox OSE Support Driver" |
48363591 | 487 | |
488 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
489 | %depmod %{_kernel_ver} | |
490 | ||
270f67bc | 491 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
492 | if [ "$1" = "0" ]; then | |
493 | %service vboxdrv stop | |
494 | /sbin/chkconfig --del vboxdrv | |
495 | fi | |
496 | ||
1dda2f69 | 497 | %post -n kernel%{_alt_kernel}-misc-vboxnetflt |
498 | %depmod %{_kernel_ver} | |
11848f5b | 499 | /sbin/chkconfig --add vboxnetflt |
fd488e66 | 500 | %service vboxnetflt restart "VirtualBox OSE Network Filter driver" |
1dda2f69 | 501 | |
502 | %postun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
503 | %depmod %{_kernel_ver} | |
504 | ||
11848f5b | 505 | %preun -n kernel%{_alt_kernel}-misc-vboxnetflt |
506 | if [ "$1" = "0" ]; then | |
507 | %service vboxnetflt stop | |
508 | /sbin/chkconfig --del vboxnetflt | |
509 | fi | |
510 | ||
74268e47 | 511 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
512 | %depmod %{_kernel_ver} | |
ca8701ad | 513 | /sbin/chkconfig --add vboxvfs |
fa974331 | 514 | %service vboxvfs restart "VirtualBox OSE Host file system access VFS" |
74268e47 | 515 | |
516 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
517 | %depmod %{_kernel_ver} | |
518 | ||
ca8701ad | 519 | %preun -n kernel%{_alt_kernel}-misc-vboxvfs |
520 | if [ "$1" = "0" ]; then | |
521 | %service vboxvfs stop | |
522 | /sbin/chkconfig --del vboxvfs | |
523 | fi | |
524 | ||
67a4f3c1 | 525 | %post -n kernel%{_alt_kernel}-misc-vboxvideo |
526 | %depmod %{_kernel_ver} | |
527 | ||
528 | %postun -n kernel%{_alt_kernel}-misc-vboxvideo | |
529 | %depmod %{_kernel_ver} | |
530 | ||
d1c4ec5b | 531 | %if %{with userspace} |
48363591 | 532 | %files |
533 | %defattr(644,root,root,755) | |
7d1c0a63 | 534 | %doc UserManual.pdf |
8833bce1 | 535 | %dir %{_libdir}/VirtualBox |
916ab34d | 536 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 537 | %dir %{_libdir}/VirtualBox/components |
538 | %dir %{_libdir}/VirtualBox/nls | |
85b005e2 | 539 | %attr(755,root,root) %{_bindir}/VBoxBFE |
540 | %attr(755,root,root) %{_bindir}/VBoxHeadless | |
541 | %attr(755,root,root) %{_bindir}/VBoxManage | |
542 | %attr(755,root,root) %{_bindir}/VBoxSDL | |
543 | %attr(755,root,root) %{_bindir}/VBoxSVC | |
544 | %attr(755,root,root) %{_bindir}/VBoxTunctl | |
545 | %attr(755,root,root) %{_bindir}/VBoxXPCOMIPCD | |
48363591 | 546 | %attr(755,root,root) %{_bindir}/VirtualBox |
4f09a416 | 547 | %attr(755,root,root) /sbin/mount.vdi |
05f1b1f5 | 548 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
549 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 550 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 551 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
552 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
5b399826 | 553 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTestOGL |
8bb99fd5 | 554 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 555 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
85b005e2 | 556 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD.so |
557 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD2.so | |
558 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDDU.so | |
559 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxGuestPropSvc.so | |
560 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxKeyboard.so | |
5b399826 MM |
561 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetAdpCtl |
562 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetDHCP | |
85b005e2 | 563 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhostcrutil.so |
564 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhosterrorspu.so | |
565 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLrenderspu.so | |
566 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython.so | |
567 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython2_6.so | |
568 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM.so | |
f701b529 | 569 | %ifarch %{ix86} |
5b399826 MM |
570 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM32.so |
571 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM64.so | |
f701b529 | 572 | %endif |
85b005e2 | 573 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxRT.so |
85b005e2 | 574 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedClipboard.so |
575 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedCrOpenGL.so | |
576 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedFolders.so | |
577 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxVMM.so | |
578 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOM.so | |
579 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMC.so | |
fdd1c725 | 580 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
581 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
2a9de9cd | 582 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSysInfo.sh |
85b005e2 | 583 | %{_libdir}/VirtualBox/VBoxDD2GC.gc |
584 | %{_libdir}/VirtualBox/VBoxDDGC.gc | |
585 | %{_libdir}/VirtualBox/VMMGC.gc | |
586 | %{_libdir}/VirtualBox/VBoxDD2R0.r0 | |
587 | %{_libdir}/VirtualBox/VBoxDDR0.r0 | |
588 | %{_libdir}/VirtualBox/VMMR0.r0 | |
85b005e2 | 589 | %{_libdir}/VirtualBox/components/VBoxC.so |
590 | %{_libdir}/VirtualBox/components/VBoxSVCM.so | |
591 | %{_libdir}/VirtualBox/components/VBoxXPCOMBase.xpt | |
592 | %{_libdir}/VirtualBox/components/VBoxXPCOMIPCC.so | |
593 | %{_libdir}/VirtualBox/components/VirtualBox_XPCOM.xpt | |
89ce7412 | 594 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
c5e10a4d | 595 | %lang(bg) %{_libdir}/VirtualBox/nls/*_bg.qm |
72d5ea57 | 596 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 597 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
dc0a2786 | 598 | %lang(da) %{_libdir}/VirtualBox/nls/*_da.qm |
89ce7412 | 599 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm |
11de52da | 600 | %lang(el) %{_libdir}/VirtualBox/nls/*_el.qm |
89ce7412 | 601 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm |
602 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
603 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
604 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
605 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 606 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 607 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
608 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
c5e10a4d | 609 | %lang(km_KH) %{_libdir}/VirtualBox/nls/*_km_KH.qm |
89ce7412 | 610 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm |
72d5ea57 | 611 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 612 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 613 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 614 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 615 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
616 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
617 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 618 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 619 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 620 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
85b005e2 | 621 | %lang(uk) %{_libdir}/VirtualBox/nls/*_uk.qm |
89ce7412 | 622 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
623 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 624 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 625 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 626 | |
ffb38bb6 ER |
627 | %files additions |
628 | %{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso | |
629 | ||
abb636b9 | 630 | %files udev |
631 | %defattr(644,root,root,755) | |
632 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
633 | ||
09c79ddb | 634 | %files -n xorg-driver-input-vboxmouse |
635 | %defattr(644,root,root,755) | |
636 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
637 | ||
638 | %files -n xorg-driver-video-vboxvideo | |
639 | %defattr(644,root,root,755) | |
640 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 641 | %endif |
48363591 | 642 | |
d1c4ec5b | 643 | %if %{with kernel} |
dc0a2786 | 644 | %files -n kernel%{_alt_kernel}-misc-vboxguest |
74268e47 | 645 | %defattr(644,root,root,755) |
dc0a2786 AG |
646 | %attr(754,root,root) /etc/rc.d/init.d/vboxguest |
647 | /lib/modules/%{_kernel_ver}/misc/vboxguest.ko* | |
74268e47 | 648 | |
d1c4ec5b | 649 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 650 | %defattr(644,root,root,755) |
67ad4c40 | 651 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 652 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 653 | |
1dda2f69 | 654 | %files -n kernel%{_alt_kernel}-misc-vboxnetflt |
655 | %defattr(644,root,root,755) | |
11848f5b | 656 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetflt |
1dda2f69 | 657 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko* |
658 | ||
74268e47 | 659 | %files -n kernel%{_alt_kernel}-misc-vboxvfs |
660 | %defattr(644,root,root,755) | |
11848f5b | 661 | %attr(754,root,root) /etc/rc.d/init.d/vboxvfs |
50863744 | 662 | %attr(755,root,root) %{_sbindir}/mount.vboxsf |
70ce4861 | 663 | /etc/modprobe.d/vboxvfs.conf |
74268e47 | 664 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* |
67a4f3c1 | 665 | |
666 | %files -n kernel%{_alt_kernel}-misc-vboxvideo | |
667 | %defattr(644,root,root,755) | |
668 | /lib/modules/%{_kernel_ver}/misc/vboxvideo.ko* | |
669 | %endif |