updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / madwifi-svn / PKGBUILD
blob583978504cdbe644af0409f3efd413c6c508137a
1 _kernver=`uname -r`
2 pkgname=madwifi-svn
3 pkgver=4148
4 pkgrel=1
5 pkgdesc="Madwifi drivers for Atheros wireless chipsets. For stock arch 2.6 kernel"
6 arch=(i686 x86_64)
7 license=('GPL')
8 url="http://www.madwifi-project.org/"
9 depends=('madwifi-utils-svn' 'kernel26')
10 provides=('madwifi')
11 conflicts=('madwifi')
12 makedepends=('sharutils' 'subversion')
13 install=madwifi-ng.install
14 source=()
15 md5sums=()
17 _svntrunk=http://svn.madwifi-project.org/madwifi/trunk
18 _svnmod=trunk
20 build() {
21         cd $srcdir
22         if [ -d $_svnmod/.svn ]; then
23                 (cd $_svnmod && svn up) || return 1
24         else
25                 svn co $_svntrunk -r $pkgver $_svnmod || return 1
26         fi
27         msg "SVN checkout done or server timeout"
28         msg "Starting make..."
30         [ "${CARCH}" == "i686" ] && export ARCH=i386
31         cd $srcdir/$_svnmod
32         sed -i -e 's/-Werror//g' Makefile.inc
33         make KERNELPATH=/lib/modules/$_kernver/build KERNELRELEASE=$_kernver modules|| return 1
34         make KERNELPATH=/lib/modules/$_kernver/build KERNELRELEASE=$_kernver modules \
35         DESTDIR=$pkgdir KERNELRELEASE=$_kernver install-modules
36         sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
38         # install to wireless kernel directory
39         mkdir -p $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/madwifi
40         mv $pkgdir/lib/modules/$_kernver/net/* $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/madwifi
41         rm -r $pkgdir/lib/modules/$_kernver/net/