VirtualBox.tmpl.spec revision 943d182735b76ecae26ea011cb7b87e449aafea8
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# Spec file for creating VirtualBox rpm packages
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# Copyright (C) 2006-2011 Oracle Corporation
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# This file is part of VirtualBox Open Source Edition (OSE), as
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# available from http://www.virtualbox.org. This file is free software;
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# you can redistribute it and/or modify it under the terms of the GNU
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# General Public License as published by the Free Software Foundation,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# distribution. VirtualBox OSE is distributed in the hope that it will
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis# be useful, but WITHOUT ANY WARRANTY of any kind.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%prep
%setup -q
unset DESTDIR
(export VBOX_INSTALL_PATH=/usr/lib/virtualbox && \
%{__python} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT)
cd icons
for i in *; do
rmdir $i
for i in VBoxManage VBoxSVC VBoxSDL VirtualBox VBoxHeadless VBoxExtPackHelperApp VBoxBalloonCtrl vboxwebsrv webtest; do
%INSTMOD%
%INSTMOD%
%INSTMOD%
%INSTMOD%
if [ -d accessible ]; then
%pre
if [ -n "$VBOXSVC_PID" ]; then
# XXX remove old modules from previous versions (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)
%post
#include installer-utils.sh
echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
# install udev rule (disable with INSTALL_NO_UDEV=1 in /etc/default/virtualbox)
# create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
# Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox
cat << EOF
if [ -n "$DKMS" ]; then
if [ -n "$VBOXSVC_PID" ]; then
if [ -n "$DKMS" ]; then