Sisyphus repository
Last update: 24 april 2019 | SRPMs: 17669 | Visits: 13462184
en ru br
ALT Linux repos
S:5.2.26-alt3
5.0: 3.0.4-alt0.M50.1
4.1: 2.1.4-alt0.M41.5
4.0:
+backports:1.6.6-alt0.M40.2

Group :: Emulators
RPM: virtualbox

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#define rev 2459
%define modname kernel-source-virtualbox
%define modnameadd kernel-source-virtualbox-addition
%define modnamevfs kernel-source-virtualbox-vfs
%define vboxdir %_libdir/virtualbox

%set_verify_elf_method textrel=relaxed
%add_findprov_lib_path %vboxdir
#%%add_findreq_skiplist %vboxdir/*

%define distname VirtualBox

%ifarch %ix86
%define vbox_platform linux.x86
%define build_additions 1
%endif
%ifarch x86_64
%define vbox_platform linux.amd64
%define build_additions 0
%endif

Name: virtualbox
Version: 1.6.6
Release: alt0.M40.2%{?rev:.r%{rev}}

Summary: A general-purpose full virtualizer for x86 hardware
License: GPL
Group: Emulators
Url: http://www.virtualbox.org/

ExclusiveArch: %ix86

Packager: Evgeny Sinelnikov <sin at altlinux.ru>

%define distarchive %distname-%{version}_OSE
Source: %distarchive.tar.bz2

Source1: %name.control
Source2: %name.init
Source3: 98vboxadd-xclient
Source4: %name.rules
Source5: 60-vboxadd.perms
Source10: virtualbox.png
Source11: virtualbox.16.png
Source12: virtualbox.48.png
Source13: http://virtualbox.org/download/%version/UserManual.pdf
Source14: %name.desktop

Patch: VirtualBox-1.6.2-alt-rpath.patch
Patch1: VirtualBox-alt-init-scripts.diff

Patch10: vbox-futex.diff
Patch12: vbox-kmp-vboxadd.diff
Patch13: vbox-kmp-vboxvfs.diff
Patch14: %name-ose-init-scripts.diff
Patch16: virtualbox-gcc43-fixes.diff
Patch17: virtualbox-validate-op-gcc43.diff
Patch19: virtualbox-system-yasm.diff
Patch20: vbox-2.6.25.diff
Patch22: vbox-buildfix.diff
Patch23: virtualbox-use-intree-yasm.diff
Patch24: %name-ose-64issue.diff



BuildPreReq: dev86 gcc-c++ iasl libalsa-devel
BuildPreReq: libIDL-devel libSDL-devel
BuildPreReq: libxalan-c-devel libXcursor-devel libXext-devel
BuildPreReq: libqt3-devel xerces-c-devel xsltproc
BuildPreReq: kernel-build-tools
BuildPreReq: libpulseaudio-devel
BuildPreReq: libxml2-devel libxslt-devel libqt4-devel libstdc++-devel-static
BuildPreReq: yasm kBuild
%ifarch x86_64
BuildRequires: i586-gcc4.1 i586-libstdc++4.1-devel
%endif

