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