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