summaryrefslogtreecommitdiff
path: root/community/ndiswrapper/PKGBUILD
blob: 873b2ab9b9cf64613b7e5ec20c614fab211d1e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# $Id: PKGBUILD 79177 2012-10-31 07:25:04Z tpowa $
# Maintainer:  Thorsten Töpper <atsutane-tu@freethoughts.de>
# Contributor: SpepS <dreamspepser at yahoo dot it>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>

_extramodules=extramodules-3.6-ARCH
pkgname=ndiswrapper
pkgver=1.57
pkgrel=26
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors."
license=('GPL')
arch=('i686' 'x86_64')
url="http://ndiswrapper.sourceforge.net"
install=ndiswrapper.install
depends=('linux>=3.6' 'linux<3.7' 'wireless_tools' 'perl')
makedepends=('linux-headers')
provides=("$pkgname-utils" "$pkgname-bin")
replaces=("$pkgname-utils" "$pkgname-bin")
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
        "linux33.patch")
options=('!strip')
md5sums=('7a401dc540938bf07893c67f418b6152'
         '061e59a934ca3ae4be55a86d86b2c1f5')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  _kver="$(cat /usr/lib/modules/${_extramodules}/version)"

  # modinfo path fix
  sed -i "/modinfo/s/s/usr\//" driver/Makefile
  patch -i "$srcdir/linux33.patch" -N -p0

  # make sure we point to the right build directory
  sed -i "/^KBUILD/ s,.*,KBUILD = $(readlink -f /usr/lib/modules/$_kver/build)," driver/Makefile

  make KVERS=$_kver
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  _kver="$(cat /usr/lib/modules/${_extramodules}/version)"

  make INST_DIR="usr/lib/modules/$_extramodules" \
    KVERS=$_kver DESTDIR="$pkgdir/" install

  gzip "$pkgdir/usr/lib/modules/$_extramodules/$pkgname.ko"
}

# vim:set ts=2 sw=2 et: