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