PKGBUILD 1.18 KB
Newer Older
Neophytos's avatar
Neophytos committed
1 2
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# contributor: abveritas@chakra-project.org
Phil's avatar
Phil committed
3 4

# Find the kernel name inside the chroot
5
_extramodules=extramodules-3.2-lts
Phil's avatar
Phil committed
6
_kver="$(cat /lib/modules/${_extramodules}/version)"
Xuetian Weng's avatar
Xuetian Weng committed
7
_kernelver=3.2.63
Phil's avatar
Phil committed
8 9

pkgname=ndiswrapper-lts
10
_pkgname=ndiswrapper
Neophytos's avatar
Neophytos committed
11
pkgver=1.59
Xuetian Weng's avatar
Xuetian Weng committed
12
pkgrel=4
Phil's avatar
Phil committed
13
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-testing."
Phil's avatar
Phil committed
14
license=('GPL')
15
arch=('x86_64')
Phil's avatar
Phil committed
16 17
url="http://ndiswrapper.sourceforge.net"
install="ndiswrapper.install"
Xuetian Weng's avatar
Xuetian Weng committed
18 19
depends=("linux-lts=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
20
source=("http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz")
Neophytos's avatar
Neophytos committed
21
md5sums=('e26a7213468ccd6b0bb4c211c7aadeaa')
Phil's avatar
Phil committed
22

Phil's avatar
Phil committed
23
build() {
24 25 26
  cd "$srcdir/$_pkgname-$pkgver"

  sed -i "/modinfo/s/s/usr\//" driver/Makefile
Neophytos's avatar
Neophytos committed
27
  
AlmAck's avatar
AlmAck committed
28
  make KBUILD=/usr/src/linux-$_kver KVERS=$_kver
philm's avatar
philm committed
29 30 31
}

package() {
32
  cd "$srcdir/$_pkgname-$pkgver"
Phil's avatar
Phil committed
33

34
  make KBUILD=/usr/src/linux-$_kver INST_DIR="usr/lib/modules/$_extramodules" \
Phil's avatar
Phil committed
35
    KVERS=$_kver DESTDIR="$pkgdir/" install
Phil's avatar
Phil committed
36

Phil's avatar
Phil committed
37
  # rm ndiswrapper
38
  rm -r "$pkgdir/usr/share" "$pkgdir/usr/sbin" "$pkgdir/sbin"
Phil's avatar
Phil committed
39

40
  gzip "$pkgdir/usr/lib/modules/$_extramodules/$_pkgname.ko"
Neophytos's avatar
Neophytos committed
41
}