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