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