%description
InnoTek VirtualBox is a family of powerful x86 virtualization products
for enterprise as well as home use. Presently, VirtualBox runs on
Windows and Linux 32-bit hosts and supports a large number of guest
operating systems including but not limited to Windows (NT 4.0, 2000,
XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and
OpenBSD.

%package guest-additions
Summary: Additions for VirtualBox OSE guest systems
Group: Emulators
Requires: xorg-x11-drv-vboxmouse
Requires: xorg-x11-drv-vboxvideo

%description guest-additions
This packages contains additions for VirtualBox OSE guest systems.
It allows to share files with the host system, copy/paste between
guest and host, and sync time with host.

%package -n %modname
Summary: Sources for VirtualBox module
Group: Development/Kernel
BuildArch: noarch

%description -n %modname
Sources for VirtualBox kernel module.

%package -n %modnameadd
Summary: Sources for VirtualBox module for OSE additions
Group: Development/Kernel
BuildArch: noarch

%description -n %modnameadd
Sources for VirtualBox kernel module for OSE additions.

%package -n %modnamevfs
Summary: Sources for VirtualBox module for OSE VFS
Group: Development/Kernel
BuildArch: noarch

%description -n %modnamevfs
Sources for VirtualBox kernel module for OSE VFS.

%package -n xorg-x11-drv-vboxmouse
Summary: The X.org driver for mouse in VirtualBox guests
Group: System/X11
#Suggests: %name-guest-additions

%description -n xorg-x11-drv-vboxmouse
The X.org driver for mouse in VirtualBox guests

%package -n xorg-x11-drv-vboxvideo
Summary: The X.org driver for video in VirtualBox guests
Group: System/X11
#Suggests: %name-guest-additions

%description -n xorg-x11-drv-vboxvideo
The X.org driver for video in VirtualBox guests

%package common
Summary: VirtualBox module support files
Group: System/Configuration/Other
# due to new_summary function and is_builtin_mode bugfix
PreReq: control >= 0.7.2-alt1
PreReq: shadow-utils
# due to /bin/mountpoint
PreReq: SysVinit

%description common
This package contains scripts and other support files which are
required to use the vboxdrv kernel module in the ALT Linux system.
The kernel module itself is not included - you need to install the
appropriate kernel-modules-virtualbox-* package for your kernel.

%package doc
Summary: VirtualBox documentation
Group: Documentation

%description doc
This package contains VirtualBox User Manual.

%prep
%setup -q -n %distarchive
%patch -p2
%patch1 -p2

# Patches from builds for Suse:

#ifarch x86_64
# this patch10 is taken from mandriva (i just adapt it to fit
# to the latest virtualbox-ose package)
# http://cvs.mandriva.com/cgi-bin/viewvc.cgi/contrib-SPECS/virtualbox/VirtualBox-OSE-1.3.4-futex.patch?view=log
%patch10
%patch12
%patch13
#%endif

%patch14
%patch16
%patch17
## 0.6.2 in state is apparently too new - needs 0.6.0 specifically
#patch19
%patch20 -p1
%patch22 -p1
%patch23
%patch24

%build
./configure \
   --disable-kmods \
   --with-qt-dir=%_qt3dir \
   --with-qt4-dir=%_qt4dir \
   --with-kbuild=%_bindir
%if "%build_additions" == "0"
echo "VBOX_WITH_X11_ADDITIONS        := " >> AutoConfig.kmk
%endif
source env.sh
kmk VBOXDIR=%vboxdir

%install
mkdir -p %buildroot{%_bindir,%_sbindir,%vboxdir,%kernel_src,%_initrddir,%_sysconfdir/udev/rules.d}

# install common

install -Dp %SOURCE1 %buildroot%_controldir/%name
install -Dp %SOURCE2 %buildroot%_initdir/%name
install -Dp -m644 %SOURCE4 \
%buildroot%_sysconfdir/udev/rules.d/90-%name.rules

%if %build_additions
# install additions from src
install -m755 src/VBox/Additions/linux/installer/vboxadd-timesync.sh %buildroot%_initrddir/vboxadd-timesync
%endif

# copy additional scripts

install -m 755 src/VBox/Installer/linux/VBoxAddIF.sh %buildroot%vboxdir
# create links for additional scripts
for n in VBoxAddIF VBoxDeleteIF; do
   ln -s $(relative %vboxdir/VBoxAddIF.sh %_bindir/$n) %buildroot%_bindir/$n
done

# install application

cd out/%vbox_platform/release/bin

#    SUPInstall \

#    SUPUninstall \
cp -a \
   VBoxBFE \
   VBoxManage \
   VBoxSDL \
   VBoxSVC \
   VBoxXPCOMIPCD \
   VBoxTunctl \
   VirtualBox \
   vditool \
   *.gc \
   *.r0 \
   *.so \
   *.xpt \
%if %build_additions
   additions/ \
%endif
   components/ \
   nls/ \
   %buildroot%vboxdir

# create links

for n in VBoxBFE VBoxManage VBoxSDL VBoxSVC VirtualBox VBoxTunctl; do
   ln -s $(relative %vboxdir/$n %_bindir/$n) %buildroot%_bindir
done

# install kernel sources

cp -a src/ %buildroot%kernel_src/%modname-%version
pushd %buildroot%kernel_src
tar -c %modname-%version | bzip2 -c > \
   %buildroot%kernel_src/%modname-%version.tar.bz2
rm -rf %buildroot%kernel_src/%modname-%version
popd

%if %build_additions
# install additions
pushd additions
 install -d %buildroot/sbin
 install -m755 mountvboxsf %buildroot/sbin/mount.vboxsf
 install -m755 vboxadd-timesync %buildroot%_sbindir

 install -d %buildroot%_sysconfdir/X11/xinit.d
 install -m755 VBoxClient %buildroot%_bindir
 install -m755 %SOURCE3 %buildroot%_sysconfdir/X11/xinit.d

#install -pD -m644 *.so %buildroot%_libdir


# install additions kernel sources

 cp -a src/vboxadd %buildroot%kernel_src/%modnameadd-%version
 pushd %buildroot%kernel_src
 tar -c %modnameadd-%version | bzip2 -c > \
   %buildroot%kernel_src/%modnameadd-%version.tar.bz2
 rm -rf %buildroot%kernel_src/%modnameadd-%version
 popd

# install VFS kernel sources

 cp -a src/vboxvfs %buildroot%kernel_src/%modnamevfs-%version
 pushd %buildroot%kernel_src
 tar -c %modnamevfs-%version | bzip2 -c > \
   %buildroot%kernel_src/%modnamevfs-%version.tar.bz2
 rm -rf %buildroot%kernel_src/%modnamevfs-%version
 popd

 install -d %buildroot%_sysconfdir/security/console.perms.d/
 install -m644 %SOURCE5 %buildroot%_sysconfdir/security/console.perms.d/

 install -d %buildroot%_sysconfdir/modprobe.d
 cat > %buildroot%_sysconfdir/modprobe.d/vbox-guest-additions << EOF
vboxadd
vboxvfs
EOF

 install -d %buildroot%_x11modulesdir/{input,drivers}
 install vboxmouse_drv_71.so %buildroot%_x11modulesdir/input/vboxmouse_drv.so
 install vboxvideo_drv_71.so %buildroot%_x11modulesdir/drivers/vboxvideo_drv.so
popd
%endif

# install icons

mkdir -p %buildroot%_iconsdir
install -m644 %SOURCE10 %buildroot%_iconsdir/%name.png
mkdir -p %buildroot%_miconsdir
install -m644 %SOURCE11 %buildroot%_miconsdir/%name.png
mkdir -p %buildroot%_liconsdir
install -m644 %SOURCE12 %buildroot%_liconsdir/%name.png

# install menu entries

mkdir -p %buildroot%_desktopdir
install -m644 %SOURCE14 %buildroot%_desktopdir/%name.desktop

# install docs

mkdir -p %buildroot%_defaultdocdir/%name-doc-%version
cp %SOURCE13 %buildroot%_defaultdocdir/%name-doc-%version/

%pre common
/usr/sbin/groupadd -r -f vboxusers
%pre_control %name

%post common
%post_control -s vboxusers %name
%post_service %name

%preun common
%preun_service %name

%triggerin common -- dev
# If using static /dev, select the same status again to fix permissions
mountpoint -q /dev || {
status="`/usr/sbin/control %name status`" || status=
[ -n "$status" ] && /usr/sbin/control %name "$status" ||:
}

%files
%_bindir/*
%if %build_additions
%exclude %_bindir/VBoxClient
#%%_libdir/*
%endif
%dir %vboxdir
%vboxdir/*
%_iconsdir/*.png
%_miconsdir/*.png
%_liconsdir/*.png
%_desktopdir/%name.desktop

%files -n %modname
%kernel_src/%modname-%version.tar.bz2

%if %build_additions
%files -n %modnameadd
%kernel_src/%modnameadd-%version.tar.bz2

%files -n %modnamevfs
%kernel_src/%modnamevfs-%version.tar.bz2

%files -n xorg-x11-drv-vboxmouse
%_x11modulesdir/input/vboxmouse_drv.so

%files -n xorg-x11-drv-vboxvideo
%_x11modulesdir/drivers/vboxvideo_drv.so

%files guest-additions
/sbin/mount.vboxsf
%_initrddir/vboxadd-timesync
%_sbindir/vboxadd-timesync
%_bindir/VBoxClient
%_sysconfdir/security/console.perms.d/60-vboxadd.perms
%_sysconfdir/X11/xinit.d/98vboxadd-xclient
%_sysconfdir/modprobe.d/vbox-guest-additions
%endif

%files common
%_controldir/%name
%_initdir/%name
%config %_sysconfdir/udev/rules.d/90-%name.rules

%files doc
%_defaultdocdir/%name-doc-%version

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin