blob: 95aafb67451e79b6ec262267891791ef826e2c67 (
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
|
# Maintainer: Lubosz Sarnecki <lubosz@gmail.com>
basename=openhmd
pkgname=$basename-git
pkgver=0.3.0.511.e64708b
pkgrel=1
pkgdesc="Free and Open Source API and drivers for immersive technology."
arch=(x86_64 i686)
url="https://github.com/OpenHMD/OpenHMD"
license=(Boost)
depends=(hidapi glibc)
conflicts=($basename)
provides=($basename)
makedepends=(meson git)
optdepends=(
'xr-hardware: Udev rules for accessing XR (VR and AR) hardware devices',
'oculus-udev: Udev rule for Oculus Rift',
'vive-udev: Udev rule for HTC Vive'
)
source=($basename::"git+https://github.com/OpenHMD/OpenHMD.git")
sha256sums=("SKIP")
ver() {
PREFIX=" version: '"
echo $(grep "$PREFIX" meson.build | sed -e "s/${PREFIX}//" | sed "s/',//")
}
pkgver() {
cd $basename
hash=$(git log --pretty=format:'%h' -n 1)
revision=$(git rev-list --count HEAD)
echo $(ver).$revision.$hash
}
build() {
cd $basename
rm -rf build
arch-meson build
ninja -C build
}
package() {
cd $basename
DESTDIR="$pkgdir" ninja -C build install
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|