# - finish kernel/userspace bconds (deps, limit build to only selected part)
# - Home page says that some addons should be compiled, I don't see any except.
# vboxaddon kernel module and {vboxmouse,vboxvideo)_drv.so. Are they required?
-# - .desktop file
# - it seems that VBoxSVC should not be started by init script but I'm still
# testing this
-# - /dev/vboxdrv should belong to vboxusers group and have rw rights to it
# - Devel stuff is not packaged yet.
# - Now its EA ix86 x8664, but looking into autogenerated env.sh suggests that
# code may be compiled exclusively for i686.
%bcond_without kernel # don't build kernel module
%bcond_without userspace # don't build userspace package
-%define _rel 0.3
+%define _rel 0.4
Summary: VirtualBox - x86 hardware virtualizer
Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
Source2: http://www.virtualbox.org/download/UserManual.pdf
# Source2-md5: 2e5458bd5b4b9acd18cc86866e8a7284
Source3: %{name}.desktop
+Source4: %{name}.sh
Patch0: %{name}-configure.patch
Patch1: %{name}-qt-paths.patch
URL: http://www.virtualbox.org/
Requires(postun): /usr/sbin/groupdel
Requires(pre): /usr/bin/getgid
Requires(pre): /usr/sbin/groupadd
+Suggests: gxmessage
Provides: group(vbox)
ExclusiveArch: %{ix86} %{x8664}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%setup -q -n %{name}-%{version}_OSE
%patch0 -p0
%patch1 -p0
-
-cat > VBox.sh <<'EOF'
-#!/bin/sh
-
-if [ ! -c /dev/vboxdrv ]; then
- echo "Special character device /dev/vboxdrv doesn't exists!"
- echo "Check your installation and if vboxdrv kernel module is loaded."
- exit 1
-fi
-
-if [ ! -w /dev/vboxdrv ]; then
- echo "You don't have write access to /dev/vboxdrv!"
- echo "Correct this situation or contact with your system administrator."
- exit 1
-fi
-
-BINFILE=$(basename "$0")
-LD_LIBRARY_PATH=%{_libdir}/VirtualBox %{_libdir}/VirtualBox/$BINFILE ${1:+"$@"}
-EOF
-
install %{SOURCE2} .
%build
for f in {VBox{BFE,Manage,SDL,SVC,XPCOMIPCD},VirtualBox}; do
install out/linux.%{_outdir}/release/bin/$f $RPM_BUILD_ROOT%{_libdir}/VirtualBox/$f
- install VBox.sh $RPM_BUILD_ROOT%{_bindir}/$f
+ install %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/$f
done
install out/linux.%{_outdir}/release/bin/VBox*.so \