VirtualBox.tmpl.spec revision 254365851c06fac7efeae0a0bf727ed6c6940611
#
# Spec file for creating VirtualBox rpm packages
#
#
# Copyright (C) 2006-2010 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License as published by the Free Software Foundation,
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
# distribution. VirtualBox OSE is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY of any kind.
#
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Release: 1
%prep
%setup -q
DESTDIR=""
unset DESTDIR
# Mandriva: prevent replacing 'echo' by 'gprintf'
export DONT_GPRINTIFY=1
(export VBOX_INSTALL_PATH=/usr/lib/virtualbox && \
%{__python} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT)
%INSTMOD%
%INSTMOD%
%INSTMOD%
fi
done
if [ -d accessible ]; then
fi
%pre
# defaults
# check for active VMs
echo "A copy of VirtualBox is currently running. Please close it and try again. Please note"
echo "that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to"
echo "finish running."
exit 1
fi
# check for old installation
echo "An old installation of VirtualBox was found. To install this package the"
echo "determine the installation directory of the previous installation. After"
exit 1
fi
fi
# XXX remove old modules from previous versions (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)
if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then
fi
%post
# defaults
# remove old cruft
echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
fi
fi
# install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox)
udev_call=""
if [ $? -eq 0 ]; then
else
if [ $? -eq 0 ]; then
fi
fi
udev_fix="="
if [ "${udev_call}" != "" ]; then
udev_fix=""
fi
fi
echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"root\", MODE=\"0600\"" \
echo "SUBSYSTEM=${udev_fix}\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \
echo "SUBSYSTEM=${udev_fix}\"usb\", ENV{DEVTYPE}==\"usb_device\", GROUP=\"vboxusers\", MODE=\"0664\"" \
fi
# Remove old udev description file
fi
# Push the permissions to the USB device nodes. One of these should match.
# Rather nasty to use udevadm trigger for this, but I don't know of any
# better way.
# XXX SELinux: allow text relocation entries
fi
# create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
if [ "$INSTALL_NO_GROUP" != "1" ]; then
echo
echo "Creating group 'vboxusers'. VM users must be member of that group!"
echo
fi
# Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox
# compile problem
cat << EOF
No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to $LOG.
EOF
fi
# if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules
if [ "$INSTALL_NO_VBOXDRV" = "1" ]; then
fi
fi
else
fi
# check for active VMs
echo "A copy of VirtualBox is currently running. Please close it and try again. Please note"
echo "that it can take up to ten seconds for VirtualBox (in particular the VBoxSVC daemon) to"
echo "finish running."
exit 1
fi
if [ "$1" = 0 ]; then
fi
if [ -n "$DKMS" ]; then
fi
fi
%{?rpm_suse: %{py_sitedir}/*}
%{!?rpm_suse: %{python_sitelib}/*}