summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 82ef0882280308240d46a7d47ad45cc9da9d8d8f (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
# Maintainer: Tim Jester-Pfadt <t.jp@gmx.de>

pkgname=apitest-git
_pkgname=apitest
pkgver=145.a3f38b1
pkgrel=1
pkgdesc="Simple comparison framework for graphics APIs"
arch=('i686' 'x86_64')
url="https://github.com/nvMcJohn/apitest"
license=('Unlicense')
makedepends=('cmake' 'git')
depends=('sdl2')
source=('git+https://github.com/nvMcJohn/apitest.git'
sdl2.patch)
sha256sums=('SKIP'
            '53abb72973bdab839cf973a220c71ee9bb8285f247fca89363953b2ffa19cda2')

provides=(${_pkgname})
pkgver() {
  cd "$srcdir"/apitest
  echo $(git rev-list --count master).$(git rev-parse --short master)
}
prepare(){
  cd $srcdir/apitest
  patch --strip=1 < ../sdl2.patch
}

build() {
  cd "$srcdir"/apitest
  test -d _out && rm -rf _out 
  mkdir _out
  cd _out
  cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ..
  make
}

package() {
  cd "$srcdir"/apitest/
  install -Dm755 LICENSE "$pkgdir"/usr/share/licenses/apitest/LICENSE
  
  cd bin
  install -Dm755 ${_pkgname} -t ${pkgdir}/usr/bin
  install -d "$pkgdir"/usr/share/${_pkgname}
  cp -rf Media Shaders "$pkgdir"/usr/share/${_pkgname}
}