pkgname=ndiswrapper-lts _pkgname=ndiswrapper pkgver=1.61 pkgrel=10 pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-lts." license=('GPL') arch=('x86_64') url="http://ndiswrapper.sourceforge.net" depends=("linux-lts=4.4.165") makedepends=("linux-lts-headers=4.4.165") _extramodules=extramodules-CHAKRA-LTS source=("http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz") sha1sums=('213854ca8a83f9b5972db8fa873d346124e4bcb5') prepare() { cd "$srcdir/$_pkgname-$pkgver" sed -i "/modinfo/s/s/usr\//" driver/Makefile } build() { KERNEL_VERSION=$(cat /usr/lib/modules/$_extramodules/version) cd ndiswrapper-$pkgver make -C driver KVERS_UNAME=${KERNEL_VERSION} make -C utils } package() { KERNEL_VERSION=$(cat /usr/lib/modules/$_extramodules/version) cd ndiswrapper-$pkgver make sbindir=usr/sbin usrsbindir=usr/bin KBUILD="/usr/lib/modules/$KERNEL_VERSION/build/" INST_DIR="usr/lib/modules/$_extramodules" \ KVERS=$KERNEL_VERSION DESTDIR="$pkgdir/" install }