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