]>
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 | |
5b399826 | 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} |
b8aea201 | 31 | Version: 3.0.2 |
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 |
b8aea201 | 36 | # Source0-md5: 68e6658b8b11a509d7dec57835cba267 |
0b0842e2 | 37 | Source1: http://download.virtualbox.org/virtualbox/%{version}/UserManual.pdf |
b8aea201 | 38 | # Source1-md5: 4d0b51c0c4759dc34c124083bae73436 |
0b0842e2 | 39 | Source2: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso |
b8aea201 | 40 | # Source2-md5: d5e63e1ee9d46aaeaacd4555f38f6714 |
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 | 49 | Patch1: %{pname}-configure-spaces.patch |
67a4f3c1 | 50 | Patch2: %{pname}-export_modules.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 | |
4fff279a | 59 | BuildRequires: libstdc++-multilib-static |
ce9843cd | 60 | %endif |
ce9843cd ER |
61 | %if "%{pld_release}" == "ac" |
62 | BuildRequires: XFree86-devel | |
63 | %else | |
64 | BuildRequires: xorg-lib-libXcursor-devel | |
65 | BuildRequires: xorg-lib-libXmu-devel | |
66 | %endif | |
00149140 | 67 | BuildRequires: OpenGL-GLU-devel |
523e7409 | 68 | BuildRequires: OpenGL-devel |
cef75615 | 69 | BuildRequires: QtGui-devel |
2d17bb72 | 70 | BuildRequires: QtNetwork-devel |
c574efad | 71 | BuildRequires: SDL-devel >= 1.2.7 |
9a1cb119 | 72 | BuildRequires: acpica |
ba702945 | 73 | BuildRequires: alsa-lib-devel >= 1.0.6 |
e5aaadde | 74 | BuildRequires: bash |
48363591 | 75 | BuildRequires: bcc |
76 | BuildRequires: bin86 | |
07ef7f06 | 77 | BuildRequires: curl-devel |
eba4b2aa | 78 | BuildRequires: gcc >= 5:3.2.3 |
48363591 | 79 | BuildRequires: libIDL-devel |
ff01a704 | 80 | BuildRequires: libpng-devel >= 1.2.5 |
d22f0a53 | 81 | BuildRequires: libstdc++-devel >= 5:3.2.3 |
4fff279a | 82 | BuildRequires: libstdc++-static >= 5:3.2.3 |
48363591 | 83 | BuildRequires: libuuid-devel |
ba702945 | 84 | BuildRequires: libxml2-devel >= 2.6.26 |
76ea5ecb | 85 | BuildRequires: libxslt-devel >= 1.1.17 |
ba702945 | 86 | BuildRequires: libxslt-progs >= 1.1.17 |
0bf43862 | 87 | BuildRequires: pkgconfig |
ba702945 | 88 | BuildRequires: pulseaudio-devel >= 0.9.0 |
523e7409 | 89 | BuildRequires: python-devel |
6055e733 | 90 | BuildRequires: python-modules |
250583d4 | 91 | BuildRequires: qt4-build >= 4.2.0 |
2700662b | 92 | BuildRequires: qt4-linguist |
1e840a77 | 93 | BuildRequires: sed >= 4.0 |
0bf43862 | 94 | BuildRequires: which |
e5aaadde | 95 | BuildRequires: xalan-c-devel >= 1.10.0 |
e5aaadde | 96 | BuildRequires: xerces-c-devel >= 2.6.0 |
97 | BuildRequires: zlib-devel >= 1.2.1 | |
2a9de9cd | 98 | BuildRequires: libcap-static |
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 |
ea074a55 | 177 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
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 | |
ca8701ad | 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 | |
4f09a416 ER |
192 | Moduł jądra Linuksa vboxadd dla VirtualBoksa OSE - dodatki dla systemu |
193 | gościa. | |
74268e47 | 194 | |
48363591 | 195 | %package -n kernel%{_alt_kernel}-misc-vboxdrv |
b0444796 | 196 | Summary: VirtualBox OSE Support Driver |
ea074a55 | 197 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
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 | 211 | %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8 |
ea074a55 | 212 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik wsparcia dla |
213 | systemu głównego. | |
48363591 | 214 | |
1dda2f69 | 215 | %package -n kernel%{_alt_kernel}-misc-vboxnetflt |
216 | Summary: VirtualBox OSE Guest Additions for Linux Module | |
ea074a55 | 217 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
1dda2f69 | 218 | Release: %{rel}@%{_kernel_ver_str} |
219 | Group: Base/Kernel | |
220 | Requires(post,postun): /sbin/depmod | |
221 | Requires: dev >= 2.9.0-7 | |
222 | Requires: kernel%{_alt_kernel}-misc-vboxdrv | |
223 | %if %{with dist_kernel} | |
224 | %requires_releq_kernel | |
225 | Requires(postun): %releq_kernel | |
226 | %endif | |
227 | Provides: kernel(vboxnetflt) = %{version}-%{rel} | |
228 | ||
229 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt | |
ea074a55 | 230 | VirtualBox OSE Network Filter Driver. |
1dda2f69 | 231 | |
232 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt -l pl.UTF-8 | |
4f09a416 ER |
233 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik filtrowania sieci |
234 | dla systemu głównego. | |
1dda2f69 | 235 | |
74268e47 | 236 | %package -n kernel%{_alt_kernel}-misc-vboxvfs |
b0444796 | 237 | Summary: Host file system access VFS for VirtualBox OSE |
ea074a55 | 238 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 239 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 240 | Group: Base/Kernel |
241 | Requires(post,postun): /sbin/depmod | |
242 | Requires: dev >= 2.9.0-7 | |
ca8701ad | 243 | Requires: kernel%{_alt_kernel}-misc-vboxadd |
74268e47 | 244 | %if %{with dist_kernel} |
245 | %requires_releq_kernel | |
246 | Requires(postun): %releq_kernel | |
247 | %endif | |
fe3d1798 | 248 | Provides: kernel(vboxvfs) = %{version}-%{rel} |
74268e47 | 249 | |
250 | %description -n kernel%{_alt_kernel}-misc-vboxvfs | |
b0444796 | 251 | Host file system access VFS for VirtualBox OSE. |
74268e47 | 252 | |
253 | %description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8 | |
4f09a416 ER |
254 | Moduł jądra Linuksa dla VirtualBoksa OSE - dostęp do plików systemu |
255 | głównego z poziomu systemu gościa. | |
74268e47 | 256 | |
67a4f3c1 | 257 | %package -n kernel%{_alt_kernel}-misc-vboxvideo |
258 | Summary: DRM support for VirtualBox OSE | |
259 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE | |
260 | Release: %{rel}@%{_kernel_ver_str} | |
261 | Group: Base/Kernel | |
262 | Requires(post,postun): /sbin/depmod | |
263 | Requires: dev >= 2.9.0-7 | |
264 | %if %{with dist_kernel} | |
265 | %requires_releq_kernel | |
266 | Requires(postun): %releq_kernel | |
267 | %endif | |
268 | Provides: kernel(vboxvideo) = %{version}-%{rel} | |
269 | ||
270 | %description -n kernel%{_alt_kernel}-misc-vboxvideo | |
271 | DRM support for VirtualBox OSE. | |
272 | ||
273 | %description -n kernel%{_alt_kernel}-misc-vboxvideo -l pl.UTF-8 | |
274 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik obsługi DRM. | |
275 | ||
09c79ddb | 276 | %package -n xorg-driver-input-vboxmouse |
93ccc0e8 | 277 | Summary: X.org mouse driver for VirtualBox OSE guest OS |
ea074a55 | 278 | Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 279 | Release: %{rel} |
09c79ddb | 280 | Group: X11/Applications |
e8585a55 AM |
281 | Requires: xorg-xserver-server(xinput-abi) >= 4.0 |
282 | Requires: xorg-xserver-server(xinput-abi) < 5.0 | |
09c79ddb | 283 | Requires: xorg-xserver-server >= 1.0.99.901 |
284 | ||
285 | %description -n xorg-driver-input-vboxmouse | |
93ccc0e8 | 286 | X.org mouse driver for VirtualBox OSE guest OS. |
09c79ddb | 287 | |
288 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
fe3d1798 | 289 | Sterownik myszy dla systemu gościa w VirtualBoksie. |
09c79ddb | 290 | |
291 | %package -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 292 | Summary: X.org video driver for VirtualBox OSE guest OS |
ea074a55 | 293 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 294 | Release: %{rel} |
09c79ddb | 295 | Group: X11/Applications |
e8585a55 AM |
296 | Requires: xorg-xserver-server(videodrv-abi) < 6.0 |
297 | Requires: xorg-xserver-server(videodrv-abi) >= 2.0 | |
09c79ddb | 298 | Requires: xorg-xserver-server >= 1.0.99.901 |
299 | ||
300 | %description -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 301 | X.org video driver for VirtualBox OSE guest OS. |
09c79ddb | 302 | |
303 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
ea074a55 | 304 | Sterownik grafiki dla systemu gościa w VirtualBoksie OSE. |
09c79ddb | 305 | |
48363591 | 306 | %prep |
506ebac4 | 307 | %setup -q -n %{pname}-%{version}_OSE |
e709ce6b | 308 | %patch0 -p1 |
006342ee AM |
309 | %patch1 -p1 |
310 | %patch2 -p1 | |
8473a80d | 311 | %patch3 -p1 |
fddcb741 | 312 | |
33233365 | 313 | cat <<'EOF' > udev.conf |
314 | KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660" | |
67ad4c40 | 315 | KERNEL=="vboxadd", NAME="%k", GROUP="vbox", MODE="0660" |
33233365 | 316 | EOF |
23d9d34e | 317 | |
fdd1c725 | 318 | install %{SOURCE1} . |
11848f5b | 319 | sed 's#@LIBDIR@#%{_libdir}#' < %{SOURCE8} > VirtualBox-wrapper.sh |
fa19f650 | 320 | |
83ffcfa8 | 321 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD |
322 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
323 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
f2dd3ab3 | 324 | ../src/VBox/HostDrivers/linux/export_modules modules.tar.gz --without-hardening && \ |
83ffcfa8 | 325 | tar -zxf modules.tar.gz && rm -f modules.tar.gz |
39838f8c | 326 | #./src/VBox/HostDrivers/Support/linux/Makefile:70: |
327 | #./PLD-MODULE-BUILD/vboxdrv/Makefile:70: | |
328 | ||
05f1b1f5 | 329 | |
fddcb741 | 330 | %build |
83ffcfa8 | 331 | %if %{with userspace} |
106d8451 | 332 | ./configure \ |
ae1bbc88 | 333 | --with-gcc="%{__cc}" \ |
334 | --with-g++="%{__cxx}" \ | |
5a497466 | 335 | --disable-hardening \ |
655754f2 | 336 | --disable-kmods |
48363591 | 337 | |
0864aefd | 338 | . ./env.sh && \ |
006342ee | 339 | kmk -j1 %{?with_verbose:KBUILD_VERBOSE=3} USER=$(id -un) |
48363591 | 340 | %endif |
74268e47 | 341 | |
342 | %if %{with kernel} | |
83ffcfa8 | 343 | cd PLD-MODULE-BUILD |
74268e47 | 344 | %build_kernel_modules -m vboxadd -C vboxadd |
345 | %build_kernel_modules -m vboxdrv -C vboxdrv | |
1dda2f69 | 346 | %build_kernel_modules -m vboxnetflt -C vboxnetflt |
0da669b5 | 347 | cp -a vboxadd/Module.symvers vboxvfs |
83ffcfa8 | 348 | %build_kernel_modules -m vboxvfs -C vboxvfs -c |
67a4f3c1 | 349 | %build_kernel_modules -m vboxvideo -C vboxvideo_drm |
74268e47 | 350 | cd .. |
d1c4ec5b | 351 | %endif |
48363591 | 352 | |
353 | %install | |
354 | rm -rf $RPM_BUILD_ROOT | |
355 | ||
d1c4ec5b | 356 | %if %{with userspace} |
48363591 | 357 | install -d \ |
d89980c7 | 358 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ |
2dda8d86 | 359 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox \ |
360 | $RPM_BUILD_ROOT/sbin | |
a70507fb | 361 | |
4f09a416 | 362 | install %{SOURCE9} $RPM_BUILD_ROOT/sbin/mount.vdi |
610c62ef | 363 | install VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
5b399826 | 364 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox}; do |
fe3d1798 | 365 | install out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 366 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 367 | done |
368 | ||
5b399826 MM |
369 | install out/linux.%{outdir}/release/bin/VBox{TestOGL,NetAdpCtl,NetDHCP} \ |
370 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox | |
5a497466 | 371 | install out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 372 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
d9390c3b | 373 | install out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 374 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
2a9de9cd | 375 | install out/linux.%{outdir}/release/bin/VBoxSysInfo.sh \ |
376 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox | |
48363591 | 377 | |
916ab34d | 378 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 379 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 380 | |
5877f605 | 381 | install %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
382 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
383 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 384 | |
fe3d1798 | 385 | install out/linux.%{outdir}/release/bin/additions/mountvboxsf \ |
09c79ddb | 386 | $RPM_BUILD_ROOT%{_bindir} |
387 | ||
c7f37a9d | 388 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
1365dd46 | 389 | |
006342ee | 390 | install out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_16.so \ |
09c79ddb | 391 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
006342ee | 392 | install out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_16.so \ |
09c79ddb | 393 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
394 | ||
fe3d1798 | 395 | install out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
11848f5b | 396 | install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop |
d1c4ec5b | 397 | |
33233365 | 398 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
399 | install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules | |
da083e45 | 400 | %endif |
33233365 | 401 | |
da083e45 | 402 | %if %{with kernel} |
70fe9387 | 403 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
67ad4c40 | 404 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
405 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd | |
11848f5b | 406 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt |
407 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxvfs | |
83ffcfa8 | 408 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc |
409 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc | |
1dda2f69 | 410 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxnetflt/vboxnetflt -d misc |
83ffcfa8 | 411 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc |
67a4f3c1 | 412 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvideo_drm/vboxvideo -d misc |
d1c4ec5b | 413 | %endif |
05f1b1f5 | 414 | |
48363591 | 415 | %clean |
416 | rm -rf $RPM_BUILD_ROOT | |
417 | ||
3b63d3e8 | 418 | %pre |
419 | %groupadd -g 221 -r -f vbox | |
420 | ||
14561782 | 421 | %post |
d8ed80f4 | 422 | cat << 'EOF' |
7841ddfd ER |
423 | You must also install kernel module for this software to work: |
424 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
425 | ||
426 | Additionally you might want to install: | |
05f12a30 ER |
427 | kernel-misc-vboxnetflt-%{version}-%{rel}@%{_kernel_ver_str} |
428 | ||
429 | On guest Linux system you might want to install: | |
7841ddfd ER |
430 | kernel-misc-vboxadd-%{version}-%{rel}@%{_kernel_ver_str} |
431 | kernel-misc-vboxvfs-%{version}-%{rel}@%{_kernel_ver_str} | |
67a4f3c1 | 432 | kernel-misc-vboxvideo-%{version}-%{rel}@%{_kernel_ver_str} |
7841ddfd ER |
433 | |
434 | NOTE: for different kernel brands append after word kernel the brand, like: | |
435 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
436 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
437 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
438 | ...etc. | |
d8ed80f4 | 439 | |
7d4acef5 | 440 | Depending on which kernel brand You use. |
d8ed80f4 | 441 | |
442 | EOF | |
443 | ||
3b63d3e8 | 444 | %postun |
445 | if [ "$1" = "0" ]; then | |
446 | %groupremove vbox | |
447 | fi | |
448 | ||
74268e47 | 449 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
450 | %depmod %{_kernel_ver} | |
270f67bc | 451 | /sbin/chkconfig --add vboxadd |
452 | %service vboxadd restart "VirtualBox OSE guest additions driver" | |
74268e47 | 453 | |
454 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
455 | %depmod %{_kernel_ver} | |
456 | ||
270f67bc | 457 | %preun -n kernel%{_alt_kernel}-misc-vboxadd |
458 | if [ "$1" = "0" ]; then | |
459 | %service vboxadd stop | |
460 | /sbin/chkconfig --del vboxadd | |
461 | fi | |
462 | ||
48363591 | 463 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
464 | %depmod %{_kernel_ver} | |
270f67bc | 465 | /sbin/chkconfig --add vboxdrv |
466 | %service vboxdrv restart "VirtualBox OSE driver" | |
48363591 | 467 | |
468 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
469 | %depmod %{_kernel_ver} | |
470 | ||
270f67bc | 471 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
472 | if [ "$1" = "0" ]; then | |
473 | %service vboxdrv stop | |
474 | /sbin/chkconfig --del vboxdrv | |
475 | fi | |
476 | ||
1dda2f69 | 477 | %post -n kernel%{_alt_kernel}-misc-vboxnetflt |
478 | %depmod %{_kernel_ver} | |
11848f5b | 479 | /sbin/chkconfig --add vboxnetflt |
fd488e66 | 480 | %service vboxnetflt restart "VirtualBox OSE Network Filter driver" |
1dda2f69 | 481 | |
482 | %postun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
483 | %depmod %{_kernel_ver} | |
484 | ||
11848f5b | 485 | %preun -n kernel%{_alt_kernel}-misc-vboxnetflt |
486 | if [ "$1" = "0" ]; then | |
487 | %service vboxnetflt stop | |
488 | /sbin/chkconfig --del vboxnetflt | |
489 | fi | |
490 | ||
74268e47 | 491 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
492 | %depmod %{_kernel_ver} | |
ca8701ad | 493 | /sbin/chkconfig --add vboxvfs |
494 | %service vboxvfs restart "VirtualBox OSE guest additions VFS driver" | |
74268e47 | 495 | |
496 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
497 | %depmod %{_kernel_ver} | |
498 | ||
ca8701ad | 499 | %preun -n kernel%{_alt_kernel}-misc-vboxvfs |
500 | if [ "$1" = "0" ]; then | |
501 | %service vboxvfs stop | |
502 | /sbin/chkconfig --del vboxvfs | |
503 | fi | |
504 | ||
67a4f3c1 | 505 | %post -n kernel%{_alt_kernel}-misc-vboxvideo |
506 | %depmod %{_kernel_ver} | |
507 | ||
508 | %postun -n kernel%{_alt_kernel}-misc-vboxvideo | |
509 | %depmod %{_kernel_ver} | |
510 | ||
d1c4ec5b | 511 | %if %{with userspace} |
48363591 | 512 | %files |
513 | %defattr(644,root,root,755) | |
7d1c0a63 | 514 | %doc UserManual.pdf |
8833bce1 | 515 | %dir %{_libdir}/VirtualBox |
916ab34d | 516 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 517 | %dir %{_libdir}/VirtualBox/components |
518 | %dir %{_libdir}/VirtualBox/nls | |
4c18fded | 519 | %attr(755,root,root) %{_bindir}/mountvboxsf |
85b005e2 | 520 | %attr(755,root,root) %{_bindir}/VBoxBFE |
521 | %attr(755,root,root) %{_bindir}/VBoxHeadless | |
522 | %attr(755,root,root) %{_bindir}/VBoxManage | |
523 | %attr(755,root,root) %{_bindir}/VBoxSDL | |
524 | %attr(755,root,root) %{_bindir}/VBoxSVC | |
525 | %attr(755,root,root) %{_bindir}/VBoxTunctl | |
526 | %attr(755,root,root) %{_bindir}/VBoxXPCOMIPCD | |
48363591 | 527 | %attr(755,root,root) %{_bindir}/VirtualBox |
4f09a416 | 528 | %attr(755,root,root) /sbin/mount.vdi |
05f1b1f5 | 529 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
530 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 531 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 532 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
533 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
5b399826 | 534 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTestOGL |
8bb99fd5 | 535 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 536 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
85b005e2 | 537 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD.so |
538 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD2.so | |
539 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDDU.so | |
540 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxGuestPropSvc.so | |
541 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxKeyboard.so | |
5b399826 MM |
542 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetAdpCtl |
543 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetDHCP | |
85b005e2 | 544 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhostcrutil.so |
545 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhosterrorspu.so | |
546 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLrenderspu.so | |
547 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython.so | |
548 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython2_6.so | |
549 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM.so | |
5b399826 MM |
550 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM32.so |
551 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM64.so | |
85b005e2 | 552 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxRT.so |
553 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSettings.so | |
554 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedClipboard.so | |
555 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedCrOpenGL.so | |
556 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedFolders.so | |
557 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxVMM.so | |
558 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOM.so | |
559 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMC.so | |
fdd1c725 | 560 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
561 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
2a9de9cd | 562 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSysInfo.sh |
85b005e2 | 563 | %{_libdir}/VirtualBox/VBoxDD2GC.gc |
564 | %{_libdir}/VirtualBox/VBoxDDGC.gc | |
565 | %{_libdir}/VirtualBox/VMMGC.gc | |
566 | %{_libdir}/VirtualBox/VBoxDD2R0.r0 | |
567 | %{_libdir}/VirtualBox/VBoxDDR0.r0 | |
568 | %{_libdir}/VirtualBox/VMMR0.r0 | |
569 | %{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso | |
570 | %{_libdir}/VirtualBox/components/VBoxC.so | |
571 | %{_libdir}/VirtualBox/components/VBoxSVCM.so | |
572 | %{_libdir}/VirtualBox/components/VBoxXPCOMBase.xpt | |
573 | %{_libdir}/VirtualBox/components/VBoxXPCOMIPCC.so | |
574 | %{_libdir}/VirtualBox/components/VirtualBox_XPCOM.xpt | |
89ce7412 | 575 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
c5e10a4d | 576 | %lang(bg) %{_libdir}/VirtualBox/nls/*_bg.qm |
72d5ea57 | 577 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 578 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
579 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm | |
11de52da | 580 | %lang(el) %{_libdir}/VirtualBox/nls/*_el.qm |
89ce7412 | 581 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm |
582 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
583 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
584 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
585 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 586 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 587 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
588 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
c5e10a4d | 589 | %lang(km_KH) %{_libdir}/VirtualBox/nls/*_km_KH.qm |
89ce7412 | 590 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm |
72d5ea57 | 591 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 592 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 593 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 594 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 595 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
596 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
597 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 598 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 599 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 600 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
85b005e2 | 601 | %lang(uk) %{_libdir}/VirtualBox/nls/*_uk.qm |
89ce7412 | 602 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
603 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 604 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 605 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 606 | |
abb636b9 | 607 | %files udev |
608 | %defattr(644,root,root,755) | |
609 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
610 | ||
09c79ddb | 611 | %files -n xorg-driver-input-vboxmouse |
612 | %defattr(644,root,root,755) | |
613 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
614 | ||
615 | %files -n xorg-driver-video-vboxvideo | |
616 | %defattr(644,root,root,755) | |
617 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 618 | %endif |
48363591 | 619 | |
d1c4ec5b | 620 | %if %{with kernel} |
74268e47 | 621 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
622 | %defattr(644,root,root,755) | |
67ad4c40 | 623 | %attr(754,root,root) /etc/rc.d/init.d/vboxadd |
74268e47 | 624 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* |
625 | ||
d1c4ec5b | 626 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 627 | %defattr(644,root,root,755) |
67ad4c40 | 628 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 629 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 630 | |
1dda2f69 | 631 | %files -n kernel%{_alt_kernel}-misc-vboxnetflt |
632 | %defattr(644,root,root,755) | |
11848f5b | 633 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetflt |
1dda2f69 | 634 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko* |
635 | ||
74268e47 | 636 | %files -n kernel%{_alt_kernel}-misc-vboxvfs |
637 | %defattr(644,root,root,755) | |
11848f5b | 638 | %attr(754,root,root) /etc/rc.d/init.d/vboxvfs |
74268e47 | 639 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* |
67a4f3c1 | 640 | |
641 | %files -n kernel%{_alt_kernel}-misc-vboxvideo | |
642 | %defattr(644,root,root,755) | |
643 | /lib/modules/%{_kernel_ver}/misc/vboxvideo.ko* | |
644 | %endif |