summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fca522b541c6d92a2f1789be79e53c6f2daa7495 (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
pkgname=osvr-display-git
pkgver=r51.36d8aca
pkgrel=1
pkgdesc="Cross-platform detection and configuration of displays"
arch=(i686 x86_64)
url="https://github.com/OSVR/OSVR-Display"
#license=('GPL')
makedepends=('git' 'cmake')
source=("git+https://github.com/OSVR/OSVR-Display.git")

md5sums=(SKIP) #generate with 'makepkg -g'

pkgver() {
  cd "$srcdir/OSVR-Display"
  ( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd "$srcdir/OSVR-Display"
  git submodule init
  git submodule update --recursive
}

build() {
  mkdir -p "$srcdir/OSVR-Display-build"
  cd "$srcdir/OSVR-Display-build"
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ../OSVR-Display
  make
}

package() {
  cd "$srcdir/OSVR-Display-build"
  make DESTDIR="$pkgdir/" install
  mv "$pkgdir/usr/lib64" "$pkgdir/usr/lib" || true
}

# vim:set ts=2 sw=2 et: