PKGBUILD 1.32 KB
Newer Older
Neophytos's avatar
Neophytos committed
1
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
Phil's avatar
Phil committed
2

3 4
# Source global configuration
source ../linux-lts.conf
Phil's avatar
Phil committed
5 6

pkgname=ndiswrapper-lts
7
_pkgname=ndiswrapper
8 9 10
pkgver=1.60
pkgrel=1
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-lts."
Phil's avatar
Phil committed
11
license=('GPL')
12
arch=('x86_64')
Phil's avatar
Phil committed
13 14
url="http://ndiswrapper.sourceforge.net"
install="ndiswrapper.install"
Xuetian Weng's avatar
Xuetian Weng committed
15 16
depends=("linux-lts=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
17 18
source=("http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz")
sha1sums=('20998237cf6d37b86391dc8736c10031110db578')
Phil's avatar
Phil committed
19

AlmAck's avatar
AlmAck committed
20 21 22
prepare() {
  [ -z "$_kver" ] && error "Could not get kernel version from '/usr/lib/modules/${_extramodules}/version'..." && false
  msg "Found kernel version: $_kver"
23

AlmAck's avatar
AlmAck committed
24
  cd "$srcdir/$_pkgname-$pkgver" 
25
  #patch -p1 -i ../ndiswrapper-1.59.patch
26
  sed -i "/modinfo/s/s/usr\//" driver/Makefile
AlmAck's avatar
AlmAck committed
27 28 29 30 31 32
}

build() {
  cd "$srcdir/$_pkgname-$pkgver"        
  make -C driver KVERS_UNAME=${_kver}
  make -C utils
philm's avatar
philm committed
33 34 35
}

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

AlmAck's avatar
AlmAck committed
38 39
  make sbindir=/usr/sbin usrsbindir=/usr/sbin KBUILD=${_rootOfSourceTree} INST_DIR="usr/lib/modules/$_extramodules" \
        KVERS=$_kver DESTDIR="$pkgdir/" install
Phil's avatar
Phil committed
40

AlmAck's avatar
AlmAck committed
41 42
  sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
          "${startdir}/ndiswrapper.install"
43
}