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