summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: feeee458cf1831a8403a9e945f6c86ebbe42e6d5 (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
52
53
# Maintainer: Christoph Haag <christoph.haag@collabora.com>

_realname='openxr-explorer'
pkgname="$_realname-git"
pkgver=v1.1.r2.gb11f564
pkgrel=1
pkgdesc='OpenXR capabilities explorer and runtime switcher with a CLI and GUI.'
arch=('i686' 'x86_64')
url='https://github.com/maluoi/openxr-explorer'
depends=('openxr' 'libxcb' 'xcb-util-keysyms' 'glew' 'xcb-util-cursor')
provides=("$_realname="$pkgver)
conflicts=("$_realname")
makedepends=('cmake' 'git' 'ninja')
license=('MIT')

source=('git+https://github.com/maluoi/openxr-explorer.git')
md5sums=('SKIP')

prepare() {
  cd $_realname
  git submodule update --init --recursive
}

pkgver() {
  cd $_realname
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $_realname
  # -DBUILD_WITH_STD_FILESYSTEM=OFF for https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/260
  cmake \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_BUILD_TYPE=Release \
  -GNinja -Bbuild \
  -DBUILD_WITH_STD_FILESYSTEM=OFF
  ninja -C build
}

#check() {
#  cd $_realname
#  ninja -C build test
#}

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

  # delete mistakenly installed openxr sdk
  rm -rf "$pkgdir/usr/include"
  rm -rf "$pkgdir/usr/lib"
  rm -rf "$pkgdir/usr/share"
}