From 54830bfe0dbae07c411c44d51c5dcbf78cb7fcc5 Mon Sep 17 00:00:00 2001 From: Phil Date: Wed, 6 Apr 2011 18:26:24 +0000 Subject: [PATCH] ndiswrapper-lts: fix kernel --- ndiswrapper-lts/PKGBUILD | 46 +++++++++++++++++++++++++++++ ndiswrapper-lts/ndiswrapper.install | 23 +++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 ndiswrapper-lts/PKGBUILD create mode 100644 ndiswrapper-lts/ndiswrapper.install diff --git a/ndiswrapper-lts/PKGBUILD b/ndiswrapper-lts/PKGBUILD new file mode 100644 index 000000000..3f7927b41 --- /dev/null +++ b/ndiswrapper-lts/PKGBUILD @@ -0,0 +1,46 @@ +# +# Chakra Packages for Chakra, part of chakra-project.org +# +# maintainer (i686): Phil Miller +# maintainer (x86_64): Manuel Tortosa + +# include global config +source ../_buildscripts/${current_repo}-${_arch}-cfg.conf + +_kernver=2.6.35-CHAKRA-LTS + +pkgname=ndiswrapper-lts +pkgver=1.56 +pkgrel=1 +pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For kernel26-testing." +license=('GPL') +arch=(i686 x86_64) +url="http://ndiswrapper.sourceforge.net" +install="ndiswrapper.install" +depends=("ndiswrapper-utils=$pkgver" 'kernel26-lts>=2.6.35' 'kernel26-lts<2.6.36') +makedepends=('kernel26-lts-headers>=2.6.35' 'kernel26-lts-headers<2.6.36') +source=(http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz kernel-2.6.35.patch ndiswrapper-ioctl.patch) +md5sums=('1431f7ed5f8e92e752d330bbb3aed333' + '0a03d613b1fd545a75c5dd1a7c2aaec4' + 'a71bd3add8802e1b2fdff55bf6d0577e') +groups=("kernel26-modules") + +build() +{ + cd $srcdir/ndiswrapper-$pkgver/driver + patch -Np2 -i $startdir/kernel-2.6.35.patch + cd $srcdir/ndiswrapper-$pkgver/ + sed -i -e "s/uname -r/${_kernver}/" Makefile + patch -Np0 -i $startdir/ndiswrapper-ioctl.patch + cd $srcdir/ndiswrapper-$pkgver/driver + make KVERS=$_kernver || return 1 + make DESTDIR=$pkgdir KVERS=$_kernver install || return 1 + rm $pkgdir/lib/modules/$_kernver/modules.* #wtf? + + sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install + # move it to correct kernel directory + mkdir -p $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper + mv $pkgdir/lib/modules/$_kernver/misc/* $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper/ + rm -r $pkgdir/lib/modules/$_kernver/misc/ +} + diff --git a/ndiswrapper-lts/ndiswrapper.install b/ndiswrapper-lts/ndiswrapper.install new file mode 100644 index 000000000..944eae17d --- /dev/null +++ b/ndiswrapper-lts/ndiswrapper.install @@ -0,0 +1,23 @@ +# arg 1: the new package version +post_install() +{ + ndiswrapper -m + KERNEL_VERSION='2.6.35-CHAKRA-LTS' + depmod -ae $KERNEL_VERSION > /dev/null 2>&1 +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() +{ + ndiswrapper -m + KERNEL_VERSION='2.6.35-CHAKRA-LTS' + depmod -ae $KERNEL_VERSION > /dev/null 2>&1 +} + +# arg 1: the old package version +post_remove() +{ + KERNEL_VERSION='2.6.35-CHAKRA-LTS' + depmod -ae $KERNEL_VERSION > /dev/null 2>&1 +}