]>
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 | |
cbf22c1f | 15 | %define rel 1 |
05f1b1f5 | 16 | |
8833bce1 | 17 | %if %{without kernel} |
18 | %undefine with_dist_kernel | |
19 | %endif | |
20 | ||
bd3faca3 | 21 | %if "%{_alt_kernel}" != "%{nil}" |
22 | %undefine with_userspace | |
23 | %endif | |
24 | ||
25 | %define pname VirtualBox | |
26 | ||
93ccc0e8 ER |
27 | Summary: VirtualBox OSE - x86 hardware virtualizer |
28 | Summary(pl.UTF-8): VirtualBox OSE - wirtualizator sprzętu x86 | |
bd3faca3 | 29 | Name: %{pname}%{_alt_kernel} |
cbf22c1f | 30 | Version: 2.0.2 |
fe3d1798 | 31 | Release: %{rel} |
48363591 | 32 | License: GPL v2 |
33 | Group: Applications/Emulators | |
cbf22c1f | 34 | #Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}-OSE.tar.bz2 |
35 | Source0: %{pname}-%{version}-OSE.tar.bz2 | |
36 | # Source0-md5: f7b48ec55ac1ca17c575bf9dda80c301 | |
37 | #Source1: http://download.virtualbox.org/virtualbox/%{version}/UserManual.pdf | |
38 | Source1: UserManual.pdf | |
39 | # Source1-md5: 3f1227312e8396819971731f2d184127 | |
40 | #Source2: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso | |
41 | Source2: VBoxGuestAdditions_%{version}.iso | |
42 | # Source2-md5: ee915cc99713f448ca362fa81af82b47 | |
67ad4c40 | 43 | Source3: %{pname}-vboxdrv.init |
44 | Source4: %{pname}-vboxadd.init | |
45 | Source5: %{pname}.desktop | |
46 | Source6: %{pname}.sh | |
bd3faca3 | 47 | Patch0: %{pname}-configure.patch |
48 | Patch1: %{pname}-qt-paths.patch | |
49 | Patch2: %{pname}-shared-libstdc++.patch | |
50 | Patch3: %{pname}-disable-xclient-build.patch | |
fddcb741 | 51 | Patch4: %{pname}-configure-spaces.patch |
48363591 | 52 | URL: http://www.virtualbox.org/ |
83ffcfa8 | 53 | %if %{with userspace} |
523e7409 | 54 | BuildRequires: OpenGL-devel |
cef75615 | 55 | BuildRequires: QtGui-devel |
c574efad | 56 | BuildRequires: SDL-devel >= 1.2.7 |
ba702945 | 57 | BuildRequires: alsa-lib-devel >= 1.0.6 |
e5aaadde | 58 | BuildRequires: bash |
48363591 | 59 | BuildRequires: bcc |
60 | BuildRequires: bin86 | |
eba4b2aa | 61 | BuildRequires: gcc >= 5:3.2.3 |
ae1bbc88 | 62 | %if "%{pld_release}" != "ti" |
b29bcb41 | 63 | BuildRequires: compat-gcc-34 |
ae1bbc88 | 64 | %endif |
48363591 | 65 | BuildRequires: iasl |
83ffcfa8 | 66 | %endif |
0d1f6cd5 AM |
67 | %if %{with dist_kernel} |
68 | BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20 | |
0d1f6cd5 | 69 | %endif |
83ffcfa8 | 70 | %if %{with userspace} |
48363591 | 71 | BuildRequires: libIDL-devel |
ba702945 | 72 | BuildRequires: libpng >= 1.2.5 |
d22f0a53 | 73 | BuildRequires: libstdc++-devel >= 5:3.2.3 |
48363591 | 74 | BuildRequires: libuuid-devel |
ba702945 | 75 | BuildRequires: libxml2-devel >= 2.6.26 |
76ea5ecb | 76 | BuildRequires: libxslt-devel >= 1.1.17 |
ba702945 | 77 | BuildRequires: libxslt-progs >= 1.1.17 |
0bf43862 | 78 | BuildRequires: pkgconfig |
ba702945 | 79 | BuildRequires: pulseaudio-devel >= 0.9.0 |
523e7409 | 80 | BuildRequires: python-devel |
250583d4 | 81 | BuildRequires: qt4-build >= 4.2.0 |
2700662b | 82 | BuildRequires: qt4-linguist |
83ffcfa8 | 83 | %endif |
84 | BuildRequires: rpmbuild(macros) >= 1.379 | |
85 | %if %{with userspace} | |
0bf43862 | 86 | BuildRequires: which |
e5aaadde | 87 | BuildRequires: xalan-c-devel >= 1.10.0 |
e5aaadde | 88 | BuildRequires: xerces-c-devel >= 2.6.0 |
eba4b2aa | 89 | BuildRequires: xorg-lib-libXcursor-devel |
523e7409 | 90 | BuildRequires: xorg-lib-libXmu-devel |
e5aaadde | 91 | BuildRequires: zlib-devel >= 1.2.1 |
23d9d34e | 92 | %ifarch %{x8664} |
93 | BuildRequires: gcc-multilib | |
51d2ebb8 | 94 | BuildRequires: glibc-devel(i686) |
23d9d34e | 95 | BuildRequires: libstdc++-multilib-devel |
23d9d34e | 96 | %endif |
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 |
93ccc0e8 | 171 | Summary: Linux kernel module for VirtualBox OSE |
74268e47 | 172 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa |
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 | |
abb636b9 | 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 | |
93ccc0e8 | 184 | Linux kernel module vboxadd for VirtualBox OSE. |
74268e47 | 185 | |
186 | %description -n kernel%{_alt_kernel}-misc-vboxadd -l pl.UTF-8 | |
187 | Moduł jądra Linuksa vboxadd dla VirtualBoksa. | |
188 | ||
48363591 | 189 | %package -n kernel%{_alt_kernel}-misc-vboxdrv |
93ccc0e8 | 190 | Summary: Linux kernel module for VirtualBox OSE |
4dab3322 | 191 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa |
fe3d1798 | 192 | Release: %{rel}@%{_kernel_ver_str} |
48363591 | 193 | Group: Base/Kernel |
194 | Requires(post,postun): /sbin/depmod | |
195 | Requires: dev >= 2.9.0-7 | |
196 | %if %{with dist_kernel} | |
d6f0c54e | 197 | %requires_releq_kernel |
198 | Requires(postun): %releq_kernel | |
48363591 | 199 | %endif |
fe3d1798 | 200 | Provides: kernel(vboxdrv) = %{version}-%{rel} |
48363591 | 201 | |
202 | %description -n kernel%{_alt_kernel}-misc-vboxdrv | |
93ccc0e8 | 203 | Linux kernel module vboxdrv for VirtualBox OSE. |
48363591 | 204 | |
fd8fc899 JR |
205 | %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8 |
206 | Moduł jądra Linuksa vboxdrv dla VirtualBoksa. | |
48363591 | 207 | |
74268e47 | 208 | %package -n kernel%{_alt_kernel}-misc-vboxvfs |
93ccc0e8 | 209 | Summary: Linux kernel module for VirtualBox OSE |
74268e47 | 210 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa |
fe3d1798 | 211 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 212 | Group: Base/Kernel |
213 | Requires(post,postun): /sbin/depmod | |
214 | Requires: dev >= 2.9.0-7 | |
215 | %if %{with dist_kernel} | |
216 | %requires_releq_kernel | |
217 | Requires(postun): %releq_kernel | |
218 | %endif | |
fe3d1798 | 219 | Provides: kernel(vboxvfs) = %{version}-%{rel} |
74268e47 | 220 | |
221 | %description -n kernel%{_alt_kernel}-misc-vboxvfs | |
93ccc0e8 | 222 | Linux kernel module vboxvfs for VirtualBox OSE. |
74268e47 | 223 | |
224 | %description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8 | |
225 | Moduł jądra Linuksa vboxvfs dla VirtualBoksa. | |
226 | ||
09c79ddb | 227 | %package -n xorg-driver-input-vboxmouse |
93ccc0e8 | 228 | Summary: X.org mouse driver for VirtualBox OSE guest OS |
fe3d1798 JB |
229 | Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBoksie |
230 | Release: %{rel} | |
09c79ddb | 231 | Group: X11/Applications |
232 | Requires: xorg-xserver-server >= 1.0.99.901 | |
233 | ||
234 | %description -n xorg-driver-input-vboxmouse | |
93ccc0e8 | 235 | X.org mouse driver for VirtualBox OSE guest OS. |
09c79ddb | 236 | |
237 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
fe3d1798 | 238 | Sterownik myszy dla systemu gościa w VirtualBoksie. |
09c79ddb | 239 | |
240 | %package -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 241 | Summary: X.org video driver for VirtualBox OSE guest OS |
fe3d1798 JB |
242 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie |
243 | Release: %{rel} | |
09c79ddb | 244 | Group: X11/Applications |
245 | Requires: xorg-xserver-server >= 1.0.99.901 | |
246 | ||
247 | %description -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 248 | X.org video driver for VirtualBox OSE guest OS. |
09c79ddb | 249 | |
250 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
fe3d1798 | 251 | Sterownik grafiki dla systemu gościa w VirtualBoksie. |
09c79ddb | 252 | |
48363591 | 253 | %prep |
deb50564 | 254 | %setup -q -n %{pname}-%{version} |
e709ce6b | 255 | %patch0 -p1 |
256 | %patch1 -p1 | |
74268e47 | 257 | %patch2 -p1 |
23d9d34e | 258 | |
33233365 | 259 | %ifarch %{x8664} |
260 | %patch3 -p1 | |
261 | %endif | |
262 | ||
fddcb741 ER |
263 | %patch4 -p1 |
264 | ||
33233365 | 265 | cat <<'EOF' > udev.conf |
266 | KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660" | |
67ad4c40 | 267 | KERNEL=="vboxadd", NAME="%k", GROUP="vbox", MODE="0660" |
33233365 | 268 | EOF |
23d9d34e | 269 | |
fdd1c725 | 270 | install %{SOURCE1} . |
fa19f650 | 271 | |
83ffcfa8 | 272 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD |
273 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
274 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
275 | ../src/VBox/HostDrivers/Support/linux/export_modules modules.tar.gz && \ | |
276 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
05f1b1f5 | 277 | |
fddcb741 | 278 | %build |
83ffcfa8 | 279 | %if %{with userspace} |
106d8451 | 280 | ./configure \ |
ae1bbc88 | 281 | --with-gcc="%{__cc}" \ |
2700662b | 282 | %if "%{pld_release}" != "ti" |
283 | --with-gcc-compat="gcc-3.4" \ | |
284 | %endif | |
ae1bbc88 | 285 | --with-g++="%{__cxx}" \ |
5a497466 | 286 | --disable-hardening \ |
287 | --disable-kmods \ | |
288 | --disable-qt3 | |
48363591 | 289 | |
0864aefd | 290 | . ./env.sh && \ |
c6fdbed7 | 291 | kmk -j1 %{?with_verbose:KBUILD_VERBOSE=3} |
48363591 | 292 | %endif |
74268e47 | 293 | |
294 | %if %{with kernel} | |
83ffcfa8 | 295 | cd PLD-MODULE-BUILD |
74268e47 | 296 | %build_kernel_modules -m vboxadd -C vboxadd |
297 | %build_kernel_modules -m vboxdrv -C vboxdrv | |
0da669b5 | 298 | cp -a vboxadd/Module.symvers vboxvfs |
83ffcfa8 | 299 | %build_kernel_modules -m vboxvfs -C vboxvfs -c |
74268e47 | 300 | cd .. |
d1c4ec5b | 301 | %endif |
48363591 | 302 | |
303 | %install | |
304 | rm -rf $RPM_BUILD_ROOT | |
305 | ||
d1c4ec5b | 306 | %if %{with userspace} |
48363591 | 307 | install -d \ |
d89980c7 | 308 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ |
67ad4c40 | 309 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
a70507fb | 310 | |
67ad4c40 | 311 | install %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/VirtualBox-wrapper.sh |
d9390c3b | 312 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox,vditool}; do |
fe3d1798 | 313 | install out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 314 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 315 | done |
316 | ||
9a6c7384 AM |
317 | %ifarch %{x8664} |
318 | install out/linux.%{outdir}/release/bin/VBox*.rel \ | |
319 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox | |
320 | %endif | |
321 | ||
5a497466 | 322 | install out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 323 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
d9390c3b | 324 | install out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 325 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
326 | ||
916ab34d | 327 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 328 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 329 | |
5877f605 | 330 | install %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
331 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
332 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 333 | |
fe3d1798 | 334 | install out/linux.%{outdir}/release/bin/additions/mountvboxsf \ |
09c79ddb | 335 | $RPM_BUILD_ROOT%{_bindir} |
336 | ||
c7f37a9d ER |
337 | %ifnarch %{x8664} |
338 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} | |
53741724 | 339 | install out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_14.so \ |
09c79ddb | 340 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
53741724 | 341 | install out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_14.so \ |
09c79ddb | 342 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
c7f37a9d | 343 | %endif |
09c79ddb | 344 | |
fe3d1798 | 345 | install out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
67ad4c40 | 346 | install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop |
d1c4ec5b | 347 | |
33233365 | 348 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
349 | install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules | |
da083e45 | 350 | %endif |
33233365 | 351 | |
da083e45 | 352 | %if %{with kernel} |
70fe9387 | 353 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
67ad4c40 | 354 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
355 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd | |
83ffcfa8 | 356 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc |
357 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc | |
358 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc | |
d1c4ec5b | 359 | %endif |
05f1b1f5 | 360 | |
48363591 | 361 | %clean |
362 | rm -rf $RPM_BUILD_ROOT | |
363 | ||
3b63d3e8 | 364 | %pre |
365 | %groupadd -g 221 -r -f vbox | |
366 | ||
14561782 | 367 | %post |
d8ed80f4 | 368 | cat << 'EOF' |
369 | NOTE: You must also install kernel module for this software to work | |
7d4acef5 ER |
370 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} |
371 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
372 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
373 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
d8ed80f4 | 374 | etc. |
375 | ||
7d4acef5 | 376 | Depending on which kernel brand You use. |
d8ed80f4 | 377 | |
378 | EOF | |
379 | ||
3b63d3e8 | 380 | %postun |
381 | if [ "$1" = "0" ]; then | |
382 | %groupremove vbox | |
383 | fi | |
384 | ||
74268e47 | 385 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
386 | %depmod %{_kernel_ver} | |
270f67bc | 387 | /sbin/chkconfig --add vboxadd |
388 | %service vboxadd restart "VirtualBox OSE guest additions driver" | |
74268e47 | 389 | |
390 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
391 | %depmod %{_kernel_ver} | |
392 | ||
270f67bc | 393 | %preun -n kernel%{_alt_kernel}-misc-vboxadd |
394 | if [ "$1" = "0" ]; then | |
395 | %service vboxadd stop | |
396 | /sbin/chkconfig --del vboxadd | |
397 | fi | |
398 | ||
48363591 | 399 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
400 | %depmod %{_kernel_ver} | |
270f67bc | 401 | /sbin/chkconfig --add vboxdrv |
402 | %service vboxdrv restart "VirtualBox OSE driver" | |
48363591 | 403 | |
404 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
405 | %depmod %{_kernel_ver} | |
406 | ||
270f67bc | 407 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
408 | if [ "$1" = "0" ]; then | |
409 | %service vboxdrv stop | |
410 | /sbin/chkconfig --del vboxdrv | |
411 | fi | |
412 | ||
74268e47 | 413 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
414 | %depmod %{_kernel_ver} | |
415 | ||
416 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
417 | %depmod %{_kernel_ver} | |
418 | ||
d1c4ec5b | 419 | %if %{with userspace} |
48363591 | 420 | %files |
421 | %defattr(644,root,root,755) | |
7d1c0a63 | 422 | %doc UserManual.pdf |
8833bce1 | 423 | %dir %{_libdir}/VirtualBox |
916ab34d | 424 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 425 | %dir %{_libdir}/VirtualBox/components |
426 | %dir %{_libdir}/VirtualBox/nls | |
4c18fded | 427 | %attr(755,root,root) %{_bindir}/mountvboxsf |
428 | %attr(755,root,root) %{_bindir}/vditool | |
48363591 | 429 | %attr(755,root,root) %{_bindir}/VBox* |
430 | %attr(755,root,root) %{_bindir}/VirtualBox | |
fdd1c725 | 431 | %attr(755,root,root) %{_libdir}/VirtualBox/vditool |
05f1b1f5 | 432 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
433 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 434 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 435 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
436 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
8bb99fd5 | 437 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 438 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
8833bce1 | 439 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so |
9a6c7384 AM |
440 | %ifarch %{x8664} |
441 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.rel | |
442 | %endif | |
fdd1c725 | 443 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
444 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
05f1b1f5 | 445 | %{_libdir}/VirtualBox/*.gc |
446 | %{_libdir}/VirtualBox/*.r0 | |
916ab34d | 447 | %{_libdir}/VirtualBox/additions/* |
05f1b1f5 | 448 | %{_libdir}/VirtualBox/components/* |
89ce7412 | 449 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
72d5ea57 | 450 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 451 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
452 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm | |
453 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm | |
454 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
455 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
456 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
457 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 458 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 459 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
460 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
461 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm | |
72d5ea57 | 462 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 463 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 464 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 465 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 466 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
467 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
468 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 469 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 470 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 471 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
89ce7412 | 472 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
473 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 474 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 475 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 476 | |
abb636b9 | 477 | %files udev |
478 | %defattr(644,root,root,755) | |
479 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
480 | ||
23d9d34e | 481 | # Drivers are for Guest OS, which is 32-bit. |
482 | %ifnarch %{x8664} | |
09c79ddb | 483 | %files -n xorg-driver-input-vboxmouse |
484 | %defattr(644,root,root,755) | |
485 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
486 | ||
487 | %files -n xorg-driver-video-vboxvideo | |
488 | %defattr(644,root,root,755) | |
489 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 490 | %endif |
23d9d34e | 491 | %endif |
48363591 | 492 | |
d1c4ec5b | 493 | %if %{with kernel} |
74268e47 | 494 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
495 | %defattr(644,root,root,755) | |
67ad4c40 | 496 | %attr(754,root,root) /etc/rc.d/init.d/vboxadd |
74268e47 | 497 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* |
498 | ||
d1c4ec5b | 499 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 500 | %defattr(644,root,root,755) |
67ad4c40 | 501 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 502 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 503 | |
504 | %files -n kernel%{_alt_kernel}-misc-vboxvfs | |
505 | %defattr(644,root,root,755) | |
506 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* | |
05f1b1f5 | 507 | %endif |