]>
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 | |
dc45c25e | 30 | %define rel 1 |
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 | |
fa974331 ER |
287 | Requires: xorg-xserver-server(xinput-abi) < 5.0 |
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 |
e8585a55 AM |
302 | Requires: xorg-xserver-server(videodrv-abi) < 6.0 |
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 .. |
d1c4ec5b | 356 | %endif |
48363591 | 357 | |
358 | %install | |
359 | rm -rf $RPM_BUILD_ROOT | |
360 | ||
d1c4ec5b | 361 | %if %{with userspace} |
48363591 | 362 | install -d \ |
d89980c7 | 363 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ |
2dda8d86 | 364 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox \ |
365 | $RPM_BUILD_ROOT/sbin | |
a70507fb | 366 | |
70ce4861 ER |
367 | install -p %{SOURCE9} $RPM_BUILD_ROOT/sbin/mount.vdi |
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 | |
fa974331 | 390 | install -d $RPM_BUILD_ROOT%{_sbindir} |
70ce4861 | 391 | install -p out/linux.%{outdir}/release/bin/additions/mountvboxsf \ |
fa974331 | 392 | $RPM_BUILD_ROOT%{_sbindir}/mount.vboxsf |
09c79ddb | 393 | |
c7f37a9d | 394 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
1365dd46 | 395 | |
70ce4861 | 396 | install -p out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_16.so \ |
09c79ddb | 397 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
70ce4861 | 398 | install -p out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_16.so \ |
09c79ddb | 399 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
400 | ||
70ce4861 ER |
401 | install -p out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
402 | cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop | |
d1c4ec5b | 403 | |
33233365 | 404 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
70ce4861 | 405 | cp -a udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules |
da083e45 | 406 | %endif |
33233365 | 407 | |
da083e45 | 408 | %if %{with kernel} |
70fe9387 | 409 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
70ce4861 ER |
410 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
411 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd | |
412 | install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt | |
413 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxvfs | |
83ffcfa8 | 414 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc |
415 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc | |
1dda2f69 | 416 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxnetflt/vboxnetflt -d misc |
83ffcfa8 | 417 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc |
67a4f3c1 | 418 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvideo_drm/vboxvideo -d misc |
fa974331 ER |
419 | |
420 | install -d $RPM_BUILD_ROOT/etc/modprobe.d | |
70ce4861 ER |
421 | cat <<'EOF' > $RPM_BUILD_ROOT/etc/modprobe.d/vboxvfs.conf |
422 | # Somewhy filesystem is not called as same as kernel module. | |
423 | alias vboxsf vboxvfs | |
424 | EOF | |
d1c4ec5b | 425 | %endif |
05f1b1f5 | 426 | |
48363591 | 427 | %clean |
428 | rm -rf $RPM_BUILD_ROOT | |
429 | ||
3b63d3e8 | 430 | %pre |
431 | %groupadd -g 221 -r -f vbox | |
432 | ||
14561782 | 433 | %post |
d8ed80f4 | 434 | cat << 'EOF' |
7841ddfd ER |
435 | You must also install kernel module for this software to work: |
436 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
437 | ||
438 | Additionally you might want to install: | |
05f12a30 ER |
439 | kernel-misc-vboxnetflt-%{version}-%{rel}@%{_kernel_ver_str} |
440 | ||
fa974331 | 441 | On Guest Linux system you might want to install: |
7841ddfd ER |
442 | kernel-misc-vboxadd-%{version}-%{rel}@%{_kernel_ver_str} |
443 | kernel-misc-vboxvfs-%{version}-%{rel}@%{_kernel_ver_str} | |
67a4f3c1 | 444 | kernel-misc-vboxvideo-%{version}-%{rel}@%{_kernel_ver_str} |
7841ddfd ER |
445 | |
446 | NOTE: for different kernel brands append after word kernel the brand, like: | |
447 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
448 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
449 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
450 | ...etc. | |
d8ed80f4 | 451 | |
7d4acef5 | 452 | Depending on which kernel brand You use. |
d8ed80f4 | 453 | |
454 | EOF | |
455 | ||
3b63d3e8 | 456 | %postun |
457 | if [ "$1" = "0" ]; then | |
458 | %groupremove vbox | |
459 | fi | |
460 | ||
74268e47 | 461 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
462 | %depmod %{_kernel_ver} | |
270f67bc | 463 | /sbin/chkconfig --add vboxadd |
fa974331 | 464 | %service vboxadd restart "VirtualBox OSE Guest additions driver" |
74268e47 | 465 | |
466 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
467 | %depmod %{_kernel_ver} | |
468 | ||
270f67bc | 469 | %preun -n kernel%{_alt_kernel}-misc-vboxadd |
470 | if [ "$1" = "0" ]; then | |
471 | %service vboxadd stop | |
472 | /sbin/chkconfig --del vboxadd | |
473 | fi | |
474 | ||
48363591 | 475 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
476 | %depmod %{_kernel_ver} | |
270f67bc | 477 | /sbin/chkconfig --add vboxdrv |
fa974331 | 478 | %service vboxdrv restart "VirtualBox USE Support Driver" |
48363591 | 479 | |
480 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
481 | %depmod %{_kernel_ver} | |
482 | ||
270f67bc | 483 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
484 | if [ "$1" = "0" ]; then | |
485 | %service vboxdrv stop | |
486 | /sbin/chkconfig --del vboxdrv | |
487 | fi | |
488 | ||
1dda2f69 | 489 | %post -n kernel%{_alt_kernel}-misc-vboxnetflt |
490 | %depmod %{_kernel_ver} | |
11848f5b | 491 | /sbin/chkconfig --add vboxnetflt |
fd488e66 | 492 | %service vboxnetflt restart "VirtualBox OSE Network Filter driver" |
1dda2f69 | 493 | |
494 | %postun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
495 | %depmod %{_kernel_ver} | |
496 | ||
11848f5b | 497 | %preun -n kernel%{_alt_kernel}-misc-vboxnetflt |
498 | if [ "$1" = "0" ]; then | |
499 | %service vboxnetflt stop | |
500 | /sbin/chkconfig --del vboxnetflt | |
501 | fi | |
502 | ||
74268e47 | 503 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
504 | %depmod %{_kernel_ver} | |
ca8701ad | 505 | /sbin/chkconfig --add vboxvfs |
fa974331 | 506 | %service vboxvfs restart "VirtualBox OSE Host file system access VFS" |
74268e47 | 507 | |
508 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
509 | %depmod %{_kernel_ver} | |
510 | ||
ca8701ad | 511 | %preun -n kernel%{_alt_kernel}-misc-vboxvfs |
512 | if [ "$1" = "0" ]; then | |
513 | %service vboxvfs stop | |
514 | /sbin/chkconfig --del vboxvfs | |
515 | fi | |
516 | ||
67a4f3c1 | 517 | %post -n kernel%{_alt_kernel}-misc-vboxvideo |
518 | %depmod %{_kernel_ver} | |
519 | ||
520 | %postun -n kernel%{_alt_kernel}-misc-vboxvideo | |
521 | %depmod %{_kernel_ver} | |
522 | ||
d1c4ec5b | 523 | %if %{with userspace} |
48363591 | 524 | %files |
525 | %defattr(644,root,root,755) | |
7d1c0a63 | 526 | %doc UserManual.pdf |
8833bce1 | 527 | %dir %{_libdir}/VirtualBox |
916ab34d | 528 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 529 | %dir %{_libdir}/VirtualBox/components |
530 | %dir %{_libdir}/VirtualBox/nls | |
083c569d | 531 | %attr(755,root,root) %{_sbindir}/mount.vboxsf |
85b005e2 | 532 | %attr(755,root,root) %{_bindir}/VBoxBFE |
533 | %attr(755,root,root) %{_bindir}/VBoxHeadless | |
534 | %attr(755,root,root) %{_bindir}/VBoxManage | |
535 | %attr(755,root,root) %{_bindir}/VBoxSDL | |
536 | %attr(755,root,root) %{_bindir}/VBoxSVC | |
537 | %attr(755,root,root) %{_bindir}/VBoxTunctl | |
538 | %attr(755,root,root) %{_bindir}/VBoxXPCOMIPCD | |
48363591 | 539 | %attr(755,root,root) %{_bindir}/VirtualBox |
4f09a416 | 540 | %attr(755,root,root) /sbin/mount.vdi |
05f1b1f5 | 541 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
542 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 543 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 544 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
545 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
5b399826 | 546 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTestOGL |
8bb99fd5 | 547 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 548 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
85b005e2 | 549 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD.so |
550 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDD2.so | |
551 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxDDU.so | |
552 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxGuestPropSvc.so | |
553 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxKeyboard.so | |
5b399826 MM |
554 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetAdpCtl |
555 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetDHCP | |
85b005e2 | 556 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhostcrutil.so |
557 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLhosterrorspu.so | |
558 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxOGLrenderspu.so | |
559 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython.so | |
560 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxPython2_6.so | |
561 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM.so | |
f701b529 | 562 | %ifarch %{ix86} |
5b399826 MM |
563 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM32.so |
564 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxREM64.so | |
f701b529 | 565 | %endif |
85b005e2 | 566 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxRT.so |
567 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSettings.so | |
568 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedClipboard.so | |
569 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedCrOpenGL.so | |
570 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSharedFolders.so | |
571 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxVMM.so | |
572 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOM.so | |
573 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMC.so | |
fdd1c725 | 574 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
575 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
2a9de9cd | 576 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSysInfo.sh |
85b005e2 | 577 | %{_libdir}/VirtualBox/VBoxDD2GC.gc |
578 | %{_libdir}/VirtualBox/VBoxDDGC.gc | |
579 | %{_libdir}/VirtualBox/VMMGC.gc | |
580 | %{_libdir}/VirtualBox/VBoxDD2R0.r0 | |
581 | %{_libdir}/VirtualBox/VBoxDDR0.r0 | |
582 | %{_libdir}/VirtualBox/VMMR0.r0 | |
583 | %{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso | |
584 | %{_libdir}/VirtualBox/components/VBoxC.so | |
585 | %{_libdir}/VirtualBox/components/VBoxSVCM.so | |
586 | %{_libdir}/VirtualBox/components/VBoxXPCOMBase.xpt | |
587 | %{_libdir}/VirtualBox/components/VBoxXPCOMIPCC.so | |
588 | %{_libdir}/VirtualBox/components/VirtualBox_XPCOM.xpt | |
89ce7412 | 589 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
c5e10a4d | 590 | %lang(bg) %{_libdir}/VirtualBox/nls/*_bg.qm |
72d5ea57 | 591 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 592 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
593 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm | |
11de52da | 594 | %lang(el) %{_libdir}/VirtualBox/nls/*_el.qm |
89ce7412 | 595 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm |
596 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
597 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
598 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
599 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 600 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 601 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
602 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
c5e10a4d | 603 | %lang(km_KH) %{_libdir}/VirtualBox/nls/*_km_KH.qm |
89ce7412 | 604 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm |
72d5ea57 | 605 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 606 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 607 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 608 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 609 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
610 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
611 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 612 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 613 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 614 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
85b005e2 | 615 | %lang(uk) %{_libdir}/VirtualBox/nls/*_uk.qm |
89ce7412 | 616 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
617 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 618 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 619 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 620 | |
abb636b9 | 621 | %files udev |
622 | %defattr(644,root,root,755) | |
623 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
624 | ||
09c79ddb | 625 | %files -n xorg-driver-input-vboxmouse |
626 | %defattr(644,root,root,755) | |
627 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
628 | ||
629 | %files -n xorg-driver-video-vboxvideo | |
630 | %defattr(644,root,root,755) | |
631 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 632 | %endif |
48363591 | 633 | |
d1c4ec5b | 634 | %if %{with kernel} |
74268e47 | 635 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
636 | %defattr(644,root,root,755) | |
67ad4c40 | 637 | %attr(754,root,root) /etc/rc.d/init.d/vboxadd |
74268e47 | 638 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* |
639 | ||
d1c4ec5b | 640 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 641 | %defattr(644,root,root,755) |
67ad4c40 | 642 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 643 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 644 | |
1dda2f69 | 645 | %files -n kernel%{_alt_kernel}-misc-vboxnetflt |
646 | %defattr(644,root,root,755) | |
11848f5b | 647 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetflt |
1dda2f69 | 648 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko* |
649 | ||
74268e47 | 650 | %files -n kernel%{_alt_kernel}-misc-vboxvfs |
651 | %defattr(644,root,root,755) | |
11848f5b | 652 | %attr(754,root,root) /etc/rc.d/init.d/vboxvfs |
70ce4861 | 653 | /etc/modprobe.d/vboxvfs.conf |
74268e47 | 654 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* |
67a4f3c1 | 655 | |
656 | %files -n kernel%{_alt_kernel}-misc-vboxvideo | |
657 | %defattr(644,root,root,755) | |
658 | /lib/modules/%{_kernel_ver}/misc/vboxvideo.ko* | |
659 | %endif |