summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4db573f8d08f5a9035c70b52adb080797ddcf680 (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
50
51
# Maintainer:

_pkgname="evdi"
pkgname="$_pkgname-dkms-git"
pkgver=1.14.8.r1.g2da2704
pkgrel=1
pkgdesc="Kernel module to enable management of multiple screens"
url="https://github.com/DisplayLink/evdi"
license=('GPL-2.0-only')
arch=('i686' 'x86_64' 'aarch64')

depends=(
  'dkms'
)
makedepends=(
  'git'
  'libdrm'
)

provides=(
  "$_pkgname=${pkgver%%.r*}"
  "$_pkgname-dkms=${pkgver%%.r*}"
)
conflicts=(
  "$_pkgname"
  "$_pkgname-dkms"
)

_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  git describe --long --tags --abbrev=7 --exclude='*-*' \
    | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  cd "$_pkgsrc/library"
  make
}

package() {
  cd "$_pkgsrc"
  make -C 'library' install DESTDIR="$pkgdir" PREFIX='/usr'

  # module for dkms
  install -dm755 "$pkgdir/usr/src/$_pkgname-$pkgver"
  cp --reflink=auto -a module/* "$pkgdir/usr/src/$_pkgname-$pkgver/"
}