VirtualBox.tmpl.spec revision 14dcfe007d2a64583946ed5e4cfdb458a7f7f03b
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# Spec file for creating VirtualBox rpm packages
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# Copyright (C) 2006-2012 Oracle Corporation
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# This file is part of VirtualBox Open Source Edition (OSE), as
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# available from http://www.virtualbox.org. This file is free software;
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# you can redistribute it and/or modify it under the terms of the GNU
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# General Public License as published by the Free Software Foundation,
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# distribution. VirtualBox OSE is distributed in the hope that it will
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd# be useful, but WITHOUT ANY WARRANTY of any kind.
f9a521ee86c10151d7ed8b236160fa94bf0d8e36nd%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
531c6a58414eb279b4dc1fef61a56c6e975a189fhumbedoohVirtualBox is a powerful PC virtualization solution allowing
531c6a58414eb279b4dc1fef61a56c6e975a189fhumbedoohyou to run a wide range of PC operating systems on your Linux
f9a521ee86c10151d7ed8b236160fa94bf0d8e36ndsystem. This includes Windows, Linux, FreeBSD, DOS, OpenBSD
531c6a58414eb279b4dc1fef61a56c6e975a189fhumbedoohand others. VirtualBox comes with a broad feature set and
f9a521ee86c10151d7ed8b236160fa94bf0d8e36ndexcellent performance, making it the premier virtualization
531c6a58414eb279b4dc1fef61a56c6e975a189fhumbedooh# Mandriva: prevent replacing 'echo' by 'gprintf'
531c6a58414eb279b4dc1fef61a56c6e975a189fhumbedoohinstall -m 755 -d $RPM_BUILD_ROOT/usr/share/applications
f9a521ee86c10151d7ed8b236160fa94bf0d8e36ndinstall -m 755 -d $RPM_BUILD_ROOT%{_defaultdocdir}/virtualbox
f9a521ee86c10151d7ed8b236160fa94bf0d8e36ndinstall -m 755 -d $RPM_BUILD_ROOT/usr/lib/virtualbox/ExtensionPacks
eef2df61942578118376e466c36c30db54640a9chumbedoohinstall -m 755 -d $RPM_BUILD_ROOT/usr/share/mime/packages
f9a521ee86c10151d7ed8b236160fa94bf0d8e36ndmv VBoxEFI32.fd $RPM_BUILD_ROOT/usr/lib/virtualbox || true
f9a521ee86c10151d7ed8b236160fa94bf0d8e36ndmv VBoxEFI64.fd $RPM_BUILD_ROOT/usr/lib/virtualbox || true
eef2df61942578118376e466c36c30db54640a9chumbedoohmv components $RPM_BUILD_ROOT/usr/lib/virtualbox/components
eef2df61942578118376e466c36c30db54640a9chumbedooh %{__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 VBoxAutostart; do
if %WEBSVC%; then
%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-common.sh
echo "Found old version of /etc/init.d/vboxdrv.sh, removing."
# create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox)
# install udev rule (disable with INSTALL_NO_UDEV=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