summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4cca7e64046ce13686d6a78de967cde2559fee28 (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
# Maintainer: Eric Engestrom <aur [at] engestrom [dot] ch>

pkgname=drminfo-git
pkgver=8.1
pkgrel=1
pkgdesc="print drm device information"
arch=('i686' 'x86_64')
url="https://www.kraxel.org/cgit/drminfo/"
license=('GPLv2')
source=('git://git.kraxel.org/drminfo')
sha256sums=('SKIP')
depends=('libdrm' 'mesa' 'libepoxy' 'pixman' 'gtk3')
makedepends=('git' 'meson')
checkdepends=('python-avocado')
conflicts=('drminfo')
provides=("drminfo=${pkgver%+*}")

pkgver() {
  cd drminfo
  git describe --long --abbrev=10 | sed 's/^drminfo-//; s/-/./; s/-/+/; s/-/./'
}

build() {
  cd drminfo
  rm -rf build
  meson build --prefix='/usr'
  ninja -C build
}

check() {
  cd drminfo/tests
  avocado run *.py
}

package() {
  cd drminfo
  DESTDIR="${pkgdir}" ninja -C build install

  install -dm755 "$pkgdir/usr/share/bash-completion/completions/"
  pushd "$pkgdir/usr/bin" >/dev/null
  for x in *
  do
    ./$x --complete-bash > "$pkgdir/usr/share/bash-completion/completions/$x"
  done
  popd >/dev/null
}