PKGBUILD 850 Bytes
Newer Older
Phil's avatar
Phil committed
1 2

pkgname=vhba-module-lts
3
_pkgname=vhba-module
Chaoting Liu's avatar
Chaoting Liu committed
4
pkgver=20170610
Luca Giambonini's avatar
Luca Giambonini committed
5
pkgrel=5
Phil's avatar
Phil committed
6
pkgdesc="Kernel module that emulates SCSI devices"
7
arch=('x86_64')
Phil's avatar
Phil committed
8 9
url="http://cdemu.sourceforge.net/"
license=('GPL2')
Xuetian Weng's avatar
Xuetian Weng committed
10
depends=("linux-lts>=${_kernelver}")
Luca Giambonini's avatar
Luca Giambonini committed
11
makedepends=("linux-lts-headers=4.4.147")
Phil's avatar
Phil committed
12
install=vhba-module.install
13 14
source=("http://sourceforge.net/projects/cdemu/files/vhba-module/vhba-module-$pkgver.tar.bz2"
        '60-vhba.rules')
Chaoting Liu's avatar
Chaoting Liu committed
15
md5sums=('f9478a5f5528fc672c204b6b4bd02213'
16
         '4dc37dc348b5a2c83585829bde790dcc')
Phil's avatar
Phil committed
17

18 19 20 21
prepare() {
  cd $_pkgname-$pkgver
}

Phil's avatar
Phil committed
22
build() {
23 24
  cd "$_pkgname-$pkgver"

Chaoting Liu's avatar
Chaoting Liu committed
25
  make KDIR=$_rootOfSourceTree KERNELRELEASE=$_kver
Phil's avatar
Phil committed
26
}
Phil's avatar
Phil committed
27

Phil's avatar
Phil committed
28
package() {
29 30
  cd $_pkgname-$pkgver
  install -Dm644 vhba.ko "$pkgdir/usr/lib/modules/${_extramodules}/vhba.ko"
Phil's avatar
Phil committed
31
  sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/vhba-module.install"
Phil's avatar
Phil committed
32
}