summaryrefslogtreecommitdiff
path: root/virtualbox/Pkgfile
blob: 98db5fd3ed9ca31c322cf58c83ed7c70b2ef74ad (plain)
    1 # Description: VirtualBox is a general-purpose full virtualizer for x86 hardware.
    2 # URL: http://www.virtualbox.org/
    3 # Maintainer: Jose V Beneyto, sepen at crux dot nu
    4 # Packager: Jose V Beneyto, sepen at crux dot nu
    5 # Depends on: bin86 dev86 libsdl libidl qt4 xerces-c iasl xorg-libxmu libcap makeself cdrkit glu libvpx
    6 
    7 name=virtualbox
    8 version=4.3.10
    9 release=1
   10 source=(http://download.virtualbox.org/$name/${version%-*}/VirtualBox-${version}.tar.bz2 \
   11         $name 60-vboxdrv.rules $name.desktop)
   12 
   13 build() {
   14   # environment value
   15   [ ! -z $KERN_DIR ] && KARG="KERN_DIR=$KERN_DIR"
   16 
   17   cd VirtualBox-$version
   18 
   19   sed -i Config.kmk \
   20       -e "s|VBOX_WITH_WARNINGS_AS_ERRORS = 1|VBOX_WITH_WARNINGS_AS_ERRORS =|g" \
   21       -e "s|VBOX_WITH_PAM = 1|VBOX_WITH_PAM =|g"
   22 
   23   sed -i src/VBox/Devices/PC/vbox.dsl \
   24       -e 's|Name (_CID, "smc-napa")|Name (_CID, "smcnapa")|'
   25 
   26   # compile
   27   ./configure --with-qt4-dir=/usr/share/qt4 \
   28               --disable-hardening \
   29               --ose \
   30               --disable-pulse \
   31               --disable-python \
   32               --disable-java \
   33               --disable-docs
   34 
   35   source ./env.sh
   36   kmk all
   37 
   38   # compile kernel modules
   39   cd out/linux.amd64/release/bin/src
   40 
   41   make $KARG
   42 
   43   # install kernel modules
   44   install -d $PKG/lib/modules/$(uname -r)/kernel/drivers/misc
   45   install -m 0644 *.ko $PKG/lib/modules/$(uname -r)/kernel/drivers/misc
   46 
   47   # remove superfluous files
   48   rm -rf $SRC/VirtualBox-$version/out/linux.amd64/release/bin/{sdk/samples,testcase,nls*}
   49   find $SRC/VirtualBox-$version/out/linux.amd64/release/bin -type f -name 'tst*' -exec rm -rf {} \;
   50 
   51   # do the rest
   52   install -D -m 0644 $SRC/60-vboxdrv.rules $PKG/etc/udev/rules.d/60-vboxdrv.rules
   53   install -d $PKG/usr/{bin,share/$name,share/pixmaps}
   54   install -m 0755 $SRC/$name $PKG/usr/bin/$name
   55   mv $SRC/VirtualBox-$version/out/linux.amd64/release/{bin,lib} $PKG/usr/share/$name
   56   chown root:vboxusers $PKG/usr/share/$name/bin/VirtualBox
   57   install -D -m 0644 $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
   58   mv $PKG/usr/share/$name/bin/VBox.png $PKG/usr/share/pixmaps/$name.png
   59   rm $PKG/usr/share/$name/bin/{VBox.sh,SUP*nstall}
   60 }

Generated by cgit