blob: 024b0883b6fb1345aec1e314e4d7539d8a2ce36b (
plain)
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: Enrico Pozzobon <enricopozzobon@gmail.com>
pkgname=can-isotp-dkms-git
_pkgbase=can-isotp
pkgver=r26.ced84ca
pkgrel=1
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
pkgdesc="Kernel modules for isotp"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/hartkopp/can-isotp"
license=('GPL2')
makedepends=('git')
depends=('dkms')
optdepends=('can-utils: utilities for sending and receiving ISOTP messges'
'linux-headers: build the module against Arch kernel'
'linux-lts-headers: build the module against LTS Arch kernel')
source=("git+https://github.com/hartkopp/can-isotp.git"
'dkms.conf')
sha256sums=('SKIP'
'4e69b728bacd8aba3281b55aef2da2e8737d6a380be2d8ed397e09f79651f317')
pkgver() {
cd "$srcdir/${_pkgbase}"
# Git, no tags available
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
# Install
install -dm755 "${pkgdir}/usr/src/${_pkgbase}-${pkgver}"
cp -r can-isotp/* "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/"
# Copy dkms.conf
install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
# Patch makefile to work with dkms, and use the specified kernel release
sed -e s/else// \
-e s/shell\ uname\ \-r/KERNELRELEASE/ \
-i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/Makefile
# Set name and version
sed -e "s/@_PKGBASE@/${_pkgbase}/" \
-e "s/@PKGVER@/${pkgver}/" \
-i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
}
# vim:set ts=2 sw=2 et:
|