]> git.pld-linux.org Git - packages/VirtualBox.git/blame - VirtualBox.spec
- packaged language files.
[packages/VirtualBox.git] / VirtualBox.spec
CommitLineData
48363591 1#
2# TODO:
74268e47 3# - Find how to compile with PLD CFLAGS/CXXFLAGS/LDFLAGS.
4# - How to package video and mouse drivers for Guest OS ?
8833bce1 5# (There are several binaries for multiple versions of X11)
74268e47 6# - Package SDK.
48363591 7#
8# Conditional build:
9%bcond_without dist_kernel # without distribution kernel
d1c4ec5b 10%bcond_without kernel # don't build kernel module
d1c4ec5b 11%bcond_without userspace # don't build userspace package
05f1b1f5 12
74268e47 13%define _rel 1
05f1b1f5 14
8833bce1 15%if %{without kernel}
16%undefine with_dist_kernel
17%endif
18
d1c4ec5b
JB
19Summary: VirtualBox - x86 hardware virtualizer
20Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
48363591 21Name: VirtualBox
d6f0c54e 22Version: 1.5.0
05f1b1f5 23Release: %{_rel}
48363591 24License: GPL v2
25Group: Applications/Emulators
5f1cec1f 26Source0: http://www.virtualbox.org/download/%{version}/%{name}-%{version}_OSE.tar.bz2
d6f0c54e 27# Source0-md5: 56c074900260c109ed735c08e726fe81
05f1b1f5 28Source1: virtualbox.init
7d1c0a63 29Source2: http://www.virtualbox.org/download/UserManual.pdf
30# Source2-md5: 2e5458bd5b4b9acd18cc86866e8a7284
d89980c7 31Source3: %{name}.desktop
fb661e50 32Source4: %{name}.sh
48363591 33Patch0: %{name}-configure.patch
34Patch1: %{name}-qt-paths.patch
74268e47 35Patch2: %{name}-shared-libstdc++.patch
48363591 36URL: http://www.virtualbox.org/
37BuildRequires: SDL-devel
e5aaadde 38BuildRequires: bash
48363591 39BuildRequires: bcc
40BuildRequires: bin86
eba4b2aa 41BuildRequires: gcc >= 5:3.2.3
48363591 42BuildRequires: iasl
43%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
44BuildRequires: libIDL-devel
45BuildRequires: libuuid-devel
e5aaadde 46BuildRequires: libxslt-progs
47BuildRequires: qt-devel >= 6:3.3.6
d6f0c54e 48BuildRequires: qt-linguist
48363591 49BuildRequires: rpmbuild(macros) >= 1.329
e5aaadde 50BuildRequires: xalan-c-devel >= 1.10.0
eba4b2aa 51#BuildRequires: xcursor-devel
e5aaadde 52BuildRequires: xerces-c-devel >= 2.6.0
eba4b2aa 53BuildRequires: xorg-lib-libXcursor-devel
e5aaadde 54BuildRequires: zlib-devel >= 1.2.1
5f1cec1f
ER
55Requires(postun): /usr/sbin/groupdel
56Requires(pre): /usr/bin/getgid
57Requires(pre): /usr/sbin/groupadd
fb661e50 58Suggests: gxmessage
5f1cec1f 59Provides: group(vbox)
eba4b2aa 60ExclusiveArch: %{ix86} %{x8664}
48363591 61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
eba4b2aa 63%ifarch %{x8664}
5088674d 64%define _outdir amd64
65%else
66%define _outdir x86
67%endif
68
48363591 69%description
70InnoTek VirtualBox is a general-purpose full virtualizer for x86
71hardware. Targeted at server, desktop and embedded use, it is now the
72only professional-quality virtualization solution that is also Open
73Source Software.
74
75Some of the features of VirtualBox are:
76
77Modularity: VirtualBox has an extremely modular design with
78well-defined internal programming interfaces and a client/server
79design. This makes it easy to control it from several interfaces at
80once: for example, you can start a virtual machine in a typical
81virtual machine GUI and then control that machine from the command
82line. VirtualBox also comes with a full Software Development Kit: even
83though it is Open Source Software, you don't have to hack the source
84to write a new interface for VirtualBox.
85
86Virtual machine descriptions in XML: the configuration settings of
87virtual machines are stored entirely in XML and are independent of the
88local machines. Virtual machine definitions can therefore easily be
89ported to other computers.
90
fd8fc899
JR
91%description -l pl.UTF-8
92InnoTek VirtualBox jest emulatorem sprzętu x86. Kierowany do
93zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie
94jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym
95również jako Otwarte Oprogramowanie.
48363591 96
fd8fc899 97Przykładowe cechy VirtualBoksa:
48363591 98
fd8fc899
JR
99Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z
100dobrze zaprojektowanym wewnętrznym interfejsem programowym typu
101klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą
102różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z
103poziomu interfejsu graficznego, a później kontrolować ją z linii
104poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co
105pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną.
48363591 106
fd8fc899
JR
107Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn
108wirtualnych są w całości przechowywane w XML-u i są niezależne od
109lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść
110konfigurację maszyny wirtualnej na inny komputer.
48363591 111
74268e47 112%package -n kernel%{_alt_kernel}-misc-vboxadd
113Summary: Linux kernel module for VirtualBox
114Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa
115Release: %{_rel}@%{_kernel_ver_str}
116Group: Base/Kernel
117Requires(post,postun): /sbin/depmod
118Requires: dev >= 2.9.0-7
119%if %{with dist_kernel}
120%requires_releq_kernel
121Requires(postun): %releq_kernel
122%endif
123Provides: kernel(vboxadd) = %{version}-%{_rel}
124
125%description -n kernel%{_alt_kernel}-misc-vboxadd
126Linux kernel module vboxadd for VirtualBox.
127
128%description -n kernel%{_alt_kernel}-misc-vboxadd -l pl.UTF-8
129Moduł jądra Linuksa vboxadd dla VirtualBoksa.
130
48363591 131%package -n kernel%{_alt_kernel}-misc-vboxdrv
eba4b2aa 132Summary: Linux kernel module for VirtualBox
4dab3322 133Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa
48363591 134Release: %{_rel}@%{_kernel_ver_str}
135Group: Base/Kernel
136Requires(post,postun): /sbin/depmod
137Requires: dev >= 2.9.0-7
138%if %{with dist_kernel}
d6f0c54e 139%requires_releq_kernel
140Requires(postun): %releq_kernel
48363591 141%endif
142Provides: kernel(vboxdrv) = %{version}-%{_rel}
143
144%description -n kernel%{_alt_kernel}-misc-vboxdrv
eba4b2aa 145Linux kernel module vboxdrv for VirtualBox.
48363591 146
fd8fc899
JR
147%description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8
148Moduł jądra Linuksa vboxdrv dla VirtualBoksa.
48363591 149
74268e47 150%package -n kernel%{_alt_kernel}-misc-vboxvfs
151Summary: Linux kernel module for VirtualBox
152Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa
153Release: %{_rel}@%{_kernel_ver_str}
154Group: Base/Kernel
155Requires(post,postun): /sbin/depmod
156Requires: dev >= 2.9.0-7
157%if %{with dist_kernel}
158%requires_releq_kernel
159Requires(postun): %releq_kernel
160%endif
161Provides: kernel(vboxvfs) = %{version}-%{_rel}
162
163%description -n kernel%{_alt_kernel}-misc-vboxvfs
164Linux kernel module vboxvfs for VirtualBox.
165
166%description -n kernel%{_alt_kernel}-misc-vboxvfs -l pl.UTF-8
167Moduł jądra Linuksa vboxvfs dla VirtualBoksa.
168
48363591 169%prep
d6f0c54e 170%setup -q -n %{name}-%{version}_OSE
48363591 171%patch0 -p0
172%patch1 -p0
74268e47 173%patch2 -p1
95389e4d 174install %{SOURCE2} .
fa19f650 175
48363591 176%build
05f1b1f5 177KDIR="%{_builddir}/%{buildsubdir}/kernel"
178mkdir -p $KDIR
74268e47 179cp -Ra %{_kernelsrcdir}/include $KDIR
05f1b1f5 180%ifarch %{x8664}
181ln -sf $KDIR/include/asm-x86_64 $KDIR/include/asm
182%else
183ln -sf $KDIR/include/asm-i386 $KDIR/include/asm
184%endif
74268e47 185
186%if %{with dist_kernel}
187[ ! -f $KDIR/include/linux/autoconf.h ] && \
188 ln -sf $KDIR/include/linux/autoconf-dist.h $KDIR/include/linux/autoconf.h
189%else
190[ ! -f $KDIR/include/linux/autoconf.h ] && \
191 ln -sf $KDIR/include/linux/autoconf-nondist.h $KDIR/include/linux/autoconf.h
192%endif
05f1b1f5 193
106d8451 194./configure \
195 --with-gcc="%{__cc}" \
05f1b1f5 196 --with-g++="%{__cxx}" \
197 --with-linux="$KDIR"
48363591 198
74268e47 199%if %{with userspace}
200. ./env.sh && kmk -j1
48363591 201%endif
74268e47 202
203%if %{with kernel}
204rm -rf PLD-MODULE-BUILD && mkdir PLD-MODULE-BUILD && cd PLD-MODULE-BUILD
205
206../src/VBox/HostDrivers/Support/linux/export_modules modules.tar.gz && \
207 tar -zxf modules.tar.gz && rm -f modules.tar.gz
208../src/VBox/Additions/linux/export_modules modules.tar.gz
209 tar -zxf modules.tar.gz && rm -f modules.tar.gz
210
211%build_kernel_modules -m vboxadd -C vboxadd
212%build_kernel_modules -m vboxdrv -C vboxdrv
213%build_kernel_modules -m vboxvfs -C vboxvfs
214cd ..
d1c4ec5b 215%endif
48363591 216
217%install
218rm -rf $RPM_BUILD_ROOT
219
d1c4ec5b 220%if %{with userspace}
48363591 221install -d \
d89980c7 222 $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \
05f1b1f5 223 $RPM_BUILD_ROOT%{_libdir}/VirtualBox \
224 $RPM_BUILD_ROOT/etc/rc.d/init.d
225
5085c54c
ER
226for f in {VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox}; do
227 install out/linux.%{_outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f
fb661e50 228 install %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/$f
05f1b1f5 229done
230
d6f0c54e 231install out/linux.%{_outdir}/release/bin/VBox*.so \
48363591 232 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
05f1b1f5 233install out/linux.%{_outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0},*.xpt} \
48363591 234 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
235
d1c4ec5b 236cp -a out/linux.%{_outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox
8833bce1 237
238install -d $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls
239cp -a out/linux.%{_outdir}/release/bin/nls/VirtualBox* $RPM_BUILD_ROOT%{_libdir}/VirtualBox/nls
240
d1c4ec5b 241install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/virtualbox
d89980c7 242
b1f8956a 243install out/linux.%{_outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png
d89980c7 244install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
d1c4ec5b
JB
245%endif
246
247%if %{with kernel}
74268e47 248cd PLD-MODULE-BUILD
249for MODULE in *; do
250 [ ! -d $MODULE ] && continue;
251
252 cd $MODULE
253 %install_kernel_modules -m $MODULE -d misc
254 cd ..
255done
256cd ..
d1c4ec5b 257%endif
05f1b1f5 258
48363591 259%clean
260rm -rf $RPM_BUILD_ROOT
261
3b63d3e8 262%pre
263%groupadd -g 221 -r -f vbox
264
05f1b1f5 265%post
266/sbin/chkconfig --add virtualbox
267%service virtualbox restart "VBoxSVC daemon"
3b63d3e8 268if [ "$1" = 1 ]; then
269%banner -e %{name} <<'EOF'
270Remember to add users which will use VirtualBox to vbox group or they won't be
271able to write to /dev/vboxdrv.
272EOF
273#'
274fi
05f1b1f5 275
5f1cec1f 276%preun
05f1b1f5 277if [ "$1" = "0" ]; then
278 %service virtualbox stop
279 /sbin/chkconfig --del virtualbox
280fi
281
3b63d3e8 282%postun
283if [ "$1" = "0" ]; then
284 %groupremove vbox
285fi
286
74268e47 287%post -n kernel%{_alt_kernel}-misc-vboxadd
288%depmod %{_kernel_ver}
289
290%postun -n kernel%{_alt_kernel}-misc-vboxadd
291%depmod %{_kernel_ver}
292
48363591 293%post -n kernel%{_alt_kernel}-misc-vboxdrv
294%depmod %{_kernel_ver}
295
296%postun -n kernel%{_alt_kernel}-misc-vboxdrv
297%depmod %{_kernel_ver}
298
74268e47 299%post -n kernel%{_alt_kernel}-misc-vboxvfs
300%depmod %{_kernel_ver}
301
302%postun -n kernel%{_alt_kernel}-misc-vboxvfs
303%depmod %{_kernel_ver}
304
d1c4ec5b 305%if %{with userspace}
48363591 306%files
307%defattr(644,root,root,755)
7d1c0a63 308%doc UserManual.pdf
8833bce1 309%dir %{_libdir}/VirtualBox
310%dir %{_libdir}/VirtualBox/components
311%dir %{_libdir}/VirtualBox/nls
48363591 312%attr(755,root,root) %{_bindir}/VBox*
313%attr(755,root,root) %{_bindir}/VirtualBox
05f1b1f5 314%attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC
315%attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE
316%attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage
317%attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL
318%attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD
319%attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox
8833bce1 320%attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so
05f1b1f5 321%{_libdir}/VirtualBox/*.gc
322%{_libdir}/VirtualBox/*.r0
05f1b1f5 323%{_libdir}/VirtualBox/*.xpt
324%{_libdir}/VirtualBox/components/*
8833bce1 325%lang(ar) %{_libdir}/VirtualBox/nls/VirtualBox_ar.qm
326%lang(cs) %{_libdir}/VirtualBox/nls/VirtualBox_cs.qm
327%lang(de) %{_libdir}/VirtualBox/nls/VirtualBox_de.qm
328%lang(es) %{_libdir}/VirtualBox/nls/VirtualBox_es.qm
329%lang(fi) %{_libdir}/VirtualBox/nls/VirtualBox_fi.qm
330%lang(fr) %{_libdir}/VirtualBox/nls/VirtualBox_fr.qm
331%lang(hu) %{_libdir}/VirtualBox/nls/VirtualBox_hu.qm
332%lang(it) %{_libdir}/VirtualBox/nls/VirtualBox_it.qm
333%lang(ja) %{_libdir}/VirtualBox/nls/VirtualBox_ja.qm
334%lang(ko) %{_libdir}/VirtualBox/nls/VirtualBox_ko.qm
335%lang(pl) %{_libdir}/VirtualBox/nls/VirtualBox_pl.qm
336%lang(pt_BR) %{_libdir}/VirtualBox/nls/VirtualBox_pt_BR.qm
337%lang(ro) %{_libdir}/VirtualBox/nls/VirtualBox_ro.qm
338%lang(ru) %{_libdir}/VirtualBox/nls/VirtualBox_ru.qm
339%lang(sv) %{_libdir}/VirtualBox/nls/VirtualBox_sv.qm
340%lang(zh_CN) %{_libdir}/VirtualBox/nls/VirtualBox_zh_CN.qm
341%lang(zh_TW) %{_libdir}/VirtualBox/nls/VirtualBox_zh_TW.qm
05f1b1f5 342%attr(754,root,root) /etc/rc.d/init.d/virtualbox
d89980c7 343%{_pixmapsdir}/VBox.png
344%{_desktopdir}/%{name}.desktop
d1c4ec5b 345%endif
48363591 346
d1c4ec5b 347%if %{with kernel}
74268e47 348%files -n kernel%{_alt_kernel}-misc-vboxadd
349%defattr(644,root,root,755)
350/lib/modules/%{_kernel_ver}/misc/vboxadd.ko*
351
d1c4ec5b 352%files -n kernel%{_alt_kernel}-misc-vboxdrv
48363591 353%defattr(644,root,root,755)
d1c4ec5b 354/lib/modules/%{_kernel_ver}/misc/vboxdrv.ko*
74268e47 355
356%files -n kernel%{_alt_kernel}-misc-vboxvfs
357%defattr(644,root,root,755)
358/lib/modules/%{_kernel_ver}/misc/vboxvfs.ko*
05f1b1f5 359%endif
This page took 0.075436 seconds and 4 git commands to generate.