-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathPKGBUILD
More file actions
49 lines (41 loc) · 1.33 KB
/
Copy pathPKGBUILD
File metadata and controls
49 lines (41 loc) · 1.33 KB
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
# Maintainer: foo <foo(at)example(dot)org>
# Contributor: bar <bar(at)example(dot)org>
_pkgbase=rcraid
pkgname=rcraid-dkms
pkgver=17.2.1
pkgrel=2
pkgdesc="AMD AM4 socket X370/X470 chipset motherbroad NVMe/SATA RAID driver (DKMS)"
arch=('i686' 'x86_64')
url="https://www.amd.com/en/support/chipsets/amd-socket-am4/x370"
license=('GPL2')
depends=('dkms')
optdepends=('linux-headers>=4.15: build modules against the Arch kernel'
'linux-lts-headers>=4.15: build modules against the LTS kernel'
'linux-zen-headers>=4.15: build modules against the ZEN kernel'
'linux-hardened-headers>=4.15: build modules against the HARDENED kernel')
source=('dkms.conf')
md5sums=('3a14dcc84daf257a62727bcde1882edf')
prepare()
{
cp -r "${startdir}"/../src/* "${srcdir}"
}
build() {
cd ${srcdir}
make
}
package() {
# Copy dkms.conf
install -Dm644 "${startdir}"/dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
# Set name and version
sed -e "s/@_PKGBASE@/${_pkgbase}/" \
-e "s/@PKGVER@/${pkgver}/" \
-i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
if [ "$KVERS" == "" ]; then
KVERS=$(uname -r)
fi
install -Dm644 rcraid.ko "${pkgdir}"/usr/lib/modules/$(echo -n $KVERS)/kernel/drivers/scsi/rcraid.ko
make clean
rm dkms.conf
rm rcraid.mod
cp -r * "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
}