#Maintainer: Biru Ionut pkgname=('virtualbox-ose' 'virtualbox-modules' 'virtualbox-ose-additions') pkgbase=('virtualbox-ose') pkgver=3.0.6 pkgrel=1 arch=('i686') url='http://virtualbox.org' license=('GPL' 'custom') makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libxcursor' 'qt' 'libidl2' 'sdl_ttf' 'alsa-lib' 'pulseaudio' 'hal' 'libxtst' 'xalan-c' 'sdl' 'libxmu' 'curl') source=(http://download.virtualbox.org/virtualbox/$pkgver/VirtualBox-$pkgver-OSE.tar.bz2 '60-virtualbox.rules' 'LocalConfig.kmk' '16-no-update.dpatch') md5sums=('8249090b4e08ca2eff3efa9f836f370b' '519d32d8c2408e0ed9d643f412117644' '59e5406d5fc646c72ad0f872d1b97f4f' 'f2fada9add37c0855c60ebd856acabbc') build() { cd "$srcdir/VirtualBox-${pkgver}_OSE" cp "$srcdir/LocalConfig.kmk" . sed -i 's/python2.5/python2.6/g' configure #disable update menu patch -Np1 -i $srcdir/16-no-update.dpatch || return 1 ./configure source ./env.sh kmk all || return 1 #build modules cd out/linux.$BUILD_PLATFORM_ARCH/release/bin/src make || return 1 } package_virtualbox-ose() { pkgdesc="Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)" provides=('virtualbox') conflicts=('virtualbox') depends=('virtualbox-modules' 'libxcursor' 'libidl2' 'libxslt' 'sdl' 'libxmu' 'curl') optdepends=('qt: For VirtualBox GUI' 'libgl: For Shared OpenGL' 'libxt: For Shared Clipboard' 'pulseaudio: For PulseAudio Support' 'python: For Python Support') install=virtualbox.install cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" rm -rf sdk tst* testcase SUPInstall SUPUninstall mkdir -p $pkgdir/usr/{bin,lib/virtualbox/components,share/virtualbox/nls} #Binaries and Wrapper with Launchers install -m 0755 VBox.sh "$pkgdir/usr/bin/VBox" ln -sf VBox "$pkgdir/usr/bin/VBoxHeadless" ln -sf VBox "$pkgdir/usr/bin/VBoxManage" ln -sf VBox "$pkgdir/usr/bin/VBoxSDL" ln -sf VBox "$pkgdir/usr/bin/VirtualBox" install -m 0755 VBoxTunctl "$pkgdir/usr/bin" #components install -m 0755 components/* -t "$pkgdir/usr/lib/virtualbox/components" #lib install -m 0755 *.so "$pkgdir/usr/lib/virtualbox" install -m 0644 *.gc *.r0 "$pkgdir/usr/lib/virtualbox" #setuid root binaries install -m 4755 VBoxHeadless VBoxSDL VBoxNetDHCP VBoxNetAdpCtl VirtualBox VBoxBFE \ -t "$pkgdir/usr/lib/virtualbox" #other binaries install -m 0755 VBoxManage VBoxSVC VBoxXPCOMIPCD VBoxSysInfo.sh xpidl \ VBoxTestOGL vboxshell.py \ -t "$pkgdir/usr/lib/virtualbox" #language install -m 0755 nls/* -t "$pkgdir/usr/share/virtualbox/nls" #icon install -D -m 0644 VBox.png "$pkgdir/usr/share/pixmaps/VBox.png" #desktop install -D -m 0644 virtualbox.desktop "$pkgdir/usr/share/applications/virtualbox.desktop" #install configuration mkdir -p "$pkgdir/etc/vbox" echo 'INSTALL_DIR=/usr/lib/virtualbox' > "$pkgdir/etc/vbox/vbox.cfg" #udev and licence install -D -m 0644 "$srcdir/VirtualBox-${pkgver}_OSE/COPYING" \ "$pkgdir/usr/share/licenses/virtualbox-ose/LICENSE" install -D -m 0644 "$srcdir/60-virtualbox.rules" \ "$pkgdir/etc/udev/rules.d/60-virtualbox.rules" } package_virtualbox-modules(){ _kernver=2.6.30-ARCH pkgdesc="Kernel modules for VirtualBox" license=('GPL') depends=('kernel26>=2.6.30' 'kernel26<2.6.31') install=virtualbox-modules.install cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src" install -D -m644 vboxdrv.ko "$pkgdir/lib/modules/${_kernver}/misc/vboxdrv.ko" install -D -m644 vboxnetflt.ko "$pkgdir/lib/modules/${_kernver}/misc/vboxnetflt.ko" install -D -m644 vboxnetadp.ko "$pkgdir/lib/modules/${_kernver}/misc/vboxnetadp.ko" sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" "$startdir/virtualbox-modules.install" } package_virtualbox-ose-additions(){ pkgdesc="Guest Additions for VirtualBox (Open Source Edition)" depends=('virtualbox-ose-additions-modules' 'gcc-libs' 'libxmu') cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" install -d "$pkgdir/usr/bin" install -m755 VBoxClient VBoxControl VBoxService mountvboxsf \ "$pkgdir/usr/bin" || return 1 install -m755 "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/VBoxRandR.sh \ "$pkgdir"/usr/bin/VBoxRandR || return 1 install -m755 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ "$pkgdir"/etc/X11/xinit/xinitrc.d/98vboxadd-xclient.sh || return 1 install -m755 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/vboxclient.desktop \ "$pkgdir"/etc/xdg/autostart/vboxclient.desktop || return 1 install -D vboxmouse_drv_71.so \ "$pkgdir/usr/lib/xorg/modules/drivers/vboxmouse.so" || return 1 install -D vboxvideo_drv_71.so \ "$pkgdir/usr/lib/xorg/modules/drivers/vboxvideo.so" || return 1 install -m755 -D $srcdir/VirtualBox-${pkgver}_OSE/src/VBox/Additions/linux/installer/90-vboxguest.fdi \ "$pkgdir/usr/share/hal/fdi/policy/20thirdparty/90-vboxguest.fdi" || return 1 install -d "$pkgdir/usr/lib/dri" install -m755 VBoxOGL*.so "$pkgdir/usr/lib" || return 1 ln -sf /usr/lib/VBoxOGL.so $pkgdir/usr/lib/dri/vboxvideo_dri.so }