1 # Contributor: JokerBoy <jokerboy at punctweb dot ro>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
4 pkgname=virtualbox-bfs-modules
7 pkgdesc='Linux-bfs kernel modules for VirtualBox'
9 url='http://virtualbox.org'
11 depends=('linux-bfs>=3.2' 'linux-bfs<3.3' "virtualbox=${pkgver}")
12 makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libpng' 'libidl2' 'xalan-c' 'sdl' 'linux-bfs-headers')
13 [[ "$CARCH" == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc')
14 source=("http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2"
16 md5sums=('2092bba46baa62fab5520d67dee2ece8'
17 'cd738bd44e0cec4ee227f252565ecb73')
18 install=virtualbox-bfs-modules.install
20 _extramodules=extramodules-3.2-bfs
21 _kernver="$(cat /lib/modules/${_extramodules}/version)"
23 export KERN_DIR="/lib/modules/${_kernver}/build"
24 export KERN_INCL="/usr/src/linux-${_kernver}/include/"
27 cd "$srcdir/VirtualBox-${pkgver}_OSE"
28 cp "$srcdir/LocalConfig.kmk" .
30 --with-linux=/usr/src/linux-${_kernver} \
44 make -C "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
48 source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh"
49 cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src"
50 install -D -m644 vboxdrv.ko \
51 "$pkgdir/lib/modules/${_extramodules}/vboxdrv.ko"
52 install -D -m644 vboxnetadp.ko \
53 "$pkgdir/lib/modules/${_extramodules}/vboxnetadp.ko"
54 install -D -m644 vboxnetflt.ko \
55 "$pkgdir/lib/modules/${_extramodules}/vboxnetflt.ko"
56 install -D -m644 vboxpci.ko \
57 "$pkgdir/lib/modules/${_extramodules}/vboxpci.ko"
58 find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
59 sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "$startdir/virtualbox-bfs-modules.install"