]>
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 | |
05f9288a | 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} |
69a873b5 | 31 | Version: 2.0.4 |
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 | |
69a873b5 | 37 | # Source0-md5: 89db3f4a227f97c1e080035fbadd10c8 |
cbf22c1f | 38 | #Source1: http://download.virtualbox.org/virtualbox/%{version}/UserManual.pdf |
39 | Source1: UserManual.pdf | |
69a873b5 | 40 | # Source1-md5: 2e4d4c3c401dc00742337afb69d8b7a8 |
cbf22c1f | 41 | #Source2: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso |
42 | Source2: VBoxGuestAdditions_%{version}.iso | |
69a873b5 | 43 | # Source2-md5: 1ad9769ff889b8b162888bcb6c6592ce |
67ad4c40 | 44 | Source3: %{pname}-vboxdrv.init |
45 | Source4: %{pname}-vboxadd.init | |
46 | Source5: %{pname}.desktop | |
47 | Source6: %{pname}.sh | |
bd3faca3 | 48 | Patch0: %{pname}-configure.patch |
49 | Patch1: %{pname}-qt-paths.patch | |
50 | Patch2: %{pname}-shared-libstdc++.patch | |
51 | Patch3: %{pname}-disable-xclient-build.patch | |
fddcb741 | 52 | Patch4: %{pname}-configure-spaces.patch |
48363591 | 53 | URL: http://www.virtualbox.org/ |
83ffcfa8 | 54 | %if %{with userspace} |
523e7409 | 55 | BuildRequires: OpenGL-devel |
cef75615 | 56 | BuildRequires: QtGui-devel |
c574efad | 57 | BuildRequires: SDL-devel >= 1.2.7 |
ba702945 | 58 | BuildRequires: alsa-lib-devel >= 1.0.6 |
e5aaadde | 59 | BuildRequires: bash |
48363591 | 60 | BuildRequires: bcc |
61 | BuildRequires: bin86 | |
eba4b2aa | 62 | BuildRequires: gcc >= 5:3.2.3 |
81edd32c | 63 | %if "%{pld_release}" == "th" |
b29bcb41 | 64 | BuildRequires: compat-gcc-34 |
ae1bbc88 | 65 | %endif |
48363591 | 66 | BuildRequires: iasl |
83ffcfa8 | 67 | %endif |
0d1f6cd5 AM |
68 | %if %{with dist_kernel} |
69 | BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20 | |
0d1f6cd5 | 70 | %endif |
83ffcfa8 | 71 | %if %{with userspace} |
48363591 | 72 | BuildRequires: libIDL-devel |
ff01a704 | 73 | BuildRequires: libpng-devel >= 1.2.5 |
d22f0a53 | 74 | BuildRequires: libstdc++-devel >= 5:3.2.3 |
48363591 | 75 | BuildRequires: libuuid-devel |
ba702945 | 76 | BuildRequires: libxml2-devel >= 2.6.26 |
76ea5ecb | 77 | BuildRequires: libxslt-devel >= 1.1.17 |
ba702945 | 78 | BuildRequires: libxslt-progs >= 1.1.17 |
0bf43862 | 79 | BuildRequires: pkgconfig |
ba702945 | 80 | BuildRequires: pulseaudio-devel >= 0.9.0 |
523e7409 | 81 | BuildRequires: python-devel |
250583d4 | 82 | BuildRequires: qt4-build >= 4.2.0 |
2700662b | 83 | BuildRequires: qt4-linguist |
83ffcfa8 | 84 | %endif |
85 | BuildRequires: rpmbuild(macros) >= 1.379 | |
86 | %if %{with userspace} | |
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 |
a8a9032d ER |
91 | %if "%{pld_release}" == "ac" |
92 | BuildRequires: XFree86-devel | |
93 | %else | |
eba4b2aa | 94 | BuildRequires: xorg-lib-libXcursor-devel |
523e7409 | 95 | BuildRequires: xorg-lib-libXmu-devel |
a8a9032d | 96 | %endif |
e5aaadde | 97 | BuildRequires: zlib-devel >= 1.2.1 |
23d9d34e | 98 | %ifarch %{x8664} |
99 | BuildRequires: gcc-multilib | |
51d2ebb8 | 100 | BuildRequires: glibc-devel(i686) |
23d9d34e | 101 | BuildRequires: libstdc++-multilib-devel |
23d9d34e | 102 | %endif |
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 |
93ccc0e8 | 177 | Summary: Linux kernel module for VirtualBox OSE |
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 | |
abb636b9 | 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 | |
93ccc0e8 | 190 | Linux kernel module vboxadd for VirtualBox OSE. |
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 |
93ccc0e8 | 196 | Summary: Linux kernel module for VirtualBox OSE |
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 | |
93ccc0e8 | 209 | Linux kernel module vboxdrv for VirtualBox OSE. |
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 |
93ccc0e8 | 215 | Summary: Linux kernel module 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 | |
221 | %if %{with dist_kernel} | |
222 | %requires_releq_kernel | |
223 | Requires(postun): %releq_kernel | |
224 | %endif | |
fe3d1798 | 225 | Provides: kernel(vboxvfs) = %{version}-%{rel} |
74268e47 | 226 | |
227 | %description -n kernel%{_alt_kernel}-misc-vboxvfs | |
93ccc0e8 | 228 | Linux kernel module vboxvfs for VirtualBox OSE. |
74268e47 | 229 | |
230 | %description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8 | |
231 | Moduł jądra Linuksa vboxvfs dla VirtualBoksa. | |
232 | ||
09c79ddb | 233 | %package -n xorg-driver-input-vboxmouse |
93ccc0e8 | 234 | Summary: X.org mouse driver for VirtualBox OSE guest OS |
fe3d1798 JB |
235 | Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBoksie |
236 | Release: %{rel} | |
09c79ddb | 237 | Group: X11/Applications |
238 | Requires: xorg-xserver-server >= 1.0.99.901 | |
239 | ||
240 | %description -n xorg-driver-input-vboxmouse | |
93ccc0e8 | 241 | X.org mouse driver for VirtualBox OSE guest OS. |
09c79ddb | 242 | |
243 | %description -n xorg-driver-input-vboxmouse -l pl.UTF-8 | |
fe3d1798 | 244 | Sterownik myszy dla systemu gościa w VirtualBoksie. |
09c79ddb | 245 | |
246 | %package -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 247 | Summary: X.org video driver for VirtualBox OSE guest OS |
fe3d1798 JB |
248 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie |
249 | Release: %{rel} | |
09c79ddb | 250 | Group: X11/Applications |
251 | Requires: xorg-xserver-server >= 1.0.99.901 | |
252 | ||
253 | %description -n xorg-driver-video-vboxvideo | |
93ccc0e8 | 254 | X.org video driver for VirtualBox OSE guest OS. |
09c79ddb | 255 | |
256 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
fe3d1798 | 257 | Sterownik grafiki dla systemu gościa w VirtualBoksie. |
09c79ddb | 258 | |
48363591 | 259 | %prep |
deb50564 | 260 | %setup -q -n %{pname}-%{version} |
e709ce6b | 261 | %patch0 -p1 |
262 | %patch1 -p1 | |
74268e47 | 263 | %patch2 -p1 |
23d9d34e | 264 | |
33233365 | 265 | %ifarch %{x8664} |
266 | %patch3 -p1 | |
267 | %endif | |
268 | ||
fddcb741 ER |
269 | %patch4 -p1 |
270 | ||
33233365 | 271 | cat <<'EOF' > udev.conf |
272 | KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660" | |
67ad4c40 | 273 | KERNEL=="vboxadd", NAME="%k", GROUP="vbox", MODE="0660" |
33233365 | 274 | EOF |
23d9d34e | 275 | |
fdd1c725 | 276 | install %{SOURCE1} . |
fa19f650 | 277 | |
83ffcfa8 | 278 | rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD |
279 | ../src/VBox/Additions/linux/export_modules modules.tar.gz | |
280 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
281 | ../src/VBox/HostDrivers/Support/linux/export_modules modules.tar.gz && \ | |
282 | tar -zxf modules.tar.gz && rm -f modules.tar.gz | |
e76cc0cf | 283 | sed -i -e 's/-DVBOX_WITH_HARDENING//g' vboxdrv/Makefile |
05f1b1f5 | 284 | |
fddcb741 | 285 | %build |
83ffcfa8 | 286 | %if %{with userspace} |
106d8451 | 287 | ./configure \ |
ae1bbc88 | 288 | --with-gcc="%{__cc}" \ |
a8a9032d | 289 | %if "%{pld_release}" == "th" |
2700662b | 290 | --with-gcc-compat="gcc-3.4" \ |
291 | %endif | |
ae1bbc88 | 292 | --with-g++="%{__cxx}" \ |
5a497466 | 293 | --disable-hardening \ |
294 | --disable-kmods \ | |
295 | --disable-qt3 | |
48363591 | 296 | |
0864aefd | 297 | . ./env.sh && \ |
c6fdbed7 | 298 | kmk -j1 %{?with_verbose:KBUILD_VERBOSE=3} |
48363591 | 299 | %endif |
74268e47 | 300 | |
301 | %if %{with kernel} | |
83ffcfa8 | 302 | cd PLD-MODULE-BUILD |
74268e47 | 303 | %build_kernel_modules -m vboxadd -C vboxadd |
304 | %build_kernel_modules -m vboxdrv -C vboxdrv | |
0da669b5 | 305 | cp -a vboxadd/Module.symvers vboxvfs |
83ffcfa8 | 306 | %build_kernel_modules -m vboxvfs -C vboxvfs -c |
74268e47 | 307 | cd .. |
d1c4ec5b | 308 | %endif |
48363591 | 309 | |
310 | %install | |
311 | rm -rf $RPM_BUILD_ROOT | |
312 | ||
d1c4ec5b | 313 | %if %{with userspace} |
48363591 | 314 | install -d \ |
d89980c7 | 315 | $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ |
67ad4c40 | 316 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
a70507fb | 317 | |
67ad4c40 | 318 | install %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/VirtualBox-wrapper.sh |
d9390c3b | 319 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox,vditool}; do |
fe3d1798 | 320 | install out/linux.%{outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f |
fdd1c725 | 321 | ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f |
05f1b1f5 | 322 | done |
323 | ||
9a6c7384 AM |
324 | %ifarch %{x8664} |
325 | install out/linux.%{outdir}/release/bin/VBox*.rel \ | |
326 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox | |
327 | %endif | |
328 | ||
5a497466 | 329 | install out/linux.%{outdir}/release/bin/VBox*.so \ |
48363591 | 330 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
d9390c3b | 331 | install out/linux.%{outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0}} \ |
48363591 | 332 | $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
333 | ||
916ab34d | 334 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions |
8833bce1 | 335 | install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls |
916ab34d | 336 | |
5877f605 | 337 | install %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/VirtualBox/additions/VBoxGuestAdditions.iso |
fe3d1798 JB |
338 | cp -a out/linux.%{outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox |
339 | cp -a out/linux.%{outdir}/release/bin/nls/* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls | |
8833bce1 | 340 | |
fe3d1798 | 341 | install out/linux.%{outdir}/release/bin/additions/mountvboxsf \ |
09c79ddb | 342 | $RPM_BUILD_ROOT%{_bindir} |
343 | ||
c7f37a9d ER |
344 | %ifnarch %{x8664} |
345 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} | |
e88599a1 | 346 | install out/linux.%{outdir}/release/bin/additions/vboxmouse_drv_15.so \ |
09c79ddb | 347 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/input/vboxmouse_drv.so |
e88599a1 | 348 | install out/linux.%{outdir}/release/bin/additions/vboxvideo_drv_15.so \ |
09c79ddb | 349 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so |
c7f37a9d | 350 | %endif |
09c79ddb | 351 | |
fe3d1798 | 352 | install out/linux.%{outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png |
67ad4c40 | 353 | install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop |
d1c4ec5b | 354 | |
33233365 | 355 | install -d $RPM_BUILD_ROOT/etc/udev/rules.d |
356 | install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules | |
da083e45 | 357 | %endif |
33233365 | 358 | |
da083e45 | 359 | %if %{with kernel} |
70fe9387 | 360 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
67ad4c40 | 361 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv |
362 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxadd | |
83ffcfa8 | 363 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxadd/vboxadd -d misc |
364 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc | |
365 | %install_kernel_modules -m PLD-MODULE-BUILD/vboxvfs/vboxvfs -d misc | |
d1c4ec5b | 366 | %endif |
05f1b1f5 | 367 | |
48363591 | 368 | %clean |
369 | rm -rf $RPM_BUILD_ROOT | |
370 | ||
3b63d3e8 | 371 | %pre |
372 | %groupadd -g 221 -r -f vbox | |
373 | ||
14561782 | 374 | %post |
d8ed80f4 | 375 | cat << 'EOF' |
376 | NOTE: You must also install kernel module for this software to work | |
7d4acef5 ER |
377 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} |
378 | kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
379 | kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
380 | kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
d8ed80f4 | 381 | etc. |
382 | ||
7d4acef5 | 383 | Depending on which kernel brand You use. |
d8ed80f4 | 384 | |
385 | EOF | |
386 | ||
3b63d3e8 | 387 | %postun |
388 | if [ "$1" = "0" ]; then | |
389 | %groupremove vbox | |
390 | fi | |
391 | ||
74268e47 | 392 | %post -n kernel%{_alt_kernel}-misc-vboxadd |
393 | %depmod %{_kernel_ver} | |
270f67bc | 394 | /sbin/chkconfig --add vboxadd |
395 | %service vboxadd restart "VirtualBox OSE guest additions driver" | |
74268e47 | 396 | |
397 | %postun -n kernel%{_alt_kernel}-misc-vboxadd | |
398 | %depmod %{_kernel_ver} | |
399 | ||
270f67bc | 400 | %preun -n kernel%{_alt_kernel}-misc-vboxadd |
401 | if [ "$1" = "0" ]; then | |
402 | %service vboxadd stop | |
403 | /sbin/chkconfig --del vboxadd | |
404 | fi | |
405 | ||
48363591 | 406 | %post -n kernel%{_alt_kernel}-misc-vboxdrv |
407 | %depmod %{_kernel_ver} | |
270f67bc | 408 | /sbin/chkconfig --add vboxdrv |
409 | %service vboxdrv restart "VirtualBox OSE driver" | |
48363591 | 410 | |
411 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
412 | %depmod %{_kernel_ver} | |
413 | ||
270f67bc | 414 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv |
415 | if [ "$1" = "0" ]; then | |
416 | %service vboxdrv stop | |
417 | /sbin/chkconfig --del vboxdrv | |
418 | fi | |
419 | ||
74268e47 | 420 | %post -n kernel%{_alt_kernel}-misc-vboxvfs |
421 | %depmod %{_kernel_ver} | |
422 | ||
423 | %postun -n kernel%{_alt_kernel}-misc-vboxvfs | |
424 | %depmod %{_kernel_ver} | |
425 | ||
d1c4ec5b | 426 | %if %{with userspace} |
48363591 | 427 | %files |
428 | %defattr(644,root,root,755) | |
7d1c0a63 | 429 | %doc UserManual.pdf |
8833bce1 | 430 | %dir %{_libdir}/VirtualBox |
916ab34d | 431 | %dir %{_libdir}/VirtualBox/additions |
8833bce1 | 432 | %dir %{_libdir}/VirtualBox/components |
433 | %dir %{_libdir}/VirtualBox/nls | |
4c18fded | 434 | %attr(755,root,root) %{_bindir}/mountvboxsf |
435 | %attr(755,root,root) %{_bindir}/vditool | |
48363591 | 436 | %attr(755,root,root) %{_bindir}/VBox* |
437 | %attr(755,root,root) %{_bindir}/VirtualBox | |
fdd1c725 | 438 | %attr(755,root,root) %{_libdir}/VirtualBox/vditool |
05f1b1f5 | 439 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC |
440 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE | |
8bb99fd5 | 441 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxHeadless |
05f1b1f5 | 442 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage |
443 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL | |
8bb99fd5 | 444 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl |
05f1b1f5 | 445 | %attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD |
8833bce1 | 446 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so |
9a6c7384 AM |
447 | %ifarch %{x8664} |
448 | %attr(755,root,root) %{_libdir}/VirtualBox/VBox*.rel | |
449 | %endif | |
fdd1c725 | 450 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox |
451 | %attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh | |
05f1b1f5 | 452 | %{_libdir}/VirtualBox/*.gc |
453 | %{_libdir}/VirtualBox/*.r0 | |
916ab34d | 454 | %{_libdir}/VirtualBox/additions/* |
05f1b1f5 | 455 | %{_libdir}/VirtualBox/components/* |
89ce7412 | 456 | %lang(ar) %{_libdir}/VirtualBox/nls/*_ar.qm |
72d5ea57 | 457 | %lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm |
89ce7412 | 458 | %lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm |
459 | %lang(de) %{_libdir}/VirtualBox/nls/*_de.qm | |
460 | %lang(es) %{_libdir}/VirtualBox/nls/*_es.qm | |
461 | %lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm | |
462 | %lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm | |
463 | %lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm | |
464 | %lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm | |
72d5ea57 | 465 | %lang(id) %{_libdir}/VirtualBox/nls/*_id.qm |
89ce7412 | 466 | %lang(it) %{_libdir}/VirtualBox/nls/*_it.qm |
467 | %lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm | |
468 | %lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm | |
72d5ea57 | 469 | %lang(nl) %{_libdir}/VirtualBox/nls/*_nl.qm |
89ce7412 | 470 | %lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm |
52b59a1b | 471 | %lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm |
89ce7412 | 472 | %lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm |
89ce7412 | 473 | %lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm |
474 | %lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm | |
475 | %lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm | |
72d5ea57 | 476 | %lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm |
89ce7412 | 477 | %lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm |
72d5ea57 | 478 | %lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm |
89ce7412 | 479 | %lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm |
480 | %lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm | |
d89980c7 | 481 | %{_pixmapsdir}/VBox.png |
bd3faca3 | 482 | %{_desktopdir}/%{pname}.desktop |
09c79ddb | 483 | |
abb636b9 | 484 | %files udev |
485 | %defattr(644,root,root,755) | |
486 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
487 | ||
23d9d34e | 488 | # Drivers are for Guest OS, which is 32-bit. |
489 | %ifnarch %{x8664} | |
09c79ddb | 490 | %files -n xorg-driver-input-vboxmouse |
491 | %defattr(644,root,root,755) | |
492 | %attr(755,root,root) %{_libdir}/xorg/modules/input/vboxmouse_drv.so | |
493 | ||
494 | %files -n xorg-driver-video-vboxvideo | |
495 | %defattr(644,root,root,755) | |
496 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
d1c4ec5b | 497 | %endif |
23d9d34e | 498 | %endif |
48363591 | 499 | |
d1c4ec5b | 500 | %if %{with kernel} |
74268e47 | 501 | %files -n kernel%{_alt_kernel}-misc-vboxadd |
502 | %defattr(644,root,root,755) | |
67ad4c40 | 503 | %attr(754,root,root) /etc/rc.d/init.d/vboxadd |
74268e47 | 504 | /lib/modules/%{_kernel_ver}/misc/vboxadd.ko* |
505 | ||
d1c4ec5b | 506 | %files -n kernel%{_alt_kernel}-misc-vboxdrv |
48363591 | 507 | %defattr(644,root,root,755) |
67ad4c40 | 508 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv |
d1c4ec5b | 509 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* |
74268e47 | 510 | |
511 | %files -n kernel%{_alt_kernel}-misc-vboxvfs | |
512 | %defattr(644,root,root,755) | |
513 | /lib/modules/%{_kernel_ver}/misc/vboxvfs.ko* | |
05f1b1f5 | 514 | %endif |