# $Id: PKGBUILD 58264 2011-11-09 15:50:55Z jelle $ # Maintainer: Mateusz Herych # Contributor: Charles Lindsay pkgname=vhba-module pkgver=20110915 #_kernver='3.1.0-ARCH' _extramodules=extramodules-3.1-ARCH _kernver="$(cat /lib/modules/${_extramodules}/version)" pkgrel=2 pkgdesc="Kernel module that emulates SCSI devices" arch=('i686' 'x86_64' 'mips64el') url="http://cdemu.sourceforge.net/" license=('GPL2') depends=('linux>=3.1' 'linux<3.2') makedepends=('linux-headers>=3.1') install=vhba-module.install source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.gz) md5sums=('fb90cd8fc4cd74d08c92e8235f99f1f4') build() { cd "$srcdir/$pkgname-$pkgver" make -j1 KDIR=/usr/src/linux-${_kernver} } package() { cd "$srcdir/$pkgname-$pkgver" install -D vhba.ko "$pkgdir/lib/modules/${_extramodules}/vhba.ko" sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/vhba-module.install" }