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