introduced vhba-module-dkms

This commit is contained in:
AlmAck 2018-11-28 22:40:23 +01:00
parent 8385c4cb9a
commit 95db468127
2 changed files with 33 additions and 8 deletions

View File

@ -1,6 +1,7 @@
pkgname=vhba-module
pkgbase=vhba-module
pkgname=(vhba-module vhba-module-dkms)
pkgver=20170610
pkgrel=16
pkgrel=17
pkgdesc="Kernel module that emulates SCSI devices"
arch=('x86_64')
url="http://cdemu.sourceforge.net/"
@ -9,21 +10,36 @@ depends=("linux=4.18.12")
makedepends=("linux-headers=4.18.12")
_extramodules=extramodules-CHAKRA
source=("http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2"
60-vhba.rules)
60-vhba.rules dkms.conf)
md5sums=('f9478a5f5528fc672c204b6b4bd02213'
'4dc37dc348b5a2c83585829bde790dcc')
'4dc37dc348b5a2c83585829bde790dcc'
'7da9314812d9ea665df0db33052c7452')
prepare() {
cd $pkgname-$pkgver
}
build() {
cd $pkgname-$pkgver
cd $pkgbase-$pkgver
make KERNELRELEASE="$(cat /usr/lib/modules/$_extramodules/version)"
}
package() {
cd $pkgname-$pkgver
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 vhba.ko
package_vhba-module() {
cd $pkgbase-$pkgver
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 *.ko
install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
echo 'g cdemu - -' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/cdemu.conf"
find "$pkgdir" -name '*.ko' -exec xz {} +
}
package_vhba-module-dkms() {
depends=(dkms)
provides=("vhba-module=$pkgver-$pkgrel")
conflicts=(vhba-module)
cd $pkgbase-$pkgver
install -Dt "$pkgdir/usr/src/$pkgbase-$pkgver" -m644 Makefile vhba.c ../dkms.conf
install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
echo 'g cdemu - -' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/cdemu.conf"
}

9
vhba-module/dkms.conf Normal file
View File

@ -0,0 +1,9 @@
PACKAGE_NAME="vhba-module"
PACKAGE_VERSION="#MODULE_VERSION#"
AUTOINSTALL="yes"
MAKE[0]="make KERNELRELEASE=$kernelver"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="vhba"
DEST_MODULE_LOCATION[0]="/kernel/drivers/scsi"