]>
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 | |
0d1e1edd | 26 | %define rel 8 |
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} |
0b0842e2 | 31 | Version: 2.1.4 |
fe3d1798 | 32 | Release: %{rel} |
48363591 | 33 | License: GPL v2 |
34 | Group: Applications/Emulators | |
0b0842e2 AF |
35 | Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}-OSE.tar.bz2 |
36 | # Source0-md5: 272978b266007dda1942ea56b69daf31 | |
37 | Source1: http://download.virtualbox.org/virtualbox/%{version}/UserManual.pdf | |
38 | # Source1-md5: 6d6709fa2a9cb3dfad8c7ad7cd43be32 | |
39 | Source2: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso | |
40 | # Source2-md5: 071ba625b567979a86f75e1c640c4542 | |
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 | |
bd3faca3 | 47 | Patch0: %{pname}-configure.patch |
48 | Patch1: %{pname}-qt-paths.patch | |
49 | Patch2: %{pname}-shared-libstdc++.patch | |
50 | Patch3: %{pname}-disable-xclient-build.patch | |
fddcb741 | 51 | Patch4: %{pname}-configure-spaces.patch |
1dda2f69 | 52 | Patch6: %{pname}-vboxnetflt_export.patch |
48363591 | 53 | URL: http://www.virtualbox.org/ |
ce9843cd | 54 | BuildRequires: rpmbuild(macros) >= 1.379 |
83ffcfa8 | 55 | %if %{with userspace} |
ce9843cd ER |
56 | %ifarch %{x8664} |
57 | BuildRequires: gcc-multilib | |
58 | BuildRequires: glibc-devel(i686) | |
59 | BuildRequires: libstdc++-multilib-devel | |
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 | |
523e7409 | 67 | BuildRequires: OpenGL-devel |
cef75615 | 68 | BuildRequires: QtGui-devel |
2d17bb72 | 69 | BuildRequires: QtNetwork-devel |
c574efad | 70 | BuildRequires: SDL-devel >= 1.2.7 |
9a1cb119 | 71 | BuildRequires: acpica |
ba702945 | 72 | BuildRequires: alsa-lib-devel >= 1.0.6 |
e5aaadde | 73 | BuildRequires: bash |
48363591 | 74 | BuildRequires: bcc |
75 | BuildRequires: bin86 | |
eba4b2aa | 76 | BuildRequires: gcc >= 5:3.2.3 |
48363591 | 77 | BuildRequires: libIDL-devel |
ff01a704 | 78 | BuildRequires: libpng-devel >= 1.2.5 |
d22f0a53 | 79 | BuildRequires: libstdc++-devel >= 5:3.2.3 |
48363591 | 80 | BuildRequires: libuuid-devel |
ba702945 | 81 | BuildRequires: libxml2-devel >= 2.6.26 |
76ea5ecb | 82 | BuildRequires: libxslt-devel >= 1.1.17 |
ba702945 | 83 | BuildRequires: libxslt-progs >= 1.1.17 |
0bf43862 | 84 | BuildRequires: pkgconfig |
ba702945 | 85 | BuildRequires: pulseaudio-devel >= 0.9.0 |
523e7409 | 86 | BuildRequires: python-devel |
250583d4 | 87 | BuildRequires: qt4-build >= 4.2.0 |
2700662b | 88 | BuildRequires: qt4-linguist |
1e840a77 | 89 | BuildRequires: sed >= 4.0 |
0bf43862 | 90 | BuildRequires: which |
e5aaadde | 91 | BuildRequires: xalan-c-devel >= 1.10.0 |
e5aaadde | 92 | BuildRequires: xerces-c-devel >= 2.6.0 |
93 | BuildRequires: zlib-devel >= 1.2.1 | |
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 | |
ea074a55 | 187 | Moduł jądra Linuksa vboxadd dla VirtualBoksa OSE - dodatki dla |
188 | systemu 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 | |
ea074a55 | 228 | Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik filtrowania |
229 | sieci 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 | |
ea074a55 | 249 | Moduł jądra Linuksa dla VirtualBoksa OSE - dostęp do plików |
250 | systemu 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 |
257 | Requires: xorg-xserver-server >= 1.0.99.901 | |
258 | ||
259 | %description -n xorg-driver-input-vboxmouse | |
93ccc0e8 | 260 | X.org mouse driver for VirtualBox OSE guest OS. |
09c79ddb | 261 | |
262 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
fe3d1798 | 263 | Sterownik myszy dla systemu gościa w VirtualBoksie. |
09c79ddb | 264 | |
265 | %package -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 266 | Summary: X.org video driver for VirtualBox OSE guest OS |
ea074a55 | 267 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie OSE |
fe3d1798 | 268 | Release: %{rel} |
09c79ddb | 269 | Group: X11/Applications |
270 | Requires: xorg-xserver-server >= 1.0.99.901 | |
271 | ||
272 | %description -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 273 | X.org video driver for VirtualBox OSE guest OS. |
09c79ddb | 274 | |
275 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
ea074a55 | 276 | Sterownik grafiki dla systemu gościa w VirtualBoksie OSE. |
09c79ddb | 277 | |
48363591 | 278 | %prep |
506ebac4 | 279 | %setup -q -n %{pname}-%{version}_OSE |
e709ce6b | 280 | %patch0 -p1 |
281 | %patch1 -p1 | |
74268e47 | 282 | %patch2 -p1 |
23d9d34e | 283 | |
33233365 | 284 | %ifarch %{x8664} |
285 | %patch3 -p1 | |
286 | %endif | |
287 | ||
fddcb741 | 288 | %patch4 -p1 |
1dda2f69 | 289 | %patch6 -p1 |
fddcb741 | 290 | |
33233365 | 291 | cat <<'EOF' > udev.conf |
292 | KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660" | |
67ad4c40 | 293 | KERNEL=="vboxadd", NAME="%k", GROUP="vbox", MODE="0660" |
33233365 | 294 | EOF |
23d9d34e | 295 | |
fdd1c725 | 296 | install %{SOURCE1} . |
11848f5b | 297 | sed 's#@LIBDIR@#%{_libdir}#' < %{SOURCE8} > VirtualBox-wrapper.sh |
fa19f650 | 298 | |
83ffcfa8 | 299 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD |
300 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
301 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
f2dd3ab3 | 302 | ../src/VBox/HostDrivers/linux/export_modules modules.tar.gz --without-hardening && \ |
83ffcfa8 | 303 | tar -zxf modules.tar.gz && rm -f modules.tar.gz |
39838f8c | 304 | #./src/VBox/HostDrivers/Support/linux/Makefile:70: |
305 | #./PLD-MODULE-BUILD/vboxdrv/Makefile:70: | |
306 | ||
05f1b1f5 | 307 | |
fddcb741 | 308 | %build |
83ffcfa8 | 309 | %if %{with userspace} |
106d8451 | 310 | ./configure \ |
ae1bbc88 | 311 | --with-gcc="%{__cc}" \ |
312 | --with-g++="%{__cxx}" \ | |
5a497466 | 313 | --disable-hardening \ |
314 | --disable-kmods \ | |
315 | --disable-qt3 | |
48363591 | 316 | |
0864aefd | 317 | . ./env.sh && \ |
c6fdbed7 | 318 | kmk -j1 %{?with_verbose:KBUILD_VERBOSE=3} |
48363591 | 319 | %endif |
74268e47 | 320 | |
321 | %if %{with kernel} | |
83ffcfa8 | 322 | cd PLD-MODULE-BUILD |
74268e47 | 323 | %build_kernel_modules -m vboxadd -C vboxadd |
324 | %build_kernel_modules -m vboxdrv -C vboxdrv | |
1dda2f69 | 325 | %build_kernel_modules -m vboxnetflt -C vboxnetflt |
0da669b5 | 326 | cp -a vboxadd/Module.symvers vboxvfs |
83ffcfa8 | 327 | %build_kernel_modules -m vboxvfs -C vboxvfs -c |
74268e47 | 328 | cd .. |
d1c4ec5b | 329 | %endif |
48363591 | 330 | |
331 | %install | |
332 | rm -rf $RPM_BUILD_ROOT | |
333 | ||
d1c4ec5b | 334 | %if %{with userspace} |
48363591 | 335 | install -d \ |
d89980c7 | 336 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ |
67ad4c40 | 337 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
a70507fb | 338 | |
610c62ef | 339 | install VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
1dda2f69 | 340 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox}; do |
fe3d1798 | 341 | install out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 342 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 343 | done |
344 | ||
5a497466 | 345 | install out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 346 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
d9390c3b | 347 | install out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 348 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
349 | ||
916ab34d | 350 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 351 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 352 | |
5877f605 | 353 | install %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
354 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
355 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 356 | |
fe3d1798 | 357 | install out/linux.%{outdir}/release/bin/additions/mountvboxsf \ |
09c79ddb | 358 | $RPM_BUILD_ROOT%{_bindir} |
359 | ||
c7f37a9d | 360 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
e88599a1 | 361 | install out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_15.so \ |
09c79ddb | 362 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
e88599a1 | 363 | install out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_15.so \ |
09c79ddb | 364 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
365 | ||
fe3d1798 | 366 | install out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
11848f5b | 367 | install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop |
d1c4ec5b | 368 | |
33233365 | 369 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
370 | install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules | |
da083e45 | 371 | %endif |
33233365 | 372 | |
da083e45 | 373 | %if %{with kernel} |
70fe9387 | 374 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
67ad4c40 | 375 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
376 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd | |
11848f5b | 377 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt |
378 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxvfs | |
83ffcfa8 | 379 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc |
380 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc | |
1dda2f69 | 381 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxnetflt/vboxnetflt -d misc |
83ffcfa8 | 382 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc |
d1c4ec5b | 383 | %endif |
05f1b1f5 | 384 | |
48363591 | 385 | %clean |
386 | rm -rf $RPM_BUILD_ROOT | |
387 | ||
3b63d3e8 | 388 | %pre |
389 | %groupadd -g 221 -r -f vbox | |
390 | ||
14561782 | 391 | %post |
d8ed80f4 | 392 | cat << 'EOF' |
393 | NOTE: You must also install kernel module for this software to work | |
7d4acef5 ER |
394 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} |
395 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
396 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
397 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
d8ed80f4 | 398 | etc. |
399 | ||
7d4acef5 | 400 | Depending on which kernel brand You use. |
d8ed80f4 | 401 | |
402 | EOF | |
403 | ||
3b63d3e8 | 404 | %postun |
405 | if [ "$1" = "0" ]; then | |
406 | %groupremove vbox | |
407 | fi | |
408 | ||
74268e47 | 409 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
410 | %depmod %{_kernel_ver} | |
270f67bc | 411 | /sbin/chkconfig --add vboxadd |
412 | %service vboxadd restart "VirtualBox OSE guest additions driver" | |
74268e47 | 413 | |
414 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
415 | %depmod %{_kernel_ver} | |
416 | ||
270f67bc | 417 | %preun -n kernel%{_alt_kernel}-misc-vboxadd |
418 | if [ "$1" = "0" ]; then | |
419 | %service vboxadd stop | |
420 | /sbin/chkconfig --del vboxadd | |
421 | fi | |
422 | ||
48363591 | 423 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
424 | %depmod %{_kernel_ver} | |
270f67bc | 425 | /sbin/chkconfig --add vboxdrv |
426 | %service vboxdrv restart "VirtualBox OSE driver" | |
48363591 | 427 | |
428 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
429 | %depmod %{_kernel_ver} | |
430 | ||
270f67bc | 431 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
432 | if [ "$1" = "0" ]; then | |
433 | %service vboxdrv stop | |
434 | /sbin/chkconfig --del vboxdrv | |
435 | fi | |
436 | ||
1dda2f69 | 437 | %post -n kernel%{_alt_kernel}-misc-vboxnetflt |
438 | %depmod %{_kernel_ver} | |
11848f5b | 439 | /sbin/chkconfig --add vboxnetflt |
440 | %service vboxdrv restart "VirtualBox OSE Network Filter driver" | |
1dda2f69 | 441 | |
442 | %postun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
443 | %depmod %{_kernel_ver} | |
444 | ||
11848f5b | 445 | %preun -n kernel%{_alt_kernel}-misc-vboxnetflt |
446 | if [ "$1" = "0" ]; then | |
447 | %service vboxnetflt stop | |
448 | /sbin/chkconfig --del vboxnetflt | |
449 | fi | |
450 | ||
74268e47 | 451 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
452 | %depmod %{_kernel_ver} | |
ca8701ad | 453 | /sbin/chkconfig --add vboxvfs |
454 | %service vboxvfs restart "VirtualBox OSE guest additions VFS driver" | |
74268e47 | 455 | |
456 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
457 | %depmod %{_kernel_ver} | |
458 | ||
ca8701ad | 459 | %preun -n kernel%{_alt_kernel}-misc-vboxvfs |
460 | if [ "$1" = "0" ]; then | |
461 | %service vboxvfs stop | |
462 | /sbin/chkconfig --del vboxvfs | |
463 | fi | |
464 | ||
d1c4ec5b | 465 | %if %{with userspace} |
48363591 | 466 | %files |
467 | %defattr(644,root,root,755) | |
7d1c0a63 | 468 | %doc UserManual.pdf |
8833bce1 | 469 | %dir %{_libdir}/VirtualBox |
916ab34d | 470 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 471 | %dir %{_libdir}/VirtualBox/components |
472 | %dir %{_libdir}/VirtualBox/nls | |
4c18fded | 473 | %attr(755,root,root) %{_bindir}/mountvboxsf |
48363591 | 474 | %attr(755,root,root) %{_bindir}/VBox* |
475 | %attr(755,root,root) %{_bindir}/VirtualBox | |
05f1b1f5 | 476 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
477 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 478 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 479 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
480 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
8bb99fd5 | 481 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 482 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
8833bce1 | 483 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so |
fdd1c725 | 484 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
485 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
05f1b1f5 | 486 | %{_libdir}/VirtualBox/*.gc |
487 | %{_libdir}/VirtualBox/*.r0 | |
916ab34d | 488 | %{_libdir}/VirtualBox/additions/* |
05f1b1f5 | 489 | %{_libdir}/VirtualBox/components/* |
89ce7412 | 490 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
72d5ea57 | 491 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 492 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
493 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm | |
11de52da | 494 | %lang(el) %{_libdir}/VirtualBox/nls/*_el.qm |
89ce7412 | 495 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm |
496 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
497 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
498 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
499 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 500 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 501 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
502 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
503 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm | |
72d5ea57 | 504 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 505 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 506 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 507 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 508 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
509 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
510 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 511 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 512 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 513 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
89ce7412 | 514 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
515 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 516 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 517 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 518 | |
abb636b9 | 519 | %files udev |
520 | %defattr(644,root,root,755) | |
521 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
522 | ||
09c79ddb | 523 | %files -n xorg-driver-input-vboxmouse |
524 | %defattr(644,root,root,755) | |
525 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
526 | ||
527 | %files -n xorg-driver-video-vboxvideo | |
528 | %defattr(644,root,root,755) | |
529 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 530 | %endif |
48363591 | 531 | |
d1c4ec5b | 532 | %if %{with kernel} |
74268e47 | 533 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
534 | %defattr(644,root,root,755) | |
67ad4c40 | 535 | %attr(754,root,root) /etc/rc.d/init.d/vboxadd |
74268e47 | 536 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* |
537 | ||
d1c4ec5b | 538 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 539 | %defattr(644,root,root,755) |
67ad4c40 | 540 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 541 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 542 | |
1dda2f69 | 543 | %files -n kernel%{_alt_kernel}-misc-vboxnetflt |
544 | %defattr(644,root,root,755) | |
11848f5b | 545 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetflt |
1dda2f69 | 546 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko* |
547 | ||
74268e47 | 548 | %files -n kernel%{_alt_kernel}-misc-vboxvfs |
549 | %defattr(644,root,root,755) | |
11848f5b | 550 | %attr(754,root,root) /etc/rc.d/init.d/vboxvfs |
74268e47 | 551 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* |
05f1b1f5 | 552 | %endif |