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