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