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