]> git.pld-linux.org Git - packages/VirtualBox.git/blame - VirtualBox.spec
- better way to display message
[packages/VirtualBox.git] / VirtualBox.spec
CommitLineData
48363591 1#
2# TODO:
d1c4ec5b 3# - finish kernel/userspace bconds (deps, limit build to only selected part)
48363591 4# - Home page says that some addons should be compiled, I don't see any except.
5# vboxaddon kernel module and {vboxmouse,vboxvideo)_drv.so. Are they required?
5f1cec1f 6# - it seems that VBoxSVC should not be started by init script but I'm still
05f1b1f5 7# testing this
48363591 8# - Devel stuff is not packaged yet.
eba4b2aa
JB
9# - Now its EA ix86 x8664, but looking into autogenerated env.sh suggests that
10# code may be compiled exclusively for i686.
32b670ab 11# - use %kernel_build macros
48363591 12#
13# Conditional build:
14%bcond_without dist_kernel # without distribution kernel
d1c4ec5b 15%bcond_without kernel # don't build kernel module
d1c4ec5b 16%bcond_without userspace # don't build userspace package
05f1b1f5 17
fb661e50 18%define _rel 0.4
05f1b1f5 19
d1c4ec5b
JB
20Summary: VirtualBox - x86 hardware virtualizer
21Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
48363591 22Name: VirtualBox
d6f0c54e 23Version: 1.5.0
05f1b1f5 24Release: %{_rel}
48363591 25License: GPL v2
26Group: Applications/Emulators
5f1cec1f 27Source0: http://www.virtualbox.org/download/%{version}/%{name}-%{version}_OSE.tar.bz2
d6f0c54e 28# Source0-md5: 56c074900260c109ed735c08e726fe81
05f1b1f5 29Source1: virtualbox.init
7d1c0a63 30Source2: http://www.virtualbox.org/download/UserManual.pdf
31# Source2-md5: 2e5458bd5b4b9acd18cc86866e8a7284
d89980c7 32Source3: %{name}.desktop
fb661e50 33Source4: %{name}.sh
48363591 34Patch0: %{name}-configure.patch
35Patch1: %{name}-qt-paths.patch
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
d6f0c54e 45BuildRequires: libstdc++-static
48363591 46BuildRequires: libuuid-devel
e5aaadde 47BuildRequires: libxslt-progs
48BuildRequires: qt-devel >= 6:3.3.6
d6f0c54e 49BuildRequires: qt-linguist
48363591 50BuildRequires: rpmbuild(macros) >= 1.329
e5aaadde 51BuildRequires: xalan-c-devel >= 1.10.0
eba4b2aa 52#BuildRequires: xcursor-devel
e5aaadde 53BuildRequires: xerces-c-devel >= 2.6.0
eba4b2aa 54BuildRequires: xorg-lib-libXcursor-devel
e5aaadde 55BuildRequires: zlib-devel >= 1.2.1
5f1cec1f
ER
56Requires(postun): /usr/sbin/groupdel
57Requires(pre): /usr/bin/getgid
58Requires(pre): /usr/sbin/groupadd
fb661e50 59Suggests: gxmessage
5f1cec1f 60Provides: group(vbox)
eba4b2aa 61ExclusiveArch: %{ix86} %{x8664}
48363591 62BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
eba4b2aa 64%ifarch %{x8664}
5088674d 65%define _outdir amd64
66%else
67%define _outdir x86
68%endif
69
48363591 70%description
71InnoTek VirtualBox is a general-purpose full virtualizer for x86
72hardware. Targeted at server, desktop and embedded use, it is now the
73only professional-quality virtualization solution that is also Open
74Source Software.
75
76Some of the features of VirtualBox are:
77
78Modularity: VirtualBox has an extremely modular design with
79well-defined internal programming interfaces and a client/server
80design. This makes it easy to control it from several interfaces at
81once: for example, you can start a virtual machine in a typical
82virtual machine GUI and then control that machine from the command
83line. VirtualBox also comes with a full Software Development Kit: even
84though it is Open Source Software, you don't have to hack the source
85to write a new interface for VirtualBox.
86
87Virtual machine descriptions in XML: the configuration settings of
88virtual machines are stored entirely in XML and are independent of the
89local machines. Virtual machine definitions can therefore easily be
90ported to other computers.
91
fd8fc899
JR
92%description -l pl.UTF-8
93InnoTek VirtualBox jest emulatorem sprzętu x86. Kierowany do
94zastosowań serwerowych, desktopowych oraz wbudowanych jest obecnie
95jedynym wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym
96również jako Otwarte Oprogramowanie.
48363591 97
fd8fc899 98Przykładowe cechy VirtualBoksa:
48363591 99
fd8fc899
JR
100Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z
101dobrze zaprojektowanym wewnętrznym interfejsem programowym typu
102klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą
103różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z
104poziomu interfejsu graficznego, a później kontrolować ją z linii
105poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co
106pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną.
48363591 107
fd8fc899
JR
108Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn
109wirtualnych są w całości przechowywane w XML-u i są niezależne od
110lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść
111konfigurację maszyny wirtualnej na inny komputer.
48363591 112
113%package -n kernel%{_alt_kernel}-misc-vboxdrv
eba4b2aa 114Summary: Linux kernel module for VirtualBox
4dab3322 115Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa
48363591 116Release: %{_rel}@%{_kernel_ver_str}
117Group: Base/Kernel
118Requires(post,postun): /sbin/depmod
119Requires: dev >= 2.9.0-7
120%if %{with dist_kernel}
d6f0c54e 121%requires_releq_kernel
122Requires(postun): %releq_kernel
48363591 123%endif
124Provides: kernel(vboxdrv) = %{version}-%{_rel}
125
126%description -n kernel%{_alt_kernel}-misc-vboxdrv
eba4b2aa 127Linux kernel module vboxdrv for VirtualBox.
48363591 128
fd8fc899
JR
129%description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8
130Moduł jądra Linuksa vboxdrv dla VirtualBoksa.
48363591 131
48363591 132%prep
d6f0c54e 133%setup -q -n %{name}-%{version}_OSE
48363591 134%patch0 -p0
135%patch1 -p0
95389e4d 136install %{SOURCE2} .
fa19f650 137
48363591 138%build
05f1b1f5 139KDIR="%{_builddir}/%{buildsubdir}/kernel"
140mkdir -p $KDIR
141cp -a %{_kernelsrcdir}/include $KDIR
142%ifarch %{x8664}
143ln -sf $KDIR/include/asm-x86_64 $KDIR/include/asm
144%else
145ln -sf $KDIR/include/asm-i386 $KDIR/include/asm
146%endif
d6f0c54e 147ln -sf $KDIR/include/linux/autoconf-dist.h $KDIR/include/linux/autoconf.h
05f1b1f5 148
106d8451 149./configure \
150 --with-gcc="%{__cc}" \
05f1b1f5 151 --with-g++="%{__cxx}" \
152 --with-linux="$KDIR"
48363591 153. ./env.sh
e66c982f 154kmk -j1
48363591 155
d1c4ec5b 156%if %{with kernel}
5088674d 157cd out/linux.%{_outdir}/release/bin/src
d6f0c54e 158for cfg in %{?with_dist_kernel:dist}%{!?with_dist_kernel:nondist}; do
48363591 159 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
160 exit 1
161 fi
162 rm -rf o
163 install -d o/include/linux
164 ln -sf %{_kernelsrcdir}/config-$cfg o/.config
165 ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
166 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
167%if %{with dist_kernel}
168 %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
169%else
170 touch o/include/config/MARKER
171 ln -sf %{_kernelsrcdir}/scripts o/scripts
172%endif
173 ln -sf ../../include/VBox o/include/VBox
174 ln -sf ../../include/iprt o/include/iprt
175 %{__make} -C %{_kernelsrcdir} clean \
176 SYSSRC=%{_kernelsrcdir} \
177 SYSOUT=$PWD/o \
178 M=$PWD O=$PWD/o \
179 %{?with_verbose:V=1}
180 %{__make} -C %{_kernelsrcdir} modules \
181 CC="%{__cc}" CPP="%{__cpp}" \
182 SYSSRC=%{_kernelsrcdir} \
183 SYSOUT=$PWD/o \
184 M=$PWD O=$PWD/o \
185 %{?with_verbose:V=1}
05f1b1f5 186 mv vboxdrv.ko ../../../../../vboxdrv-$cfg.ko
48363591 187done
d1c4ec5b 188%endif
48363591 189
190%install
191rm -rf $RPM_BUILD_ROOT
192
d1c4ec5b 193%if %{with userspace}
48363591 194install -d \
d89980c7 195 $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \
05f1b1f5 196 $RPM_BUILD_ROOT%{_libdir}/VirtualBox \
197 $RPM_BUILD_ROOT/etc/rc.d/init.d
198
5085c54c
ER
199for f in {VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox}; do
200 install out/linux.%{_outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f
fb661e50 201 install %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/$f
05f1b1f5 202done
203
d6f0c54e 204install out/linux.%{_outdir}/release/bin/VBox*.so \
48363591 205 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
05f1b1f5 206install out/linux.%{_outdir}/release/bin/{VBox{DD,DD2}{GC.gc,R0.r0},VMM{GC.gc,R0.r0},*.xpt} \
48363591 207 $RPM_BUILD_ROOT%{_libdir}/VirtualBox
208
d1c4ec5b
JB
209cp -a out/linux.%{_outdir}/release/bin/components $RPM_BUILD_ROOT%{_libdir}/VirtualBox
210install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/virtualbox
d89980c7 211
b1f8956a 212install out/linux.%{_outdir}/release/bin/VBox.png $RPM_BUILD_ROOT%{_pixmapsdir}/VBox.png
d89980c7 213install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
d1c4ec5b
JB
214%endif
215
216%if %{with kernel}
d6f0c54e 217install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
218install vboxdrv-dist.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/vboxdrv.ko
d1c4ec5b 219%endif
05f1b1f5 220
48363591 221%clean
222rm -rf $RPM_BUILD_ROOT
223
3b63d3e8 224%pre
225%groupadd -g 221 -r -f vbox
226
05f1b1f5 227%post
228/sbin/chkconfig --add virtualbox
229%service virtualbox restart "VBoxSVC daemon"
3b63d3e8 230if [ "$1" = 1 ]; then
231%banner -e %{name} <<'EOF'
232Remember to add users which will use VirtualBox to vbox group or they won't be
233able to write to /dev/vboxdrv.
234EOF
235#'
236fi
05f1b1f5 237
5f1cec1f 238%preun
05f1b1f5 239if [ "$1" = "0" ]; then
240 %service virtualbox stop
241 /sbin/chkconfig --del virtualbox
242fi
243
3b63d3e8 244%postun
245if [ "$1" = "0" ]; then
246 %groupremove vbox
247fi
248
48363591 249%post -n kernel%{_alt_kernel}-misc-vboxdrv
250%depmod %{_kernel_ver}
251
252%postun -n kernel%{_alt_kernel}-misc-vboxdrv
253%depmod %{_kernel_ver}
254
d1c4ec5b 255%if %{with userspace}
48363591 256%files
257%defattr(644,root,root,755)
7d1c0a63 258%doc UserManual.pdf
48363591 259%attr(755,root,root) %{_bindir}/VBox*
260%attr(755,root,root) %{_bindir}/VirtualBox
d1c4ec5b 261%dir %{_libdir}/VirtualBox
05f1b1f5 262%attr(755,root,root) %{_libdir}/VirtualBox/VBoxSVC
263%attr(755,root,root) %{_libdir}/VirtualBox/VBoxBFE
264%attr(755,root,root) %{_libdir}/VirtualBox/VBoxManage
265%attr(755,root,root) %{_libdir}/VirtualBox/VBoxSDL
266%attr(755,root,root) %{_libdir}/VirtualBox/VBoxXPCOMIPCD
267%attr(755,root,root) %{_libdir}/VirtualBox/VirtualBox
268%{_libdir}/VirtualBox/*.gc
269%{_libdir}/VirtualBox/*.r0
d1c4ec5b 270%attr(755,root,root) %{_libdir}/VirtualBox/VBox*.so
05f1b1f5 271%{_libdir}/VirtualBox/*.xpt
d1c4ec5b 272%dir %{_libdir}/VirtualBox/components
05f1b1f5 273%{_libdir}/VirtualBox/components/*
274%attr(754,root,root) /etc/rc.d/init.d/virtualbox
d89980c7 275%{_pixmapsdir}/VBox.png
276%{_desktopdir}/%{name}.desktop
d1c4ec5b 277%endif
48363591 278
d1c4ec5b 279%if %{with kernel}
d1c4ec5b 280%files -n kernel%{_alt_kernel}-misc-vboxdrv
48363591 281%defattr(644,root,root,755)
d1c4ec5b 282/lib/modules/%{_kernel_ver}/misc/vboxdrv.ko*
05f1b1f5 283%endif
This page took 0.134755 seconds and 4 git commands to generate.