mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 21:07:13 +08:00
50 lines
1.4 KiB
Bash
50 lines
1.4 KiB
Bash
# Source global configuration
|
|
source ../linux.conf
|
|
|
|
pkgname=ndiswrapper
|
|
pkgver=1.61
|
|
pkgrel=4
|
|
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-testing."
|
|
license=('GPL')
|
|
arch=('x86_64')
|
|
url="http://ndiswrapper.sourceforge.net"
|
|
install="ndiswrapper.install"
|
|
depends=("linux=${_kernelver}")
|
|
makedepends=("linux-headers=${_kernelver}")
|
|
provides=("ndiswrapper-utils=$pkgver")
|
|
replaces=('ndiswrapper-utils')
|
|
conflicts=('ndiswrapper-utils')
|
|
makedepends=('linux-headers')
|
|
source=("http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz"
|
|
'linux-4.11.patch')
|
|
sha1sums=('213854ca8a83f9b5972db8fa873d346124e4bcb5'
|
|
'4d1866b495a7929a3d21b6aebf0fa150702668b6')
|
|
|
|
prepare() {
|
|
[ -z "$_kver" ] && error "Could not get kernel version from '/usr/lib/modules/${_extramodules}/version'..." && false
|
|
msg "Found kernel version: $_kver"
|
|
|
|
cd ndiswrapper-$pkgver
|
|
|
|
patch -p1 -i ../linux-4.11.patch
|
|
|
|
sed -i -e 's|strnicmp|strncasecmp|' driver/ndis.c
|
|
sed -i "/modinfo/s/s/usr\//" driver/Makefile
|
|
}
|
|
|
|
build() {
|
|
cd ndiswrapper-$pkgver
|
|
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" \
|
|
KVERS=$_kver DESTDIR="$pkgdir/" install
|
|
|
|
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
|
|
"${startdir}/ndiswrapper.install"
|
|
}
|