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