core/ndiswrapper/PKGBUILD

56 lines
1.7 KiB
Bash
Raw Normal View History

# Source global configuration
source ../linux.conf
2010-06-27 19:40:06 +08:00
pkgname=ndiswrapper
pkgver=1.61
2018-02-12 07:15:18 +08:00
pkgrel=8
2011-08-08 17:00:07 +08:00
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-testing."
2010-03-13 23:25:19 +08:00
license=('GPL')
2012-11-17 09:58:41 +08:00
arch=('x86_64')
2010-03-13 23:25:19 +08:00
url="http://ndiswrapper.sourceforge.net"
install="ndiswrapper.install"
2014-10-04 06:28:08 +08:00
depends=("linux=${_kernelver}")
makedepends=("linux-headers=${_kernelver}")
2011-11-02 03:34:39 +08:00
provides=("ndiswrapper-utils=$pkgver")
replaces=('ndiswrapper-utils')
conflicts=('ndiswrapper-utils')
2011-08-08 17:00:07 +08:00
makedepends=('linux-headers')
source=("http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz"
2017-11-05 19:18:23 +08:00
'linux-4.11.patch'
2018-02-12 07:15:18 +08:00
'linux-4.13.patch'
'linux-4.15.patch')
sha1sums=('213854ca8a83f9b5972db8fa873d346124e4bcb5'
2017-11-05 19:18:23 +08:00
'4d1866b495a7929a3d21b6aebf0fa150702668b6'
2018-02-12 07:15:18 +08:00
'09b308bbc948acc59d33882524b53ce210bb1848'
'324a216a92b8fb7ee4f602974f81375b7e6de3c2')
prepare() {
2015-06-07 20:01:17 +08:00
[ -z "$_kver" ] && error "Could not get kernel version from '/usr/lib/modules/${_extramodules}/version'..." && false
msg "Found kernel version: $_kver"
cd ndiswrapper-$pkgver
2015-06-07 20:01:17 +08:00
patch -p1 -i ../linux-4.11.patch
2017-11-05 19:18:23 +08:00
patch -p2 -i ../linux-4.13.patch
2018-02-12 07:15:18 +08:00
patch -p1 -i ../linux-4.15.patch
2015-06-07 20:01:17 +08:00
sed -i -e 's|strnicmp|strncasecmp|' driver/ndis.c
sed -i "/modinfo/s/s/usr\//" driver/Makefile
}
build() {
cd ndiswrapper-$pkgver
2015-06-07 20:01:17 +08:00
make -C driver KVERS_UNAME=${_kver}
make -C utils
}
package() {
cd ndiswrapper-$pkgver
make sbindir=usr/sbin usrsbindir=usr/bin KBUILD=${_rootOfSourceTree} INST_DIR="usr/lib/modules/$_extramodules" \
2015-06-07 20:01:17 +08:00
KVERS=$_kver DESTDIR="$pkgdir/" install
2010-03-13 23:25:19 +08:00
2015-06-07 20:01:17 +08:00
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
"${startdir}/ndiswrapper.install"
2013-05-02 00:28:53 +08:00
}