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