Репозиторий Sisyphus
Последнее обновление: 24 сентября 2020 | Пакетов: 17698 | Посещений: 19284876
en ru br
Репозитории ALT
5.1: 4.0.12-alt0.M51.1
4.1: 2.1.4-alt0.M41.5

Группа :: Эмуляторы
Пакет: virtualbox

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

#define rev 2459
%define modname kernel-source-virtualbox
%define modnamenetflt kernel-source-virtualbox-netfilter
%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

%define distname VirtualBox

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

Name: virtualbox
Version: 2.1.4
Release: alt0.M41.5

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
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: VirtualBox-2.1.0-alt-rpath.patch
Patch1: VirtualBox-2.1.2-alt-init-scripts.patch
Patch2: VirtualBox-2.1.0-alt-vboxnetflt.patch
Patch3: VirtualBox-2.1.0-alt-x86_64-build.patch
Patch4: VirtualBox-2.1.0-alt-xpcom.patch
Patch5: VirtualBox-2.1.4-alt-swab.patch
Patch6: VirtualBox-2.1.4-alt-ostype.patch

Patch10: vbox-futex.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
Patch25: vbox-kbuild_unit_paths.diff
Patch26: vbox-evdev.patch

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

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

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

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

%setup -q -n %distarchive
%patch -p2
%patch1 -p2
#patch2 -p2
%patch3 -p2
%patch4 -p2
%patch5 -p2
%patch6 -p2

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

# 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

## 0.6.2 in state is apparently too new - needs 0.6.0 specifically
%patch20 -p1
%patch22 -p1

export GCC_VERSION=4.1
./configure \
   --disable-kmods \
   --disable-qt3 \
   --with-qt4-dir=%_qt4dir \
%if "%build_additions" == "0"
echo "VBOX_WITH_X11_ADDITIONS        := " >> AutoConfig.kmk
source env.sh
[ -n "$NPROCS" ] || NPROCS=%__nprocs
kmk -j$NPROCS VBOXDIR=%vboxdir

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 \

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

# install application

cd out/%vbox_platform/release/bin

#    SUPInstall \

#    SUPUninstall \
cp -a \
   VBoxBFE \
   VBoxManage \
   VBoxSDL \
   VBoxSVC \
   VBoxTunctl \
   VirtualBox \
   VBoxHeadless \
   xpidl \
   *.gc \
   *.r0 \
   *.so \
   components/ \
   nls/ \
   sdk/ \

# create links

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

# install kernel sources

cp -a src/vboxdrv %buildroot%kernel_src/%modname-%version
cp -a src/vboxnetflt %buildroot%kernel_src/%modnamenetflt-%version
pushd %buildroot%kernel_src
tar -c %modname-%version | bzip2 -c > \
rm -rf %buildroot%kernel_src/%modname-%version
tar -c %modnamenetflt-%version | bzip2 -c > \
rm -rf %buildroot%kernel_src/%modnamenetflt-%version

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 > \
 rm -rf %buildroot%kernel_src/%modnameadd-%version

# install VFS kernel sources

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

%if %build_additions
# install 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 VBoxControl %buildroot%_bindir
 install -m755 %SOURCE3 %buildroot%_sysconfdir/X11/xinit.d

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

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

 install -d %buildroot%_x11modulesdir/{input,drivers}
 install vboxmouse_drv_14.so %buildroot%_x11modulesdir/input/vboxmouse_drv.so
 install vboxvideo_drv_14.so %buildroot%_x11modulesdir/drivers/vboxvideo_drv.so

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

%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" ||:

%exclude %_bindir/xpidl
%if %build_additions
%exclude %_bindir/VBoxClient
%exclude %_bindir/VBoxControl
%dir %vboxdir
%attr(4710,root,vboxusers) %vboxdir/VBoxHeadless
%attr(4710,root,vboxusers) %vboxdir/VBoxSDL
%attr(4710,root,vboxusers) %vboxdir/VirtualBox
%exclude %vboxdir/sdk
%exclude %vboxdir/xpidl

%files -n %modname

%files -n %modnamenetflt

%files -n %modnameadd

%files -n %modnamevfs

%if %build_additions
%files -n xorg-x11-drv-vboxmouse

%files -n xorg-x11-drv-vboxvideo

%files guest-additions

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

%files doc

%files sdk


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin