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