]> git.pld-linux.org Git - packages/VirtualBox-bin.git/blame - VirtualBox-bin.spec
- typo
[packages/VirtualBox-bin.git] / VirtualBox-bin.spec
CommitLineData
6b8b3a79 1#
af40882b 2%bcond_without dist_kernel # without distribution kernel
3%bcond_without kernel # don't build kernel module
4%bcond_without userspace # don't build userspace package
5%bcond_with verbose # verbose kernel mod build
6b8b3a79 6
7# disable debug - no symbols here
8%define _enable_debug_packages 0
ab8d962c 9%define rel 1
6b8b3a79 10%ifarch %{x8664}
11%define arch amd64
12%else
13%define arch x86
14%endif
15
ab8d962c 16%define prev 45846
6b8b3a79 17%define pname VirtualBox
18Summary: VirtualBox - x86 hardware virtualizer
19Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
20Name: %{pname}-bin
ab8d962c 21Version: 2.2.0
af40882b 22Release: %{rel}
6b8b3a79 23License: Free for non-commercial use, non-distributable
24Group: Applications/Emulators
25#Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}-%{prev}-Linux_%{arch}.run
26Source0: %{pname}-%{version}-%{prev}-Linux_%{arch}.run
27NoSource: 0
6b8b3a79 28#Source1: http://download.virtualbox.org/virtualbox/%{version}/UserManual.pdf
29Source1: UserManual.pdf
ab8d962c 30# Source1-md5: e8333e067d76901e39879ef301f545af
af40882b 31Source3: %{pname}-vboxdrv.init
32Source4: %{pname}-vboxadd.init
33Source5: %{pname}-vboxnetflt.init
34Source6: %{pname}-vboxvfs.init
35Source7: %{pname}.desktop
36Source8: %{pname}.sh
6b8b3a79 37URL: http://www.virtualbox.org/
a799f0e2 38%{?with_userspace:BuildRequires: ffmpeg-libs}
6b8b3a79 39BuildRequires: rpmbuild(macros) >= 1.379
40Requires(post,preun): /sbin/chkconfig
41Requires(postun): /usr/sbin/groupdel
42Requires(pre): /usr/bin/getgid
43Requires(pre): /usr/sbin/groupadd
44Suggests: gxmessage
45Provides: group(vbox)
46Conflicts: %{pname}
47ExclusiveArch: %{ix86} %{x8664}
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50%define _noautoreq libavcodec.so.51 libavformat.so.51
51
52%description
53Sun VirtualBox is a general-purpose full virtualizer for x86 hardware.
54Targeted at server, desktop and embedded use.
55
56Some of the features of VirtualBox are:
57
58Modularity: VirtualBox has an extremely modular design with
59well-defined internal programming interfaces and a client/server
60design. This makes it easy to control it from several interfaces at
61once: for example, you can start a virtual machine in a typical
62virtual machine GUI and then control that machine from the command
63line.
64
65Virtual machine descriptions in XML: the configuration settings of
66virtual machines are stored entirely in XML and are independent of the
67local machines. Virtual machine definitions can therefore easily be
68ported to other computers.
69
70%description -l pl.UTF-8
71Sun VirtualBox jest emulatorem sprzętu x86. Kierowany do zastosowań
72serwerowych, desktopowych oraz wbudowanych.
73
74Przykładowe cechy VirtualBoksa:
75
76Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z
77dobrze zaprojektowanym wewnętrznym interfejsem programowym typu
78klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą
79różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z
80poziomu interfejsu graficznego, a później kontrolować ją z linii
81poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co
82pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną.
83
84Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn
85wirtualnych są w całości przechowywane w XML-u i są niezależne od
86lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść
87konfigurację maszyny wirtualnej na inny komputer.
88
af40882b 89%package udev
90Summary: udev rules for VirtualBox OSE kernel modules
91Summary(pl.UTF-8): Reguły udev dla modułów jądra Linuksa dla VirtualBoksa
92Release: %{rel}
93Group: Base/Kernel
94Requires: udev-core
95
96%description udev
97udev rules for VirtualBox OSE kernel modules.
98
99%description udev -l pl.UTF-8
100Reguły udev dla modułów jądra Linuksa dla VirtualBoksa.
101
102%package -n kernel%{_alt_kernel}-misc-vboxadd
103Summary: VirtualBox OSE Guest Additions for Linux Module
104Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE
105Release: %{rel}@%{_kernel_ver_str}
106Group: Base/Kernel
107Requires(post,postun): /sbin/depmod
108Requires: dev >= 2.9.0-7
109%if %{with dist_kernel}
110%requires_releq_kernel
111Requires(postun): %releq_kernel
112%endif
113Provides: kernel(vboxadd) = %{version}-%{rel}
114
115%description -n kernel%{_alt_kernel}-misc-vboxadd
116VirtualBox OSE Guest Additions for Linux Module.
117
118%description -n kernel%{_alt_kernel}-misc-vboxadd -l pl.UTF-8
119Moduł jądra Linuksa vboxadd dla VirtualBoksa OSE - dodatki dla
120systemu gościa.
121
122%package -n kernel%{_alt_kernel}-misc-vboxdrv
123Summary: VirtualBox OSE Support Driver
124Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE
125Release: %{rel}@%{_kernel_ver_str}
126Group: Base/Kernel
127Requires(post,postun): /sbin/depmod
128Requires: dev >= 2.9.0-7
129%if %{with dist_kernel}
130%requires_releq_kernel
131Requires(postun): %releq_kernel
132%endif
133Provides: kernel(vboxdrv) = %{version}-%{rel}
134
135%description -n kernel%{_alt_kernel}-misc-vboxdrv
136VirtualBox OSE Support Driver.
137
138%description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8
139Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik wsparcia dla
140systemu głównego.
141
142%package -n kernel%{_alt_kernel}-misc-vboxnetflt
143Summary: VirtualBox OSE Guest Additions for Linux Module
144Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE
145Release: %{rel}@%{_kernel_ver_str}
146Group: Base/Kernel
147Requires(post,postun): /sbin/depmod
148Requires: dev >= 2.9.0-7
149Requires: kernel%{_alt_kernel}-misc-vboxdrv
150%if %{with dist_kernel}
151%requires_releq_kernel
152Requires(postun): %releq_kernel
153%endif
154Provides: kernel(vboxnetflt) = %{version}-%{rel}
155
156%description -n kernel%{_alt_kernel}-misc-vboxnetflt
157VirtualBox OSE Network Filter Driver.
158
159%description -n kernel%{_alt_kernel}-misc-vboxnetflt -l pl.UTF-8
160Moduł jądra Linuksa dla VirtualBoksa OSE - sterownik filtrowania
161sieci dla systemu głównego.
162
163%package -n kernel%{_alt_kernel}-misc-vboxvfs
164Summary: Host file system access VFS for VirtualBox OSE
165Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa OSE
166Release: %{rel}@%{_kernel_ver_str}
167Group: Base/Kernel
168Requires(post,postun): /sbin/depmod
169Requires: dev >= 2.9.0-7
170Requires: kernel%{_alt_kernel}-misc-vboxadd
171%if %{with dist_kernel}
172%requires_releq_kernel
173Requires(postun): %releq_kernel
174%endif
175Provides: kernel(vboxvfs) = %{version}-%{rel}
176
177%description -n kernel%{_alt_kernel}-misc-vboxvfs
178Host file system access VFS for VirtualBox OSE.
179
180%description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8
181Moduł jądra Linuksa dla VirtualBoksa OSE - dostęp do plików
182systemu głównego z poziomu systemu gościa.
183
184%package -n xorg-driver-input-vboxmouse
185Summary: X.org mouse driver for VirtualBox OSE guest OS
186Summary(pl.UTF-8): Sterownik myszy dla systemu gościa w VirtualBoksie OSE
187Release: %{rel}
188Group: X11/Applications
189Requires: xorg-xserver-server >= 1.0.99.901
190
191%description -n xorg-driver-input-vboxmouse
192X.org mouse driver for VirtualBox OSE guest OS.
193
194%description -n xorg-driver-input-vboxmouse -l pl.UTF-8
195Sterownik myszy dla systemu gościa w VirtualBoksie.
196
197%package -n xorg-driver-video-vboxvideo
198Summary: X.org video driver for VirtualBox OSE guest OS
199Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie OSE
200Release: %{rel}
201Group: X11/Applications
202Requires: xorg-xserver-server >= 1.0.99.901
203
204%description -n xorg-driver-video-vboxvideo
205X.org video driver for VirtualBox OSE guest OS.
206
207%description -n xorg-driver-video-vboxvideo -l pl.UTF-8
208Sterownik grafiki dla systemu gościa w VirtualBoksie OSE.
209
210
211
6b8b3a79 212%prep
213%setup -qcT
214%{__sh} %{SOURCE0} --noexec --keep
215%{__tar} -jxf install/VirtualBox.tar.bz2
216
af40882b 217cat <<'EOF' > udev.conf
218KERNEL=="vboxdrv", NAME="%k", GROUP="vbox", MODE="0660"
219KERNEL=="vboxadd", NAME="%k", GROUP="vbox", MODE="0660"
220EOF
221
6b8b3a79 222install %{SOURCE1} .
af40882b 223sed 's#@LIBDIR@#%{_libdir}#' < %{SOURCE8} > VirtualBox-wrapper.sh
224
225rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD
226cp -rdf ../src/* ./
227sed -i -e 's/-DVBOX_WITH_HARDENING//g' vboxdrv/Makefile
228sed -i -e 's/-DVBOX_WITH_HARDENING//g' vboxnetflt/Makefile
229
230%build
231%if %{with kernel}
232cd PLD-MODULE-BUILD
233%build_kernel_modules -m vboxdrv -C vboxdrv
ab8d962c 234cp -a vboxdrv/Module.symvers vboxnetflt/
af40882b 235%build_kernel_modules -m vboxnetflt -C vboxnetflt
236cd ..
237%endif
238
6b8b3a79 239
240%install
241rm -rf $RPM_BUILD_ROOT
242
af40882b 243%if %{with userspace}
6b8b3a79 244install -d \
245 $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \
ab8d962c 246 $RPM_BUILD_ROOT%{_libdir}/VirtualBox/components
6b8b3a79 247
248install VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_libdir}/VirtualBox
ab8d962c 249for f in {VBox{Headless,Manage,Net{AdpCtl,DHCP},SDL,SysInfo.sh,SVC,Tunctl,XPCOMIPCD,.sh},VirtualBox,rdesktop-vrdp,vboxwebsrv,webtest}; do
6b8b3a79 250 install $f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f
251 ln -s %{_libdir}/VirtualBox/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f
252done
253
ab8d962c 254install libQt*.so.* VBox*.so VirtualBox.so VRDPAuth.so \
6b8b3a79 255 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
256install VBox{DD,DD2}{GC.gc,R0.r0} VMM{GC.gc,R0.r0} \
257 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
258
ab8d962c
KK
259for f in *.so; do
260 ln -s %{_libdir}/VirtualBox/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/components/$f
261done
262
af40882b 263cp -a accessible additions components nls rdesktop-vrdp-keymaps $RPM_BUILD_ROOT%{_libdir}/VirtualBox
6b8b3a79 264install License-7.html $RPM_BUILD_ROOT%{_libdir}/VirtualBox
265
266install VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png
af40882b 267install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}/%{pname}.desktop
268
269install VirtualBox.chm $RPM_BUILD_ROOT%{_libdir}/VirtualBox
6b8b3a79 270
271# required by VBoxFFmpegFB.so
272ln -s %{_libdir}/libavcodec.so.5? $RPM_BUILD_ROOT%{_libdir}/VirtualBox/libavcodec.so.51
273ln -s %{_libdir}/libavformat.so.5? $RPM_BUILD_ROOT%{_libdir}/VirtualBox/libavformat.so.51
274
af40882b 275install -d $RPM_BUILD_ROOT/etc/udev/rules.d
276install udev.conf $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules
277%endif
278
279%if %{with kernel}
280install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
281install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv
282install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt
283%install_kernel_modules -m PLD-MODULE-BUILD/vboxdrv/vboxdrv -d misc
284%install_kernel_modules -m PLD-MODULE-BUILD/vboxnetflt/vboxnetflt -d misc
285%endif
286
6b8b3a79 287%clean
288rm -rf $RPM_BUILD_ROOT
289
290%pre
291%groupadd -g 221 -r -f vbox
292
af40882b 293%post
294cat << 'EOF'
295NOTE: You must also install kernel module for this software to work
296 kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str}
297 kernel-desktop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str}
298 kernel-laptop-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str}
299 kernel-vanilla-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str}
300 etc.
301
302Depending on which kernel brand You use.
303
304EOF
305
6b8b3a79 306%postun
307if [ "$1" = "0" ]; then
308 %groupremove vbox
309fi
310
af40882b 311%post -n kernel%{_alt_kernel}-misc-vboxdrv
312%depmod %{_kernel_ver}
313/sbin/chkconfig --add vboxdrv
314%service vboxdrv restart "VirtualBox OSE driver"
315
316%postun -n kernel%{_alt_kernel}-misc-vboxdrv
317%depmod %{_kernel_ver}
318
319%preun -n kernel%{_alt_kernel}-misc-vboxdrv
320if [ "$1" = "0" ]; then
321 %service vboxdrv stop
322 /sbin/chkconfig --del vboxdrv
323fi
324
325%post -n kernel%{_alt_kernel}-misc-vboxnetflt
326%depmod %{_kernel_ver}
327/sbin/chkconfig --add vboxnetflt
e68f072b 328%service vboxnetflt restart "VirtualBox OSE Network Filter driver"
af40882b 329
330%postun -n kernel%{_alt_kernel}-misc-vboxnetflt
331%depmod %{_kernel_ver}
332
333%preun -n kernel%{_alt_kernel}-misc-vboxnetflt
334if [ "$1" = "0" ]; then
335 %service vboxnetflt stop
336 /sbin/chkconfig --del vboxnetflt
337fi
338
339%if %{with userspace}
6b8b3a79 340%files
341%defattr(644,root,root,755)
342%doc UserManual.pdf
343%dir %{_libdir}/VirtualBox
af40882b 344%dir %{_libdir}/VirtualBox/accessible
6b8b3a79 345%dir %{_libdir}/VirtualBox/additions
346%dir %{_libdir}/VirtualBox/components
347%dir %{_libdir}/VirtualBox/nls
348%attr(755,root,root) %{_bindir}/VBox*
349%attr(755,root,root) %{_bindir}/VirtualBox
af40882b 350%attr(755,root,root) %{_bindir}/rdesktop-vrdp
351%attr(755,root,root) %{_bindir}/vboxwebsrv
352%attr(755,root,root) %{_bindir}/webtest
6b8b3a79 353%attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC
354%attr(4755,root,root) %{_libdir}/VirtualBox/VBoxHeadless
355%attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage
ab8d962c
KK
356%attr(755,root,root) %{_libdir}/VirtualBox/VBoxNetAdpCtl
357%attr(4755,root,root) %{_libdir}/VirtualBox/VBoxNetDHCP
6b8b3a79 358%attr(4755,root,root) %{_libdir}/VirtualBox/VBoxSDL
359%attr(755,root,root) %{_libdir}/VirtualBox/VBoxTunctl
360%attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD
361%attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so
ab8d962c 362%attr(755,root,root) %{_libdir}/VirtualBox/libQt*.so.*
af40882b 363%attr(755,root,root) %{_libdir}/VirtualBox/VRDPAuth.so
364#%ifarch %{x8664}
365#%attr(755,root,root) %{_libdir}/VirtualBox/VBox*.rel
366#%endif
6b8b3a79 367%attr(4755,root,root) %{_libdir}/VirtualBox/VirtualBox
368%attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox.so
369%attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox-wrapper.sh
af40882b 370%attr(755,root,root) %{_libdir}/VirtualBox/VBox*.sh
6b8b3a79 371%attr(755,root,root) %{_libdir}/VirtualBox/libav*.so.*
af40882b 372%attr(755,root,root) %{_libdir}/VirtualBox/rdesktop-vrdp
373%attr(755,root,root) %{_libdir}/VirtualBox/vboxwebsrv
374%attr(755,root,root) %{_libdir}/VirtualBox/webtest
375# isn't it already packaged somewhere in the system?
376%attr(755,root,root) %{_libdir}/VirtualBox/accessible/libqtaccessiblewidgets.so
6b8b3a79 377%{_libdir}/VirtualBox/*.gc
378%{_libdir}/VirtualBox/*.r0
379%{_libdir}/VirtualBox/additions/*
380%{_libdir}/VirtualBox/components/*
af40882b 381%{_libdir}/VirtualBox/rdesktop-vrdp-keymaps
6b8b3a79 382%{_libdir}/VirtualBox/License-7.html
af40882b 383%{_libdir}/VirtualBox/VirtualBox.chm
6b8b3a79 384%lang(ca) %{_libdir}/VirtualBox/nls/*_ca.qm
385%lang(cs) %{_libdir}/VirtualBox/nls/*_cs.qm
386%lang(de) %{_libdir}/VirtualBox/nls/*_de.qm
387%lang(es) %{_libdir}/VirtualBox/nls/*_es.qm
388%lang(eu) %{_libdir}/VirtualBox/nls/*_eu.qm
389%lang(fi) %{_libdir}/VirtualBox/nls/*_fi.qm
390%lang(fr) %{_libdir}/VirtualBox/nls/*_fr.qm
391%lang(hu) %{_libdir}/VirtualBox/nls/*_hu.qm
392%lang(id) %{_libdir}/VirtualBox/nls/*_id.qm
393%lang(it) %{_libdir}/VirtualBox/nls/*_it.qm
394%lang(ja) %{_libdir}/VirtualBox/nls/*_ja.qm
395%lang(ko) %{_libdir}/VirtualBox/nls/*_ko.qm
396%lang(pl) %{_libdir}/VirtualBox/nls/*_pl.qm
397%lang(pt) %{_libdir}/VirtualBox/nls/*_pt.qm
398%lang(pt_BR) %{_libdir}/VirtualBox/nls/*_pt_BR.qm
399%lang(ro) %{_libdir}/VirtualBox/nls/*_ro.qm
400%lang(ru) %{_libdir}/VirtualBox/nls/*_ru.qm
401%lang(sk) %{_libdir}/VirtualBox/nls/*_sk.qm
402%lang(sr) %{_libdir}/VirtualBox/nls/*_sr.qm
403%lang(sv) %{_libdir}/VirtualBox/nls/*_sv.qm
404%lang(tr) %{_libdir}/VirtualBox/nls/*_tr.qm
405%lang(zh_CN) %{_libdir}/VirtualBox/nls/*_zh_CN.qm
406%lang(zh_TW) %{_libdir}/VirtualBox/nls/*_zh_TW.qm
407%{_pixmapsdir}/VBox.png
408%{_desktopdir}/%{pname}.desktop
af40882b 409
410%files udev
411%defattr(644,root,root,755)
412%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules
413%endif
414
415%if %{with kernel}
416%files -n kernel%{_alt_kernel}-misc-vboxdrv
417%defattr(644,root,root,755)
418%attr(754,root,root) /etc/rc.d/init.d/vboxdrv
419/lib/modules/%{_kernel_ver}/misc/vboxdrv.ko*
420
421%files -n kernel%{_alt_kernel}-misc-vboxnetflt
422%defattr(644,root,root,755)
423%attr(754,root,root) /etc/rc.d/init.d/vboxnetflt
424/lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko*
425%endif
This page took 0.133519 seconds and 4 git commands to generate.