]>
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 | |
e7bc2c2a | 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} |
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 | ||
5a497466 | 363 | install out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 364 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
d9390c3b | 365 | install out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 366 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
367 | ||
916ab34d | 368 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 369 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 370 | |
5877f605 | 371 | install %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
372 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
373 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 374 | |
fe3d1798 | 375 | install out/linux.%{outdir}/release/bin/additions/mountvboxsf \ |
09c79ddb | 376 | $RPM_BUILD_ROOT%{_bindir} |
377 | ||
c7f37a9d | 378 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
e88599a1 | 379 | install out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_15.so \ |
09c79ddb | 380 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
e88599a1 | 381 | install out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_15.so \ |
09c79ddb | 382 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
383 | ||
fe3d1798 | 384 | install out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
11848f5b | 385 | install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop |
d1c4ec5b | 386 | |
33233365 | 387 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
388 | install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules | |
da083e45 | 389 | %endif |
33233365 | 390 | |
da083e45 | 391 | %if %{with kernel} |
70fe9387 | 392 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
67ad4c40 | 393 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
394 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd | |
11848f5b | 395 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt |
396 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxvfs | |
83ffcfa8 | 397 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc |
398 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc | |
1dda2f69 | 399 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxnetflt/vboxnetflt -d misc |
83ffcfa8 | 400 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc |
d1c4ec5b | 401 | %endif |
05f1b1f5 | 402 | |
48363591 | 403 | %clean |
404 | rm -rf $RPM_BUILD_ROOT | |
405 | ||
3b63d3e8 | 406 | %pre |
407 | %groupadd -g 221 -r -f vbox | |
408 | ||
14561782 | 409 | %post |
d8ed80f4 | 410 | cat << 'EOF' |
411 | NOTE: You must also install kernel module for this software to work | |
7d4acef5 ER |
412 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} |
413 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
414 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
415 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
d8ed80f4 | 416 | etc. |
417 | ||
7d4acef5 | 418 | Depending on which kernel brand You use. |
d8ed80f4 | 419 | |
420 | EOF | |
421 | ||
3b63d3e8 | 422 | %postun |
423 | if [ "$1" = "0" ]; then | |
424 | %groupremove vbox | |
425 | fi | |
426 | ||
74268e47 | 427 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
428 | %depmod %{_kernel_ver} | |
270f67bc | 429 | /sbin/chkconfig --add vboxadd |
430 | %service vboxadd restart "VirtualBox OSE guest additions driver" | |
74268e47 | 431 | |
432 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
433 | %depmod %{_kernel_ver} | |
434 | ||
270f67bc | 435 | %preun -n kernel%{_alt_kernel}-misc-vboxadd |
436 | if [ "$1" = "0" ]; then | |
437 | %service vboxadd stop | |
438 | /sbin/chkconfig --del vboxadd | |
439 | fi | |
440 | ||
48363591 | 441 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
442 | %depmod %{_kernel_ver} | |
270f67bc | 443 | /sbin/chkconfig --add vboxdrv |
444 | %service vboxdrv restart "VirtualBox OSE driver" | |
48363591 | 445 | |
446 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
447 | %depmod %{_kernel_ver} | |
448 | ||
270f67bc | 449 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
450 | if [ "$1" = "0" ]; then | |
451 | %service vboxdrv stop | |
452 | /sbin/chkconfig --del vboxdrv | |
453 | fi | |
454 | ||
1dda2f69 | 455 | %post -n kernel%{_alt_kernel}-misc-vboxnetflt |
456 | %depmod %{_kernel_ver} | |
11848f5b | 457 | /sbin/chkconfig --add vboxnetflt |
458 | %service vboxdrv restart "VirtualBox OSE Network Filter driver" | |
1dda2f69 | 459 | |
460 | %postun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
461 | %depmod %{_kernel_ver} | |
462 | ||
11848f5b | 463 | %preun -n kernel%{_alt_kernel}-misc-vboxnetflt |
464 | if [ "$1" = "0" ]; then | |
465 | %service vboxnetflt stop | |
466 | /sbin/chkconfig --del vboxnetflt | |
467 | fi | |
468 | ||
74268e47 | 469 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
470 | %depmod %{_kernel_ver} | |
ca8701ad | 471 | /sbin/chkconfig --add vboxvfs |
472 | %service vboxvfs restart "VirtualBox OSE guest additions VFS driver" | |
74268e47 | 473 | |
474 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
475 | %depmod %{_kernel_ver} | |
476 | ||
ca8701ad | 477 | %preun -n kernel%{_alt_kernel}-misc-vboxvfs |
478 | if [ "$1" = "0" ]; then | |
479 | %service vboxvfs stop | |
480 | /sbin/chkconfig --del vboxvfs | |
481 | fi | |
482 | ||
d1c4ec5b | 483 | %if %{with userspace} |
48363591 | 484 | %files |
485 | %defattr(644,root,root,755) | |
7d1c0a63 | 486 | %doc UserManual.pdf |
8833bce1 | 487 | %dir %{_libdir}/VirtualBox |
916ab34d | 488 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 489 | %dir %{_libdir}/VirtualBox/components |
490 | %dir %{_libdir}/VirtualBox/nls | |
4c18fded | 491 | %attr(755,root,root) %{_bindir}/mountvboxsf |
48363591 | 492 | %attr(755,root,root) %{_bindir}/VBox* |
493 | %attr(755,root,root) %{_bindir}/VirtualBox | |
05f1b1f5 | 494 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
495 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 496 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 497 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
498 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
8bb99fd5 | 499 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 500 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
8833bce1 | 501 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so |
fdd1c725 | 502 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
503 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
05f1b1f5 | 504 | %{_libdir}/VirtualBox/*.gc |
505 | %{_libdir}/VirtualBox/*.r0 | |
916ab34d | 506 | %{_libdir}/VirtualBox/additions/* |
05f1b1f5 | 507 | %{_libdir}/VirtualBox/components/* |
89ce7412 | 508 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
72d5ea57 | 509 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 510 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
511 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm | |
512 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm | |
513 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
514 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
515 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
516 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 517 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 518 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
519 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
520 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm | |
72d5ea57 | 521 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 522 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 523 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 524 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 525 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
526 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
527 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 528 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 529 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 530 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
89ce7412 | 531 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
532 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 533 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 534 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 535 | |
abb636b9 | 536 | %files udev |
537 | %defattr(644,root,root,755) | |
538 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
539 | ||
09c79ddb | 540 | %files -n xorg-driver-input-vboxmouse |
541 | %defattr(644,root,root,755) | |
542 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
543 | ||
544 | %files -n xorg-driver-video-vboxvideo | |
545 | %defattr(644,root,root,755) | |
546 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 547 | %endif |
48363591 | 548 | |
d1c4ec5b | 549 | %if %{with kernel} |
74268e47 | 550 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
551 | %defattr(644,root,root,755) | |
67ad4c40 | 552 | %attr(754,root,root) /etc/rc.d/init.d/vboxadd |
74268e47 | 553 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* |
554 | ||
d1c4ec5b | 555 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 556 | %defattr(644,root,root,755) |
67ad4c40 | 557 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 558 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 559 | |
1dda2f69 | 560 | %files -n kernel%{_alt_kernel}-misc-vboxnetflt |
561 | %defattr(644,root,root,755) | |
11848f5b | 562 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetflt |
1dda2f69 | 563 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko* |
564 | ||
74268e47 | 565 | %files -n kernel%{_alt_kernel}-misc-vboxvfs |
566 | %defattr(644,root,root,755) | |
11848f5b | 567 | %attr(754,root,root) /etc/rc.d/init.d/vboxvfs |
74268e47 | 568 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* |
05f1b1f5 | 569 | %endif |