1 # Maintainer: Trent McPheron <twilightinzero@gmail.com>
2 # Based on package by Tobias Powalowski <tpowa@archlinux.org>
4 pkgname=ndiswrapper-all
7 pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. Builds for all detected kernels."
10 url="http://ndiswrapper.sourceforge.net"
11 install="ndiswrapper-all.install"
12 depends=("ndiswrapper-utils=$pkgver" 'kernel26')
13 makedepends=('kernel26-headers')
14 provides=('ndiswrapper')
15 source=(http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz
17 md5sums=('1431f7ed5f8e92e752d330bbb3aed333'
18 '0a03d613b1fd545a75c5dd1a7c2aaec4')
22 cd $srcdir/ndiswrapper-$pkgver/driver
23 patch -Np2 -i $startdir/kernel-2.6.35.patch
25 # Loop through all detected kernels. Same way it's done in nvidia-all.
26 for _kernver in `file /boot/* | grep 'Linux kernel.*boot executable' | grep 'vmlinuz' | sed 's/.*version \([^ ]\+\).*/\1/'`;
28 msg2 "Building module for $_kernver..."
29 make KVERS=$_kernver || return 1
30 make DESTDIR=$pkgdir KVERS=$_kernver install || return 1
31 rm $pkgdir/lib/modules/$_kernver/modules.* #wtf?
33 # move it to correct kernel directory
34 mkdir -p $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper
35 mv $pkgdir/lib/modules/$_kernver/misc/* $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper/
36 rm -r $pkgdir/lib/modules/$_kernver/misc/