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