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