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