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

AlmAck's avatar
AlmAck committed
3
_extramodules=extramodules-3.14-CHAKRA-LTS
Phil's avatar
Phil committed
4
_kver="$(cat /lib/modules/${_extramodules}/version)"
AlmAck's avatar
AlmAck committed
5
_kernelver=3.14.57
AlmAck's avatar
AlmAck committed
6
_rootOfSourceTree=/usr/src/linux-${_kver}
Phil's avatar
Phil committed
7 8

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

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

AlmAck's avatar
AlmAck committed
28 29
  cd "$srcdir/$_pkgname-$pkgver" 
  patch -p1 -i ../ndiswrapper-1.59.patch
30
  sed -i "/modinfo/s/s/usr\//" driver/Makefile
AlmAck's avatar
AlmAck committed
31 32 33 34 35 36
}

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

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

AlmAck's avatar
AlmAck committed
42 43
  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
44

AlmAck's avatar
AlmAck committed
45 46 47
  sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
          "${startdir}/ndiswrapper.install"
}