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