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