summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 393e2db735b55454fb55683063589f6f1f21315c (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: Matt Coffin <mcoffin13@gmail.com>
pkgname=obs-openvr-git
pkgver=0.1.0.r0.9acff37
pkgrel=1
pkgdesc="obs source plugin for capturing OpenVR outputs"
arch=(x86_64)
url="https://gitlab.com/mcoffin/obs-openvr"
license=('GPL')
groups=()
depends=('openvr' 'glfw>=3.0.0')
makedepends=('git' 'cargo' 'obs-studio') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=("${pkgname%-git}::git+https://gitlab.com/mcoffin/obs-openvr.git#branch=master")
noextract=()
sha256sums=('SKIP')

# Please refer to the 'USING git SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	# Git, tags available
	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
	# Git, no tags available
	# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	cargo build --release
}

check() {
	cd "$srcdir/${pkgname%-git}"
	cargo test --release
}

package() {
	cd "$srcdir/${pkgname%-git}"
	install -Dm 0644 -T target/release/libobs_openvr.so "$pkgdir"/usr/lib/obs-plugins/obs-openvr.so
}