Sisyphus repository
Last update: 25 april 2019 | SRPMs: 17680 | Visits: 13465159
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 modnamenetflt kernel-source-virtualbox-netfilter
%define modnamenetadp kernel-source-virtualbox-netadaptor
%define modnameadd kernel-source-virtualbox-addition
%define modnamevfs kernel-source-virtualbox-vfs
%define modnamevideo kernel-source-virtualbox-video
%define vboxdir %_libdir/virtualbox
%define vboxadddir %vboxdir/additions

%set_verify_elf_method textrel=relaxed
%add_findprov_lib_path %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 1
%endif

Name: virtualbox
Version: 3.0.4
Release: alt0.M50.1

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

ExclusiveArch: %ix86 x86_64

Packager: Evgeny Sinelnikov <sin at altlinux.ru>

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

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

Patch: %name-%version-%release.patch

BuildPreReq: dev86 iasl gcc4.3-c++ libstdc++4.3-devel-static
BuildPreReq: libIDL-devel libSDL-devel
BuildPreReq: libXcursor-devel libXext-devel
BuildPreReq: xsltproc
BuildPreReq: kernel-build-tools python-dev
BuildPreReq: libpulseaudio-devel
BuildRequires: libxml2-devel libxslt-devel
BuildRequires: libqt4-devel libalsa-devel
BuildRequires: libcap-devel libcurl-devel
BuildPreReq: yasm kBuild >= 0.1.5.r2274

PreReq: %name-common = %version-%release

%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 %modnamenetflt
Summary: Sources for VirtualBox module for OSE netfilter
Group: Development/Kernel
BuildArch: noarch

%description -n %modnamenetflt
Sources for VirtualBox kernel module for OSE netfilter.

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

%description -n %modnamenetadp
Sources for VirtualBox kernel module for OSE netadaptor.

%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 %modnamevideo
Summary: Sources for VirtualBox module for OSE Video DRM
Group: Development/Kernel
BuildArch: noarch

%description -n %modnamevideo
Sources for VirtualBox kernel module for OSE Video DRM.

%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-utils

%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
BuildArch: noarch

%description doc
This package contains VirtualBox User Manual.

%package sdk
Summary: VirtualBox SDK
Group: Development/Other

%description sdk
This package contains VirtualBox SDK.

%prep
%setup -q -n %distarchive
%patch -p1

cp %SOURCE15 %SOURCE16 src/VBox/Frontends/VirtualBox/images

%build
export GCC_VERSION=4.3
./configure \
   --disable-kmods \
   --with-qt-dir=%_qt4dir \
   --with-kbuild=%_bindir
%if "%build_additions" == "0"
echo "VBOX_WITH_X11_ADDITIONS        := " >> AutoConfig.kmk
%endif
source env.sh
[ -n "$NPROCS" ] || NPROCS=%__nprocs
kmk -j$NPROCS 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-service.sh %buildroot%_initrddir/vboxadd-service
install -m755 src/VBox/Additions/linux/installer/vboxadd.sh %buildroot%_initrddir/vboxadd
%endif

# install application

cd out/%vbox_platform/release/bin

#    SUPInstall \

#    SUPUninstall \
cp -a \
   VBoxBFE \
   VBoxHeadless \
   VBoxManage \
   VBoxNetAdpCtl \
   VBoxNetDHCP \
   VBoxSDL \
   VBoxSVC \
   VBoxTestOGL \
   VBoxTunctl \
   VBoxXPCOMIPCD \
   VirtualBox \
   xpidl \
   *.gc \
   *.r0 \
   *.so \
   components/ \
   nls/ \
   sdk/ \
   %buildroot%vboxdir

# create links

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

# install kernel sources

cp -a src/vboxdrv %buildroot%kernel_src/%modname-%version
cp -a src/vboxnetflt %buildroot%kernel_src/%modnamenetflt-%version
cp -a src/vboxnetadp %buildroot%kernel_src/%modnamenetadp-%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
tar -c %modnamenetflt-%version | bzip2 -c > \
   %buildroot%kernel_src/%modnamenetflt-%version.tar.bz2
rm -rf %buildroot%kernel_src/%modnamenetflt-%version
tar -c %modnamenetadp-%version | bzip2 -c > \
   %buildroot%kernel_src/%modnamenetadp-%version.tar.bz2
rm -rf %buildroot%kernel_src/%modnamenetadp-%version
popd

pushd additions
# 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 VFS kernel sources

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

%if %build_additions
 mkdir -p %buildroot%vboxadddir

# install additions

 cp -a \
   VBoxClient \
   VBoxControl \
   VBoxService \
   VBox*.so \
   %buildroot%vboxadddir

# create links

 for n in VBoxClient VBoxControl; do
   ln -s $(relative %vboxadddir/$n %_bindir/$n) %buildroot%_bindir
 done
 ln -s $(relative %vboxadddir/VBoxService %_sbindir/) %buildroot%_sbindir/vboxadd-service

# install sysconfig for vboxadd-service

 mkdir -p %buildroot%_sysconfdir/sysconfig
 cp %SOURCE6 %buildroot%_sysconfdir/sysconfig/vboxadd-service

# install mount vbox share folder

 install -d %buildroot/sbin
 install -m755 mountvboxsf %buildroot/sbin/mount.vboxsf

# install additions support

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

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

# install x11 drivers

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

# 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
%pre_control %name

%post
%post_control -s vboxusers %name

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

%post common
%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/*
%exclude %_bindir/xpidl
%if %build_additions
%exclude %_bindir/VBoxClient
%exclude %_bindir/VBoxControl
%exclude %vboxadddir
%endif
%dir %vboxdir
%attr(4710,root,vboxusers) %vboxdir/VBoxHeadless
%attr(4710,root,vboxusers) %vboxdir/VBoxNetDHCP
%attr(4710,root,vboxusers) %vboxdir/VBoxNetAdpCtl
%attr(4710,root,vboxusers) %vboxdir/VBoxSDL
%attr(4710,root,vboxusers) %vboxdir/VirtualBox
%vboxdir/*
%exclude %vboxdir/sdk
%exclude %vboxdir/xpidl
%_iconsdir/*.png
%_miconsdir/*.png
%_liconsdir/*.png
%_desktopdir/%name.desktop
%_controldir/%name

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

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

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

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

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

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

%if %build_additions
%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
%_initrddir/vboxadd-service
%config(noreplace) %_sysconfdir/sysconfig/vboxadd-service
%_sbindir/vboxadd-service
%_bindir/VBoxClient
%_bindir/VBoxControl
%dir %vboxadddir
%vboxadddir/*
%_sysconfdir/security/console.perms.d/60-vboxadd.perms
%_sysconfdir/X11/xinit.d/98vboxadd-xclient
%endif

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

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

%files sdk
%_bindir/xpidl
%vboxdir/xpidl
%vboxdir/sdk

%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