This repository has been archived by the owner on Sep 30, 2018. It is now read-only.
/
PKGBUILD
54 lines (45 loc) · 1.63 KB
/
PKGBUILD
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
52
53
54
# Based on the file created for Arch Linux by:
# Ray Rashif <schiv@archlinux.org>
# Mateusz Herych <heniekk@gmail.com>
# Charles Lindsay <charles@chaoslizard.org>
# Maintainer: Guinux <nuxgui@gmail.com>
# Co-Maintainer: Clittle <philm@manjarolinux.org>
_linuxprefix=linux417
_extramodules=extramodules-4.17-MANJARO
pkgname=$_linuxprefix-vhba-module
_pkgname=vhba-module
pkgver=20161009
pkgrel=13
pkgdesc="Kernel module that emulates SCSI devices"
arch=('i686' 'x86_64')
url="http://cdemu.sourceforge.net/"
license=('GPL')
depends=("$_linuxprefix")
makedepends=("$_linuxprefix-headers")
provides=("$_pkgname=$pkgver")
groups=("$_linuxprefix-extramodules")
install=$_pkgname.install
source=("http://downloads.sourceforge.net/cdemu/$_pkgname-$pkgver.tar.bz2"
'60-vhba.rules'
'linux-4.11.patch')
sha256sums=('cd062d8bd61ccb8137622f837a0dadb771cc935981d8bccb2ad4de0bd11f33d9'
'3052cb1cadbdf4bfb0b588bb8ed80691940d8dd63dc5502943d597eaf9f40c3b'
'c0fe3080a88a78c6b1d218acf3a2fd7dbb9420b9845b935f9b3ce1378401d801')
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
patch -p0 -i "$srcdir/linux-4.11.patch"
}
build() {
_kernver="$(cat /usr/lib/modules/$_extramodules/version)"
cd "$srcdir/$_pkgname-$pkgver"
make -j1 KDIR=/usr/lib/modules/${_kernver}/build
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
install -D vhba.ko "$pkgdir/usr/lib/modules/$_extramodules/vhba.ko"
sed -i "s/EXTRAMODULES=.*/EXTRAMODULES=$_extramodules/" \
"$startdir/vhba-module.install"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;
install -Dm644 "$srcdir/60-vhba.rules" \
"$pkgdir/usr/lib/udev/rules.d/60-$_linuxprefix-vhba.rules"
}