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