You are not logged in.

#1 2008-09-04 12:46:45

gimpel
Member
From: Jena, Germany
Registered: 2008-02-08
Posts: 23

[Request] Virtualbox bin 2.0

hi,

I would really appreciate if somebody could create a PKGBUILD
for the new virtualbox version 2.0 released today.

(Not OSE)


http://www.virtualbox.org/wiki/Downloads


god is real unless declared integer

Offline

#2 2008-09-04 16:01:41

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [Request] Virtualbox bin 2.0

Please don't forget that you can always grab the PKGBUILD from ABS or the AUR and modify it accordingly (change version number, correct md5sums, etc). smile

Anyway, here's a PKGBUILD that worked for me (I would, however, recommend you to replace it with the official package once it's updated):

(You'll need to download virtualbox_bin first and substitute its PKGBUILD with the one below)

# Maintainer: thotypous <matiasΘarchlinux-br·org>
# Contributor: Peter 'piie' Feuerer <peterΘpiie·net>
# Contributor: Sascha Pfau <MrPeacockΘgmail·com>
# Contributor: iggy <iggy.mfΘgmail·com>

pkgname="virtualbox2_bin"
pkgver="2.0.0"
_rev="36011"
pkgrel="1"
pkgdesc="Powerful x86 virtualization (Personal Use Binaries Edition)"
url="http://www.virtualbox.org"
license=('custom:PUEL')
backup=('etc/vbox/interfaces')
arch=('i686' 'x86_64')
install=('vbox.install')
md5sums=('0aa74535894ed980c13a634887653394'
         'cda1cabca237db7caab94e9eb2dc2456'
         'f30e78505cdebc925519e1146c22cc8a'
         '9576c4ee3c362f7bc30525a4f07ea3ed'
         '23d094a975174b7b599fb93bc0c43936')

_architect='x86'
[ "$CARCH" = "x86_64" ] && _architect='amd64'

#
# Good news! Manual download is no more needed.
#
source=("http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}-${_rev}-Linux_${_architect}.run" 
        'vbox.install'
        'vboxnet.patch'
        'vbox_build_module'
        'interfaces')

[ "$CARCH" = "x86_64" ] && md5sums[0]='cf1f8d6c9f22ed3180d53c3d5477543f'

install=('vbox.install')
depends=('libstdc++5')
optdepends=("qt3: For VirtualBox GUI"
            "sdl: For VBoxSDL")
provides=("virtualbox=${pkgver}")
conflicts=('virtualbox-ose' 'virtualbox-modules')
makedepends=('patch')

build() {
    cd "$srcdir"

    # Check package
    sh "VirtualBox-${pkgver}-${_rev}-Linux_${_architect}.run" --check || return 1

    # Unpack
    echo yes | sh "VirtualBox-${pkgver}-${_rev}-Linux_${_architect}.run" --target "$srcdir" \
        --nox11 --noexec &>/dev/null || return 1

    mkdir -p \
        "$pkgdir/opt/virtualbox" \
        "$pkgdir/usr/bin" \
        "$pkgdir/etc/udev/rules.d" \
        "$pkgdir/usr/share/applications" \
        "$pkgdir/usr/share/pixmaps" || return 1

    cd "$pkgdir/opt/virtualbox"
    tar -jxf "$srcdir/VirtualBox.tar.bz2"

    # Install vbox_build_module
    install -D -m744 "$srcdir/vbox_build_module" "$pkgdir/usr/bin/vbox_build_module"

    # NOTE: Comment the following line if you want the SDK.
    rm -Rf "$pkgdir/opt/virtualbox/sdk"

    # Symlink the launchers
    for app in "VBoxAddIF" "VBoxDeleteIF"; do
        ln -s "/opt/virtualbox/VBoxAddIF.sh" "$pkgdir/usr/bin/$app"
    done
    for app in "VirtualBox" "VBoxManage" "VBoxSDL" "VBoxVRDP" "VBoxHeadless"; do
        ln -s "/opt/virtualbox/VBox.sh" "$pkgdir/usr/bin/$app"
    done
    ln -s "/opt/virtualbox/VBoxTunctl" "$pkgdir/usr/bin/VBoxTunctl"

    # Symlink the desktop icon
    ln -s "/opt/virtualbox/VBox.png" "$pkgdir/usr/share/pixmaps/VBox.png"
    ln -s "/opt/virtualbox/VirtualBox.desktop" "$pkgdir/usr/share/applications/VirtualBox.desktop"

    # Replace some init scripts by simplified stuff
    sed -i -e 's,sudo /etc/init.d/vboxdrv setup,/usr/bin/vbox_build_module,g' "$pkgdir/opt/virtualbox/VBox.sh"
    sed -i -e 's,sudo /etc/init.d/virtualbox restart,modprobe vboxdrv,g' "$pkgdir/opt/virtualbox/VBox.sh"

    # Add udev rules
    echo 'KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"' > \
        "$pkgdir/etc/udev/rules.d/60-vboxdrv.rules"

    # Install interfaces
    install -D -m644 "$srcdir/interfaces" "$pkgdir/etc/vbox/interfaces"

    # Point the installation directory to vbox
    echo '# VirtualBox installation directory' > "$pkgdir/etc/vbox/vbox.cfg"
    echo 'INSTALL_DIR="/opt/virtualbox"'      >> "$pkgdir/etc/vbox/vbox.cfg"

    # Patch the vboxnet initscript
    cd $srcdir
    patch < "vboxnet.patch" || return 1
    install -D -m755 "$srcdir/vboxnet.sh" "$pkgdir/etc/rc.d/vboxnet"

    # Link the license
    mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
    ln -s "/opt/virtualbox/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/PUEL"

    # Set the setuid bit on a few binaries
    for binary in VirtualBox VBoxSDL VBoxHeadless ; do
        chmod u+s $pkgdir/opt/virtualbox/$binary
    done
}

Last edited by foutrelis (2008-09-04 16:14:30)

Offline

#3 2008-09-05 11:28:33

gimpel
Member
From: Jena, Germany
Registered: 2008-02-08
Posts: 23

Re: [Request] Virtualbox bin 2.0

Thanks for the PKGBUILD

worked for me, after commenting out the md5sums and manually renaming the downloaded VirtualBox*.run Installer

nice work


god is real unless declared integer

Offline

#4 2008-09-05 11:47:23

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [Request] Virtualbox bin 2.0

virtualbox 2  is in aur.


Give what you have. To someone, it may be better than you dare to think.

Offline

Board footer

Powered by FluxBB