core/vhba-module/PKGBUILD
2011-11-10 20:10:49 +00:00

31 lines
1.2 KiB
Bash

#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
pkgname=vhba-module
pkgver=20100822
# Find the kernel name inside the chroot
_kernver=`pacman -Q linux | cut -c7-9 | sed 's/linux //g'`-CHAKRA
pkgrel=8
pkgdesc="Kernel module that emulates SCSI devices"
arch=('i686' 'x86_64')
url="http://cdemu.sourceforge.net/"
license=('GPL2')
depends=('linux>=3.1' 'linux<3.2')
makedepends=('linux-headers')
install=vhba-module.install
source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.gz
Make-vhba-compatible-with-kernel-2.6.37-SCSI-host-AP.patch)
md5sums=('1d2f06ae33c5d15b7c29e467e4658aa2'
'f0499fc54f6ef9b8d6ca0b9e940c5906')
build() {
cd "$srcdir/$pkgname-$pkgver"
patch -Np2 -i ${srcdir}/Make-vhba-compatible-with-kernel-2.6.37-SCSI-host-AP.patch || return 1
make -j1 KDIR=/usr/src/linux-${_kernver} || return 1
install -D vhba.ko "$pkgdir/lib/modules/${_kernver}/extra/vhba.ko" || return 1
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" "$startdir/vhba-module.install"
}