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