]>
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} | |
1e840a77 | 86 | BuildRequires: sed >= 4.0 |
0bf43862 | 87 | BuildRequires: which |
e5aaadde | 88 | BuildRequires: xalan-c-devel >= 1.10.0 |
e5aaadde | 89 | BuildRequires: xerces-c-devel >= 2.6.0 |
eba4b2aa | 90 | BuildRequires: xorg-lib-libXcursor-devel |
523e7409 | 91 | BuildRequires: xorg-lib-libXmu-devel |
e5aaadde | 92 | BuildRequires: zlib-devel >= 1.2.1 |
23d9d34e | 93 | %ifarch %{x8664} |
94 | BuildRequires: gcc-multilib | |
51d2ebb8 | 95 | BuildRequires: glibc-devel(i686) |
23d9d34e | 96 | BuildRequires: libstdc++-multilib-devel |
23d9d34e | 97 | %endif |
83ffcfa8 | 98 | %endif |
0afa64ad | 99 | Requires(post,preun): /sbin/chkconfig |
5f1cec1f ER |
100 | Requires(postun): /usr/sbin/groupdel |
101 | Requires(pre): /usr/bin/getgid | |
102 | Requires(pre): /usr/sbin/groupadd | |
fb661e50 | 103 | Suggests: gxmessage |
5f1cec1f | 104 | Provides: group(vbox) |
eba4b2aa | 105 | ExclusiveArch: %{ix86} %{x8664} |
48363591 | 106 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
107 | ||
eba4b2aa | 108 | %ifarch %{x8664} |
fe3d1798 | 109 | %define outdir amd64 |
5088674d | 110 | %else |
fe3d1798 | 111 | %define outdir x86 |
5088674d | 112 | %endif |
113 | ||
48363591 | 114 | %description |
93ccc0e8 | 115 | InnoTek VirtualBox OSE is a general-purpose full virtualizer for x86 |
48363591 | 116 | hardware. Targeted at server, desktop and embedded use, it is now the |
117 | only professional-quality virtualization solution that is also Open | |
118 | Source Software. | |
119 | ||
93ccc0e8 | 120 | Some of the features of VirtualBox OSE are: |
48363591 | 121 | |
93ccc0e8 | 122 | Modularity: VirtualBox OSE has an extremely modular design with |
48363591 | 123 | well-defined internal programming interfaces and a client/server |
124 | design. This makes it easy to control it from several interfaces at | |
125 | once: for example, you can start a virtual machine in a typical | |
126 | virtual machine GUI and then control that machine from the command | |
2df47f85 | 127 | line. VirtualBox OSE also comes with a full Software Development Kit: |
128 | even though it is Open Source Software, you don't have to hack the | |
129 | source to write a new interface for VirtualBox OSE. | |
48363591 | 130 | |
131 | Virtual machine descriptions in XML: the configuration settings of | |
132 | virtual machines are stored entirely in XML and are independent of the | |
133 | local machines. Virtual machine definitions can therefore easily be | |
134 | ported to other computers. | |
135 | ||
fd8fc899 | 136 | %description -l pl.UTF-8 |
93ccc0e8 | 137 | InnoTek VirtualBox OSE jest emulatorem sprzętu x86. Kierowany do |
fd8fc899 JR |
138 | zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie |
139 | jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym | |
140 | również jako Otwarte Oprogramowanie. | |
48363591 | 141 | |
fd8fc899 | 142 | Przykładowe cechy VirtualBoksa: |
48363591 | 143 | |
93ccc0e8 | 144 | Modularność: VirtualBox OSE jest wysoce zmodularyzowanym produktem z |
fd8fc899 JR |
145 | dobrze zaprojektowanym wewnętrznym interfejsem programowym typu |
146 | klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą | |
147 | różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z | |
148 | poziomu interfejsu graficznego, a później kontrolować ją z linii | |
2df47f85 | 149 | poleceń. VirtualBox OSE dostarcza również pełny pakiet deweloperski, |
150 | co pozwala stworzyć dowolny inny interfejs zarządzania maszyną | |
151 | wirtualną. | |
48363591 | 152 | |
fd8fc899 JR |
153 | Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn |
154 | wirtualnych są w całości przechowywane w XML-u i są niezależne od | |
155 | lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść | |
156 | konfigurację maszyny wirtualnej na inny komputer. | |
48363591 | 157 | |
abb636b9 | 158 | %package udev |
93ccc0e8 | 159 | Summary: udev rules for VirtualBox OSE kernel modules |
da083e45 | 160 | Summary(pl.UTF-8): Reguły udev dla modułów jądra Linuksa dla VirtualBoksa |
8512deca | 161 | Release: %{rel} |
abb636b9 | 162 | Group: Base/Kernel |
93bf3da1 | 163 | Requires: udev-core |
abb636b9 | 164 | |
165 | %description udev | |
2df47f85 | 166 | udev rules for VirtualBox OSE kernel modules. |
abb636b9 | 167 | |
168 | %description udev -l pl.UTF-8 | |
2df47f85 | 169 | Reguły udev dla modułów jądra Linuksa dla VirtualBoksa. |
abb636b9 | 170 | |
74268e47 | 171 | %package -n kernel%{_alt_kernel}-misc-vboxadd |
93ccc0e8 | 172 | Summary: Linux kernel module for VirtualBox OSE |
74268e47 | 173 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa |
fe3d1798 | 174 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 175 | Group: Base/Kernel |
176 | Requires(post,postun): /sbin/depmod | |
177 | Requires: dev >= 2.9.0-7 | |
178 | %if %{with dist_kernel} | |
179 | %requires_releq_kernel | |
abb636b9 | 180 | #Requires(postun): %%releq_kernel |
74268e47 | 181 | %endif |
fe3d1798 | 182 | Provides: kernel(vboxadd) = %{version}-%{rel} |
74268e47 | 183 | |
184 | %description -n kernel%{_alt_kernel}-misc-vboxadd | |
93ccc0e8 | 185 | Linux kernel module vboxadd for VirtualBox OSE. |
74268e47 | 186 | |
187 | %description -n kernel%{_alt_kernel}-misc-vboxadd -l pl.UTF-8 | |
188 | Moduł jądra Linuksa vboxadd dla VirtualBoksa. | |
189 | ||
48363591 | 190 | %package -n kernel%{_alt_kernel}-misc-vboxdrv |
93ccc0e8 | 191 | Summary: Linux kernel module for VirtualBox OSE |
4dab3322 | 192 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa |
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 | |
93ccc0e8 | 204 | Linux kernel module vboxdrv for VirtualBox OSE. |
48363591 | 205 | |
fd8fc899 JR |
206 | %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8 |
207 | Moduł jądra Linuksa vboxdrv dla VirtualBoksa. | |
48363591 | 208 | |
74268e47 | 209 | %package -n kernel%{_alt_kernel}-misc-vboxvfs |
93ccc0e8 | 210 | Summary: Linux kernel module for VirtualBox OSE |
74268e47 | 211 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa |
fe3d1798 | 212 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 213 | Group: Base/Kernel |
214 | Requires(post,postun): /sbin/depmod | |
215 | Requires: dev >= 2.9.0-7 | |
216 | %if %{with dist_kernel} | |
217 | %requires_releq_kernel | |
218 | Requires(postun): %releq_kernel | |
219 | %endif | |
fe3d1798 | 220 | Provides: kernel(vboxvfs) = %{version}-%{rel} |
74268e47 | 221 | |
222 | %description -n kernel%{_alt_kernel}-misc-vboxvfs | |
93ccc0e8 | 223 | Linux kernel module vboxvfs for VirtualBox OSE. |
74268e47 | 224 | |
225 | %description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8 | |
226 | Moduł jądra Linuksa vboxvfs dla VirtualBoksa. | |
227 | ||
09c79ddb | 228 | %package -n xorg-driver-input-vboxmouse |
93ccc0e8 | 229 | Summary: X.org mouse driver for VirtualBox OSE guest OS |
fe3d1798 JB |
230 | Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBoksie |
231 | Release: %{rel} | |
09c79ddb | 232 | Group: X11/Applications |
233 | Requires: xorg-xserver-server >= 1.0.99.901 | |
234 | ||
235 | %description -n xorg-driver-input-vboxmouse | |
93ccc0e8 | 236 | X.org mouse driver for VirtualBox OSE guest OS. |
09c79ddb | 237 | |
238 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
fe3d1798 | 239 | Sterownik myszy dla systemu gościa w VirtualBoksie. |
09c79ddb | 240 | |
241 | %package -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 242 | Summary: X.org video driver for VirtualBox OSE guest OS |
fe3d1798 JB |
243 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie |
244 | Release: %{rel} | |
09c79ddb | 245 | Group: X11/Applications |
246 | Requires: xorg-xserver-server >= 1.0.99.901 | |
247 | ||
248 | %description -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 249 | X.org video driver for VirtualBox OSE guest OS. |
09c79ddb | 250 | |
251 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
fe3d1798 | 252 | Sterownik grafiki dla systemu gościa w VirtualBoksie. |
09c79ddb | 253 | |
48363591 | 254 | %prep |
deb50564 | 255 | %setup -q -n %{pname}-%{version} |
e709ce6b | 256 | %patch0 -p1 |
257 | %patch1 -p1 | |
74268e47 | 258 | %patch2 -p1 |
23d9d34e | 259 | |
33233365 | 260 | %ifarch %{x8664} |
261 | %patch3 -p1 | |
262 | %endif | |
263 | ||
fddcb741 ER |
264 | %patch4 -p1 |
265 | ||
33233365 | 266 | cat <<'EOF' > udev.conf |
267 | KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660" | |
67ad4c40 | 268 | KERNEL=="vboxadd", NAME="%k", GROUP="vbox", MODE="0660" |
33233365 | 269 | EOF |
23d9d34e | 270 | |
fdd1c725 | 271 | install %{SOURCE1} . |
fa19f650 | 272 | |
83ffcfa8 | 273 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD |
274 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
275 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
276 | ../src/VBox/HostDrivers/Support/linux/export_modules modules.tar.gz && \ | |
277 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
05f1b1f5 | 278 | |
fddcb741 | 279 | %build |
83ffcfa8 | 280 | %if %{with userspace} |
106d8451 | 281 | ./configure \ |
ae1bbc88 | 282 | --with-gcc="%{__cc}" \ |
2700662b | 283 | %if "%{pld_release}" != "ti" |
284 | --with-gcc-compat="gcc-3.4" \ | |
285 | %endif | |
ae1bbc88 | 286 | --with-g++="%{__cxx}" \ |
5a497466 | 287 | --disable-hardening \ |
288 | --disable-kmods \ | |
289 | --disable-qt3 | |
48363591 | 290 | |
0864aefd | 291 | . ./env.sh && \ |
c6fdbed7 | 292 | kmk -j1 %{?with_verbose:KBUILD_VERBOSE=3} |
48363591 | 293 | %endif |
74268e47 | 294 | |
295 | %if %{with kernel} | |
83ffcfa8 | 296 | cd PLD-MODULE-BUILD |
1e840a77 | 297 | sed -i -e 's/-DVBOX_WITH_HARDENING//g' vboxdrv/Makefile |
74268e47 | 298 | %build_kernel_modules -m vboxadd -C vboxadd |
299 | %build_kernel_modules -m vboxdrv -C vboxdrv | |
0da669b5 | 300 | cp -a vboxadd/Module.symvers vboxvfs |
83ffcfa8 | 301 | %build_kernel_modules -m vboxvfs -C vboxvfs -c |
74268e47 | 302 | cd .. |
d1c4ec5b | 303 | %endif |
48363591 | 304 | |
305 | %install | |
306 | rm -rf $RPM_BUILD_ROOT | |
307 | ||
d1c4ec5b | 308 | %if %{with userspace} |
48363591 | 309 | install -d \ |
d89980c7 | 310 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ |
67ad4c40 | 311 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
a70507fb | 312 | |
67ad4c40 | 313 | install %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/VirtualBox-wrapper.sh |
d9390c3b | 314 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox,vditool}; do |
fe3d1798 | 315 | install out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 316 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 317 | done |
318 | ||
9a6c7384 AM |
319 | %ifarch %{x8664} |
320 | install out/linux.%{outdir}/release/bin/VBox*.rel \ | |
321 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox | |
322 | %endif | |
323 | ||
5a497466 | 324 | install out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 325 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
d9390c3b | 326 | install out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 327 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
328 | ||
916ab34d | 329 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 330 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 331 | |
5877f605 | 332 | install %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
333 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
334 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 335 | |
fe3d1798 | 336 | install out/linux.%{outdir}/release/bin/additions/mountvboxsf \ |
09c79ddb | 337 | $RPM_BUILD_ROOT%{_bindir} |
338 | ||
c7f37a9d ER |
339 | %ifnarch %{x8664} |
340 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} | |
53741724 | 341 | install out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_14.so \ |
09c79ddb | 342 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
53741724 | 343 | install out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_14.so \ |
09c79ddb | 344 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
c7f37a9d | 345 | %endif |
09c79ddb | 346 | |
fe3d1798 | 347 | install out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
67ad4c40 | 348 | install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop |
d1c4ec5b | 349 | |
33233365 | 350 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
351 | install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules | |
da083e45 | 352 | %endif |
33233365 | 353 | |
da083e45 | 354 | %if %{with kernel} |
70fe9387 | 355 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
67ad4c40 | 356 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
357 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd | |
83ffcfa8 | 358 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc |
359 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc | |
360 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc | |
d1c4ec5b | 361 | %endif |
05f1b1f5 | 362 | |
48363591 | 363 | %clean |
364 | rm -rf $RPM_BUILD_ROOT | |
365 | ||
3b63d3e8 | 366 | %pre |
367 | %groupadd -g 221 -r -f vbox | |
368 | ||
14561782 | 369 | %post |
d8ed80f4 | 370 | cat << 'EOF' |
371 | NOTE: You must also install kernel module for this software to work | |
7d4acef5 ER |
372 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} |
373 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
374 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
375 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
d8ed80f4 | 376 | etc. |
377 | ||
7d4acef5 | 378 | Depending on which kernel brand You use. |
d8ed80f4 | 379 | |
380 | EOF | |
381 | ||
3b63d3e8 | 382 | %postun |
383 | if [ "$1" = "0" ]; then | |
384 | %groupremove vbox | |
385 | fi | |
386 | ||
74268e47 | 387 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
388 | %depmod %{_kernel_ver} | |
270f67bc | 389 | /sbin/chkconfig --add vboxadd |
390 | %service vboxadd restart "VirtualBox OSE guest additions driver" | |
74268e47 | 391 | |
392 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
393 | %depmod %{_kernel_ver} | |
394 | ||
270f67bc | 395 | %preun -n kernel%{_alt_kernel}-misc-vboxadd |
396 | if [ "$1" = "0" ]; then | |
397 | %service vboxadd stop | |
398 | /sbin/chkconfig --del vboxadd | |
399 | fi | |
400 | ||
48363591 | 401 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
402 | %depmod %{_kernel_ver} | |
270f67bc | 403 | /sbin/chkconfig --add vboxdrv |
404 | %service vboxdrv restart "VirtualBox OSE driver" | |
48363591 | 405 | |
406 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
407 | %depmod %{_kernel_ver} | |
408 | ||
270f67bc | 409 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
410 | if [ "$1" = "0" ]; then | |
411 | %service vboxdrv stop | |
412 | /sbin/chkconfig --del vboxdrv | |
413 | fi | |
414 | ||
74268e47 | 415 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
416 | %depmod %{_kernel_ver} | |
417 | ||
418 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
419 | %depmod %{_kernel_ver} | |
420 | ||
d1c4ec5b | 421 | %if %{with userspace} |
48363591 | 422 | %files |
423 | %defattr(644,root,root,755) | |
7d1c0a63 | 424 | %doc UserManual.pdf |
8833bce1 | 425 | %dir %{_libdir}/VirtualBox |
916ab34d | 426 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 427 | %dir %{_libdir}/VirtualBox/components |
428 | %dir %{_libdir}/VirtualBox/nls | |
4c18fded | 429 | %attr(755,root,root) %{_bindir}/mountvboxsf |
430 | %attr(755,root,root) %{_bindir}/vditool | |
48363591 | 431 | %attr(755,root,root) %{_bindir}/VBox* |
432 | %attr(755,root,root) %{_bindir}/VirtualBox | |
fdd1c725 | 433 | %attr(755,root,root) %{_libdir}/VirtualBox/vditool |
05f1b1f5 | 434 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
435 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 436 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 437 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
438 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
8bb99fd5 | 439 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 440 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
8833bce1 | 441 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so |
9a6c7384 AM |
442 | %ifarch %{x8664} |
443 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.rel | |
444 | %endif | |
fdd1c725 | 445 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
446 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
05f1b1f5 | 447 | %{_libdir}/VirtualBox/*.gc |
448 | %{_libdir}/VirtualBox/*.r0 | |
916ab34d | 449 | %{_libdir}/VirtualBox/additions/* |
05f1b1f5 | 450 | %{_libdir}/VirtualBox/components/* |
89ce7412 | 451 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
72d5ea57 | 452 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 453 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
454 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm | |
455 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm | |
456 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
457 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
458 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
459 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 460 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 461 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
462 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
463 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm | |
72d5ea57 | 464 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 465 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 466 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 467 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 468 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
469 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
470 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 471 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 472 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 473 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
89ce7412 | 474 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
475 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 476 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 477 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 478 | |
abb636b9 | 479 | %files udev |
480 | %defattr(644,root,root,755) | |
481 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
482 | ||
23d9d34e | 483 | # Drivers are for Guest OS, which is 32-bit. |
484 | %ifnarch %{x8664} | |
09c79ddb | 485 | %files -n xorg-driver-input-vboxmouse |
486 | %defattr(644,root,root,755) | |
487 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
488 | ||
489 | %files -n xorg-driver-video-vboxvideo | |
490 | %defattr(644,root,root,755) | |
491 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 492 | %endif |
23d9d34e | 493 | %endif |
48363591 | 494 | |
d1c4ec5b | 495 | %if %{with kernel} |
74268e47 | 496 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
497 | %defattr(644,root,root,755) | |
67ad4c40 | 498 | %attr(754,root,root) /etc/rc.d/init.d/vboxadd |
74268e47 | 499 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* |
500 | ||
d1c4ec5b | 501 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 502 | %defattr(644,root,root,755) |
67ad4c40 | 503 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 504 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 505 | |
506 | %files -n kernel%{_alt_kernel}-misc-vboxvfs | |
507 | %defattr(644,root,root,755) | |
508 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* | |
05f1b1f5 | 509 | %endif |