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