summaryrefslogtreecommitdiffstats
path: root/acompiler/virtualbox-module/Pkgfile
blob: 073240188ee86daadc44b3ef9138f81a6676e5f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Description: Modules kernel pour virtualbox
# URL: http://www.virtualbox.org
# Maintainer: NutyX core team
# Packager: thierryn1 at hispeed dot ch

name=virtualbox-module
version=4.0.2
release=1
_name=VirtualBox
_kernel=`uname -r`
_build=69518

[ "`uname -m`" == "i686"   ] && _ARCH=x86
[ "`uname -m`" == "x86_64"   ] && _ARCH=amd64

source=(http://download.virtualbox.org/virtualbox/$version/${_name}-${version}-${_build}-Linux_${_ARCH}.run)



build() {
        sh "VirtualBox-${version}-${_build}-Linux_${_ARCH}.run" --target "$SRC" --keep --noexec
        tar xfj VirtualBox.tar.bz2

        mkdir -p $PKG/lib/modules/${_kernel}/kernel/drivers/misc/
        cd $SRC/src/vboxhost/

        KERNELRELEASE=${_kernel} KERN_DIR=/usr/src/linux-`echo ${_kernel}|sed "s/-NuTyX//"`  make

        for i in vboxdrv.ko vboxnetflt.ko vboxnetadp.ko
        do
                install -D -m0644 $i \
                $PKG/lib/modules/${_kernel}/kernel/drivers/misc/$i
        done
}