]>
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 |
cc9d49be | 13 | %bcond_with force_userspace # force userspace build (useful if alt_kernel is set) |
b29bcb41 | 14 | %bcond_with verbose |
05f1b1f5 | 15 | |
8833bce1 | 16 | %if %{without kernel} |
17 | %undefine with_dist_kernel | |
18 | %endif | |
bd3faca3 | 19 | %if "%{_alt_kernel}" != "%{nil}" |
20 | %undefine with_userspace | |
21 | %endif | |
cc9d49be AG |
22 | %if %{with force_userspace} |
23 | %define with_userspace 1 | |
24 | %endif | |
05f9288a ER |
25 | %if %{without userspace} |
26 | # nothing to be placed to debuginfo package | |
27 | %define _enable_debug_packages 0 | |
28 | %endif | |
bd3faca3 | 29 | |
6369aec7 | 30 | %define rel 3 |
bd3faca3 | 31 | %define pname VirtualBox |
93ccc0e8 ER |
32 | Summary: VirtualBox OSE - x86 hardware virtualizer |
33 | Summary(pl.UTF-8): VirtualBox OSE - wirtualizator sprzętu x86 | |
bd3faca3 | 34 | Name: %{pname}%{_alt_kernel} |
dc45c25e | 35 | Version: 3.0.12 |
fe3d1798 | 36 | Release: %{rel} |
48363591 | 37 | License: GPL v2 |
38 | Group: Applications/Emulators | |
0b0842e2 | 39 | Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}-OSE.tar.bz2 |
dc45c25e | 40 | # Source0-md5: 4cdf4a829db73fb502b8269676c8db30 |
0b0842e2 | 41 | Source1: http://download.virtualbox.org/virtualbox/%{version}/UserManual.pdf |
dc45c25e | 42 | # Source1-md5: ac742f57893b46bb9324ae008b716059 |
0b0842e2 | 43 | Source2: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso |
dc45c25e | 44 | # Source2-md5: bc756ed1b3f7874b098675970572206f |
67ad4c40 | 45 | Source3: %{pname}-vboxdrv.init |
46 | Source4: %{pname}-vboxadd.init | |
11848f5b | 47 | Source5: %{pname}-vboxnetflt.init |
48 | Source6: %{pname}-vboxvfs.init | |
49 | Source7: %{pname}.desktop | |
50 | Source8: %{pname}.sh | |
4f09a416 | 51 | Source9: mount.vdi |
bd3faca3 | 52 | Patch0: %{pname}-configure.patch |
006342ee | 53 | Patch1: %{pname}-configure-spaces.patch |
67a4f3c1 | 54 | Patch2: %{pname}-export_modules.patch |
8473a80d | 55 | Patch3: %{pname}-VBoxSysInfo.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 | |
4fff279a | 63 | BuildRequires: libstdc++-multilib-static |
ce9843cd | 64 | %endif |
ce9843cd ER |
65 | %if "%{pld_release}" == "ac" |
66 | BuildRequires: XFree86-devel | |
67 | %else | |
68 | BuildRequires: xorg-lib-libXcursor-devel | |
69 | BuildRequires: xorg-lib-libXmu-devel | |
70 | %endif | |
00149140 | 71 | BuildRequires: OpenGL-GLU-devel |
523e7409 | 72 | BuildRequires: OpenGL-devel |
cef75615 | 73 | BuildRequires: QtGui-devel |
2d17bb72 | 74 | BuildRequires: QtNetwork-devel |
c574efad | 75 | BuildRequires: SDL-devel >= 1.2.7 |
9a1cb119 | 76 | BuildRequires: acpica |
ba702945 | 77 | BuildRequires: alsa-lib-devel >= 1.0.6 |
e5aaadde | 78 | BuildRequires: bash |
48363591 | 79 | BuildRequires: bcc |
80 | BuildRequires: bin86 | |
07ef7f06 | 81 | BuildRequires: curl-devel |
eba4b2aa | 82 | BuildRequires: gcc >= 5:3.2.3 |
48363591 | 83 | BuildRequires: libIDL-devel |
fa974331 | 84 | BuildRequires: libcap-static |
ff01a704 | 85 | BuildRequires: libpng-devel >= 1.2.5 |
d22f0a53 | 86 | BuildRequires: libstdc++-devel >= 5:3.2.3 |
4fff279a | 87 | BuildRequires: libstdc++-static >= 5:3.2.3 |
48363591 | 88 | BuildRequires: libuuid-devel |
ba702945 | 89 | BuildRequires: libxml2-devel >= 2.6.26 |
76ea5ecb | 90 | BuildRequires: libxslt-devel >= 1.1.17 |
ba702945 | 91 | BuildRequires: libxslt-progs >= 1.1.17 |
0bf43862 | 92 | BuildRequires: pkgconfig |
ba702945 | 93 | BuildRequires: pulseaudio-devel >= 0.9.0 |
523e7409 | 94 | BuildRequires: python-devel |
6055e733 | 95 | BuildRequires: python-modules |
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 |
fa974331 | 121 | %define _sbindir /sbin |
5088674d | 122 | |
48363591 | 123 | %description |
93ccc0e8 | 124 | InnoTek VirtualBox OSE is a general-purpose full virtualizer for x86 |
48363591 | 125 | hardware. Targeted at server, desktop and embedded use, it is now the |
126 | only professional-quality virtualization solution that is also Open | |
127 | Source Software. | |
128 | ||
93ccc0e8 | 129 | Some of the features of VirtualBox OSE are: |
48363591 | 130 | |
93ccc0e8 | 131 | Modularity: VirtualBox OSE has an extremely modular design with |
48363591 | 132 | well-defined internal programming interfaces and a client/server |
133 | design. This makes it easy to control it from several interfaces at | |
134 | once: for example, you can start a virtual machine in a typical | |
135 | virtual machine GUI and then control that machine from the command | |
2df47f85 | 136 | line. VirtualBox OSE also comes with a full Software Development Kit: |
137 | even though it is Open Source Software, you don't have to hack the | |
138 | source to write a new interface for VirtualBox OSE. | |
48363591 | 139 | |
140 | Virtual machine descriptions in XML: the configuration settings of | |
141 | virtual machines are stored entirely in XML and are independent of the | |
142 | local machines. Virtual machine definitions can therefore easily be | |
143 | ported to other computers. | |
144 | ||
fd8fc899 | 145 | %description -l pl.UTF-8 |
93ccc0e8 | 146 | InnoTek VirtualBox OSE jest emulatorem sprzętu x86. Kierowany do |
fd8fc899 JR |
147 | zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie |
148 | jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym | |
149 | również jako Otwarte Oprogramowanie. | |
48363591 | 150 | |
fd8fc899 | 151 | Przykładowe cechy VirtualBoksa: |
48363591 | 152 | |
93ccc0e8 | 153 | Modularność: VirtualBox OSE jest wysoce zmodularyzowanym produktem z |
fd8fc899 JR |
154 | dobrze zaprojektowanym wewnętrznym interfejsem programowym typu |
155 | klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą | |
156 | różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z | |
157 | poziomu interfejsu graficznego, a później kontrolować ją z linii | |
2df47f85 | 158 | poleceń. VirtualBox OSE dostarcza również pełny pakiet deweloperski, |
159 | co pozwala stworzyć dowolny inny interfejs zarządzania maszyną | |
160 | wirtualną. | |
48363591 | 161 | |
fd8fc899 JR |
162 | Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn |
163 | wirtualnych są w całości przechowywane w XML-u i są niezależne od | |
164 | lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść | |
165 | konfigurację maszyny wirtualnej na inny komputer. | |
48363591 | 166 | |
abb636b9 | 167 | %package udev |
93ccc0e8 | 168 | Summary: udev rules for VirtualBox OSE kernel modules |
da083e45 | 169 | Summary(pl.UTF-8): Reguły udev dla modułów jądra Linuksa dla VirtualBoksa |
8512deca | 170 | Release: %{rel} |
abb636b9 | 171 | Group: Base/Kernel |
93bf3da1 | 172 | Requires: udev-core |
abb636b9 | 173 | |
174 | %description udev | |
2df47f85 | 175 | udev rules for VirtualBox OSE kernel modules. |
abb636b9 | 176 | |
177 | %description udev -l pl.UTF-8 | |
2df47f85 | 178 | Reguły udev dla modułów jądra Linuksa dla VirtualBoksa. |
abb636b9 | 179 | |
74268e47 | 180 | %package -n kernel%{_alt_kernel}-misc-vboxadd |
b0444796 | 181 | Summary: VirtualBox OSE Guest Additions for Linux Module |
ea074a55 | 182 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 183 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 184 | Group: Base/Kernel |
185 | Requires(post,postun): /sbin/depmod | |
186 | Requires: dev >= 2.9.0-7 | |
187 | %if %{with dist_kernel} | |
188 | %requires_releq_kernel | |
ca8701ad | 189 | Requires(postun): %releq_kernel |
74268e47 | 190 | %endif |
fe3d1798 | 191 | Provides: kernel(vboxadd) = %{version}-%{rel} |
74268e47 | 192 | |
193 | %description -n kernel%{_alt_kernel}-misc-vboxadd | |
b0444796 | 194 | VirtualBox OSE Guest Additions for Linux Module. |
74268e47 | 195 | |
196 | %description -n kernel%{_alt_kernel}-misc-vboxadd -l pl.UTF-8 | |
4f09a416 ER |
197 | Moduł jądra Linuksa vboxadd dla VirtualBoksa OSE - dodatki dla systemu |
198 | gościa. | |
74268e47 | 199 | |
48363591 | 200 | %package -n kernel%{_alt_kernel}-misc-vboxdrv |
b0444796 | 201 | Summary: VirtualBox OSE Support Driver |
ea074a55 | 202 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 203 | Release: %{rel}@%{_kernel_ver_str} |
48363591 | 204 | Group: Base/Kernel |
205 | Requires(post,postun): /sbin/depmod | |
206 | Requires: dev >= 2.9.0-7 | |
207 | %if %{with dist_kernel} | |
d6f0c54e | 208 | %requires_releq_kernel |
209 | Requires(postun): %releq_kernel | |
48363591 | 210 | %endif |
fe3d1798 | 211 | Provides: kernel(vboxdrv) = %{version}-%{rel} |
48363591 | 212 | |
213 | %description -n kernel%{_alt_kernel}-misc-vboxdrv | |
b0444796 | 214 | VirtualBox OSE Support Driver. |
48363591 | 215 | |
fd8fc899 | 216 | %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8 |
ea074a55 | 217 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik wsparcia dla |
218 | systemu głównego. | |
48363591 | 219 | |
1dda2f69 | 220 | %package -n kernel%{_alt_kernel}-misc-vboxnetflt |
221 | Summary: VirtualBox OSE Guest Additions for Linux Module | |
ea074a55 | 222 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
1dda2f69 | 223 | Release: %{rel}@%{_kernel_ver_str} |
224 | Group: Base/Kernel | |
225 | Requires(post,postun): /sbin/depmod | |
226 | Requires: dev >= 2.9.0-7 | |
227 | Requires: kernel%{_alt_kernel}-misc-vboxdrv | |
228 | %if %{with dist_kernel} | |
229 | %requires_releq_kernel | |
230 | Requires(postun): %releq_kernel | |
231 | %endif | |
232 | Provides: kernel(vboxnetflt) = %{version}-%{rel} | |
233 | ||
234 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt | |
ea074a55 | 235 | VirtualBox OSE Network Filter Driver. |
1dda2f69 | 236 | |
237 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt -l pl.UTF-8 | |
4f09a416 ER |
238 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik filtrowania sieci |
239 | dla systemu głównego. | |
1dda2f69 | 240 | |
74268e47 | 241 | %package -n kernel%{_alt_kernel}-misc-vboxvfs |
b0444796 | 242 | Summary: Host file system access VFS for VirtualBox OSE |
ea074a55 | 243 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE |
fe3d1798 | 244 | Release: %{rel}@%{_kernel_ver_str} |
74268e47 | 245 | Group: Base/Kernel |
246 | Requires(post,postun): /sbin/depmod | |
247 | Requires: dev >= 2.9.0-7 | |
ca8701ad | 248 | Requires: kernel%{_alt_kernel}-misc-vboxadd |
74268e47 | 249 | %if %{with dist_kernel} |
250 | %requires_releq_kernel | |
251 | Requires(postun): %releq_kernel | |
252 | %endif | |
fe3d1798 | 253 | Provides: kernel(vboxvfs) = %{version}-%{rel} |
74268e47 | 254 | |
255 | %description -n kernel%{_alt_kernel}-misc-vboxvfs | |
b0444796 | 256 | Host file system access VFS for VirtualBox OSE. |
74268e47 | 257 | |
258 | %description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8 | |
4f09a416 ER |
259 | Moduł jądra Linuksa dla VirtualBoksa OSE - dostęp do plików systemu |
260 | głównego z poziomu systemu gościa. | |
74268e47 | 261 | |
67a4f3c1 | 262 | %package -n kernel%{_alt_kernel}-misc-vboxvideo |
263 | Summary: DRM support for VirtualBox OSE | |
264 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE | |
265 | Release: %{rel}@%{_kernel_ver_str} | |
266 | Group: Base/Kernel | |
267 | Requires(post,postun): /sbin/depmod | |
268 | Requires: dev >= 2.9.0-7 | |
269 | %if %{with dist_kernel} | |
270 | %requires_releq_kernel | |
271 | Requires(postun): %releq_kernel | |
272 | %endif | |
273 | Provides: kernel(vboxvideo) = %{version}-%{rel} | |
274 | ||
275 | %description -n kernel%{_alt_kernel}-misc-vboxvideo | |
276 | DRM support for VirtualBox OSE. | |
277 | ||
278 | %description -n kernel%{_alt_kernel}-misc-vboxvideo -l pl.UTF-8 | |
279 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik obsługi DRM. | |
280 | ||
09c79ddb | 281 | %package -n xorg-driver-input-vboxmouse |
93ccc0e8 | 282 | Summary: X.org mouse driver for VirtualBox OSE guest OS |
ea074a55 | 283 | Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 284 | Release: %{rel} |
09c79ddb | 285 | Group: X11/Applications |
286 | Requires: xorg-xserver-server >= 1.0.99.901 | |
6369aec7 | 287 | Requires: xorg-xserver-server(xinput-abi) <= 7.0 |
fa974331 | 288 | Requires: xorg-xserver-server(xinput-abi) >= 4.0 |
09c79ddb | 289 | |
290 | %description -n xorg-driver-input-vboxmouse | |
93ccc0e8 | 291 | X.org mouse driver for VirtualBox OSE guest OS. |
09c79ddb | 292 | |
293 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
fe3d1798 | 294 | Sterownik myszy dla systemu gościa w VirtualBoksie. |
09c79ddb | 295 | |
296 | %package -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 297 | Summary: X.org video driver for VirtualBox OSE guest OS |
ea074a55 | 298 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 299 | Release: %{rel} |
09c79ddb | 300 | Group: X11/Applications |
fa974331 | 301 | Requires: xorg-xserver-server >= 1.0.99.901 |
6369aec7 | 302 | Requires: xorg-xserver-server(videodrv-abi) <= 6.0 |
e8585a55 | 303 | Requires: xorg-xserver-server(videodrv-abi) >= 2.0 |
09c79ddb | 304 | |
305 | %description -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 306 | X.org video driver for VirtualBox OSE guest OS. |
09c79ddb | 307 | |
308 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
ea074a55 | 309 | Sterownik grafiki dla systemu gościa w VirtualBoksie OSE. |
09c79ddb | 310 | |
48363591 | 311 | %prep |
506ebac4 | 312 | %setup -q -n %{pname}-%{version}_OSE |
e709ce6b | 313 | %patch0 -p1 |
006342ee AM |
314 | %patch1 -p1 |
315 | %patch2 -p1 | |
8473a80d | 316 | %patch3 -p1 |
fddcb741 | 317 | |
33233365 | 318 | cat <<'EOF' > udev.conf |
319 | KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660" | |
67ad4c40 | 320 | KERNEL=="vboxadd", NAME="%k", GROUP="vbox", MODE="0660" |
33233365 | 321 | EOF |
23d9d34e | 322 | |
fdd1c725 | 323 | install %{SOURCE1} . |
11848f5b | 324 | sed 's#@LIBDIR@#%{_libdir}#' < %{SOURCE8} > VirtualBox-wrapper.sh |
fa19f650 | 325 | |
83ffcfa8 | 326 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD |
327 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
328 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
f2dd3ab3 | 329 | ../src/VBox/HostDrivers/linux/export_modules modules.tar.gz --without-hardening && \ |
83ffcfa8 | 330 | tar -zxf modules.tar.gz && rm -f modules.tar.gz |
39838f8c | 331 | #./src/VBox/HostDrivers/Support/linux/Makefile:70: |
332 | #./PLD-MODULE-BUILD/vboxdrv/Makefile:70: | |
333 | ||
05f1b1f5 | 334 | |
fddcb741 | 335 | %build |
83ffcfa8 | 336 | %if %{with userspace} |
106d8451 | 337 | ./configure \ |
ae1bbc88 | 338 | --with-gcc="%{__cc}" \ |
339 | --with-g++="%{__cxx}" \ | |
5a497466 | 340 | --disable-hardening \ |
655754f2 | 341 | --disable-kmods |
48363591 | 342 | |
0864aefd | 343 | . ./env.sh && \ |
006342ee | 344 | kmk -j1 %{?with_verbose:KBUILD_VERBOSE=3} USER=$(id -un) |
48363591 | 345 | %endif |
74268e47 | 346 | |
347 | %if %{with kernel} | |
83ffcfa8 | 348 | cd PLD-MODULE-BUILD |
74268e47 | 349 | %build_kernel_modules -m vboxadd -C vboxadd |
350 | %build_kernel_modules -m vboxdrv -C vboxdrv | |
1dda2f69 | 351 | %build_kernel_modules -m vboxnetflt -C vboxnetflt |
0da669b5 | 352 | cp -a vboxadd/Module.symvers vboxvfs |
83ffcfa8 | 353 | %build_kernel_modules -m vboxvfs -C vboxvfs -c |
67a4f3c1 | 354 | %build_kernel_modules -m vboxvideo -C vboxvideo_drm |
74268e47 | 355 | cd .. |
50863744 | 356 | %{__cc} %{rpmcflags} %{rpmldflags} -Wall -Werror src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c -o mount.vboxsf |
d1c4ec5b | 357 | %endif |
48363591 | 358 | |
359 | %install | |
360 | rm -rf $RPM_BUILD_ROOT | |
361 | ||
d1c4ec5b | 362 | %if %{with userspace} |
48363591 | 363 | install -d \ |
50863744 | 364 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_pixmapsdir},%{_desktopdir}} \ |
2dda8d86 | 365 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox \ |
a70507fb | 366 | |
50863744 | 367 | install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/mount.vdi |
70ce4861 | 368 | install -p VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
5b399826 | 369 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox}; do |
70ce4861 | 370 | install -p out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 371 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 372 | done |
373 | ||
70ce4861 | 374 | install -p out/linux.%{outdir}/release/bin/VBox{TestOGL,NetAdpCtl,NetDHCP} \ |
5b399826 | 375 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 376 | install -p out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 377 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 378 | install -p out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 379 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
70ce4861 | 380 | install -p out/linux.%{outdir}/release/bin/VBoxSysInfo.sh \ |
2a9de9cd | 381 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
48363591 | 382 | |
916ab34d | 383 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 384 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 385 | |
70ce4861 | 386 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
387 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
388 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 389 | |
c7f37a9d | 390 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
1365dd46 | 391 | |
6369aec7 | 392 | install -p out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_17.so \ |
09c79ddb | 393 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
6369aec7 | 394 | install -p out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_17.so \ |
09c79ddb | 395 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
396 | ||
70ce4861 ER |
397 | install -p out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
398 | cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop | |
d1c4ec5b | 399 | |
33233365 | 400 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
70ce4861 | 401 | cp -a udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules |
da083e45 | 402 | %endif |
33233365 | 403 | |
da083e45 | 404 | %if %{with kernel} |
50863744 | 405 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,modprobe.d},%{_sbindir}} |
70ce4861 ER |
406 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
407 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd | |
408 | install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt | |
409 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxvfs | |
83ffcfa8 | 410 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc |
411 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc | |
1dda2f69 | 412 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxnetflt/vboxnetflt -d misc |
83ffcfa8 | 413 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc |
67a4f3c1 | 414 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvideo_drm/vboxvideo -d misc |
fa974331 | 415 | |
50863744 ER |
416 | install -p mount.vboxsf $RPM_BUILD_ROOT%{_sbindir}/mount.vboxsf |
417 | ||
70ce4861 ER |
418 | cat <<'EOF' > $RPM_BUILD_ROOT/etc/modprobe.d/vboxvfs.conf |
419 | # Somewhy filesystem is not called as same as kernel module. | |
420 | alias vboxsf vboxvfs | |
421 | EOF | |
d1c4ec5b | 422 | %endif |
05f1b1f5 | 423 | |
48363591 | 424 | %clean |
425 | rm -rf $RPM_BUILD_ROOT | |
426 | ||
3b63d3e8 | 427 | %pre |
428 | %groupadd -g 221 -r -f vbox | |
429 | ||
14561782 | 430 | %post |
d8ed80f4 | 431 | cat << 'EOF' |
7841ddfd ER |
432 | You must also install kernel module for this software to work: |
433 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
434 | ||
435 | Additionally you might want to install: | |
05f12a30 ER |
436 | kernel-misc-vboxnetflt-%{version}-%{rel}@%{_kernel_ver_str} |
437 | ||
fa974331 | 438 | On Guest Linux system you might want to install: |
7841ddfd ER |
439 | kernel-misc-vboxadd-%{version}-%{rel}@%{_kernel_ver_str} |
440 | kernel-misc-vboxvfs-%{version}-%{rel}@%{_kernel_ver_str} | |
67a4f3c1 | 441 | kernel-misc-vboxvideo-%{version}-%{rel}@%{_kernel_ver_str} |
7841ddfd ER |
442 | |
443 | NOTE: for different kernel brands append after word kernel the brand, like: | |
444 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
445 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
446 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
447 | ...etc. | |
d8ed80f4 | 448 | |
7d4acef5 | 449 | Depending on which kernel brand You use. |
d8ed80f4 | 450 | |
451 | EOF | |
452 | ||
3b63d3e8 | 453 | %postun |
454 | if [ "$1" = "0" ]; then | |
455 | %groupremove vbox | |
456 | fi | |
457 | ||
74268e47 | 458 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
459 | %depmod %{_kernel_ver} | |
270f67bc | 460 | /sbin/chkconfig --add vboxadd |
fa974331 | 461 | %service vboxadd restart "VirtualBox OSE Guest additions driver" |
74268e47 | 462 | |
463 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
464 | %depmod %{_kernel_ver} | |
465 | ||
270f67bc | 466 | %preun -n kernel%{_alt_kernel}-misc-vboxadd |
467 | if [ "$1" = "0" ]; then | |
468 | %service vboxadd stop | |
469 | /sbin/chkconfig --del vboxadd | |
470 | fi | |
471 | ||
48363591 | 472 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
473 | %depmod %{_kernel_ver} | |
270f67bc | 474 | /sbin/chkconfig --add vboxdrv |
fa974331 | 475 | %service vboxdrv restart "VirtualBox USE Support Driver" |
48363591 | 476 | |
477 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
478 | %depmod %{_kernel_ver} | |
479 | ||
270f67bc | 480 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
481 | if [ "$1" = "0" ]; then | |
482 | %service vboxdrv stop | |
483 | /sbin/chkconfig --del vboxdrv | |
484 | fi | |
485 | ||
1dda2f69 | 486 | %post -n kernel%{_alt_kernel}-misc-vboxnetflt |
487 | %depmod %{_kernel_ver} | |
11848f5b | 488 | /sbin/chkconfig --add vboxnetflt |
fd488e66 | 489 | %service vboxnetflt restart "VirtualBox OSE Network Filter driver" |
1dda2f69 | 490 | |
491 | %postun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
492 | %depmod %{_kernel_ver} | |
493 | ||
11848f5b | 494 | %preun -n kernel%{_alt_kernel}-misc-vboxnetflt |
495 | if [ "$1" = "0" ]; then | |
496 | %service vboxnetflt stop | |
497 | /sbin/chkconfig --del vboxnetflt | |
498 | fi | |
499 | ||
74268e47 | 500 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
501 | %depmod %{_kernel_ver} | |
ca8701ad | 502 | /sbin/chkconfig --add vboxvfs |
fa974331 | 503 | %service vboxvfs restart "VirtualBox OSE Host file system access VFS" |
74268e47 | 504 | |
505 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
506 | %depmod %{_kernel_ver} | |
507 | ||
ca8701ad | 508 | %preun -n kernel%{_alt_kernel}-misc-vboxvfs |
509 | if [ "$1" = "0" ]; then | |
510 | %service vboxvfs stop | |
511 | /sbin/chkconfig --del vboxvfs | |
512 | fi | |
513 | ||
67a4f3c1 | 514 | %post -n kernel%{_alt_kernel}-misc-vboxvideo |
515 | %depmod %{_kernel_ver} | |
516 | ||
517 | %postun -n kernel%{_alt_kernel}-misc-vboxvideo | |
518 | %depmod %{_kernel_ver} | |
519 | ||
d1c4ec5b | 520 | %if %{with userspace} |
48363591 | 521 | %files |
522 | %defattr(644,root,root,755) | |
7d1c0a63 | 523 | %doc UserManual.pdf |
8833bce1 | 524 | %dir %{_libdir}/VirtualBox |
916ab34d | 525 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 526 | %dir %{_libdir}/VirtualBox/components |
527 | %dir %{_libdir}/VirtualBox/nls | |
85b005e2 | 528 | %attr(755,root,root) %{_bindir}/VBoxBFE |
529 | %attr(755,root,root) %{_bindir}/VBoxHeadless | |
530 | %attr(755,root,root) %{_bindir}/VBoxManage | |
531 | %attr(755,root,root) %{_bindir}/VBoxSDL | |
532 | %attr(755,root,root) %{_bindir}/VBoxSVC | |
533 | %attr(755,root,root) %{_bindir}/VBoxTunctl | |
534 | %attr(755,root,root) %{_bindir}/VBoxXPCOMIPCD | |
48363591 | 535 | %attr(755,root,root) %{_bindir}/VirtualBox |
4f09a416 | 536 | %attr(755,root,root) /sbin/mount.vdi |
05f1b1f5 | 537 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
538 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 539 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 540 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
541 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
5b399826 | 542 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTestOGL |
8bb99fd5 | 543 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 544 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
85b005e2 | 545 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD.so |
546 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD2.so | |
547 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDDU.so | |
548 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxGuestPropSvc.so | |
549 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxKeyboard.so | |
5b399826 MM |
550 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetAdpCtl |
551 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetDHCP | |
85b005e2 | 552 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhostcrutil.so |
553 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhosterrorspu.so | |
554 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLrenderspu.so | |
555 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython.so | |
556 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython2_6.so | |
557 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM.so | |
f701b529 | 558 | %ifarch %{ix86} |
5b399826 MM |
559 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM32.so |
560 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM64.so | |
f701b529 | 561 | %endif |
85b005e2 | 562 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxRT.so |
563 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSettings.so | |
564 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedClipboard.so | |
565 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedCrOpenGL.so | |
566 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedFolders.so | |
567 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxVMM.so | |
568 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOM.so | |
569 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMC.so | |
fdd1c725 | 570 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
571 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
2a9de9cd | 572 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSysInfo.sh |
85b005e2 | 573 | %{_libdir}/VirtualBox/VBoxDD2GC.gc |
574 | %{_libdir}/VirtualBox/VBoxDDGC.gc | |
575 | %{_libdir}/VirtualBox/VMMGC.gc | |
576 | %{_libdir}/VirtualBox/VBoxDD2R0.r0 | |
577 | %{_libdir}/VirtualBox/VBoxDDR0.r0 | |
578 | %{_libdir}/VirtualBox/VMMR0.r0 | |
579 | %{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso | |
580 | %{_libdir}/VirtualBox/components/VBoxC.so | |
581 | %{_libdir}/VirtualBox/components/VBoxSVCM.so | |
582 | %{_libdir}/VirtualBox/components/VBoxXPCOMBase.xpt | |
583 | %{_libdir}/VirtualBox/components/VBoxXPCOMIPCC.so | |
584 | %{_libdir}/VirtualBox/components/VirtualBox_XPCOM.xpt | |
89ce7412 | 585 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
c5e10a4d | 586 | %lang(bg) %{_libdir}/VirtualBox/nls/*_bg.qm |
72d5ea57 | 587 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 588 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
589 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm | |
11de52da | 590 | %lang(el) %{_libdir}/VirtualBox/nls/*_el.qm |
89ce7412 | 591 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm |
592 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
593 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
594 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
595 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 596 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 597 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
598 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
c5e10a4d | 599 | %lang(km_KH) %{_libdir}/VirtualBox/nls/*_km_KH.qm |
89ce7412 | 600 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm |
72d5ea57 | 601 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 602 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 603 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 604 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 605 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
606 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
607 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 608 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 609 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 610 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
85b005e2 | 611 | %lang(uk) %{_libdir}/VirtualBox/nls/*_uk.qm |
89ce7412 | 612 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
613 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 614 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 615 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 616 | |
abb636b9 | 617 | %files udev |
618 | %defattr(644,root,root,755) | |
619 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
620 | ||
09c79ddb | 621 | %files -n xorg-driver-input-vboxmouse |
622 | %defattr(644,root,root,755) | |
623 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
624 | ||
625 | %files -n xorg-driver-video-vboxvideo | |
626 | %defattr(644,root,root,755) | |
627 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 628 | %endif |
48363591 | 629 | |
d1c4ec5b | 630 | %if %{with kernel} |
74268e47 | 631 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
632 | %defattr(644,root,root,755) | |
67ad4c40 | 633 | %attr(754,root,root) /etc/rc.d/init.d/vboxadd |
74268e47 | 634 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* |
635 | ||
d1c4ec5b | 636 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 637 | %defattr(644,root,root,755) |
67ad4c40 | 638 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 639 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 640 | |
1dda2f69 | 641 | %files -n kernel%{_alt_kernel}-misc-vboxnetflt |
642 | %defattr(644,root,root,755) | |
11848f5b | 643 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetflt |
1dda2f69 | 644 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko* |
645 | ||
74268e47 | 646 | %files -n kernel%{_alt_kernel}-misc-vboxvfs |
647 | %defattr(644,root,root,755) | |
11848f5b | 648 | %attr(754,root,root) /etc/rc.d/init.d/vboxvfs |
50863744 | 649 | %attr(755,root,root) %{_sbindir}/mount.vboxsf |
70ce4861 | 650 | /etc/modprobe.d/vboxvfs.conf |
74268e47 | 651 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* |
67a4f3c1 | 652 | |
653 | %files -n kernel%{_alt_kernel}-misc-vboxvideo | |
654 | %defattr(644,root,root,755) | |
655 | /lib/modules/%{_kernel_ver}/misc/vboxvideo.ko* | |
656 | %endif |