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