summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 396ea7aae02f77f34c282444c0de2d8232f7c69d (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Maintainer: Sapphire <imsapphire0 at gmail dot com>
pkgname=wivrn-server-git
_pkgname=wivrn-server
pkgver=0.22.r85.gb97c8b2
pkgrel=1
pkgdesc="A wireless Monado-based OpenXR runtime for standalone headsets."
arch=(x86_64)
url="https://github.com/WiVRn/WiVRn"
license=("GPL-3.0-only")
depends=(
	"avahi"
	"ffmpeg"
	"gcc-libs"
	"glibc"
	"libbsd"
	"libgl"
	"libpipewire"
	"libpulse"
	"libx11"
	"libxcb"
	"systemd-libs"
	"vulkan-icd-loader"
	"x264"
	"libnotify"
	"glib2"
	"openssl"
)
makedepends=(
	"cmake"
	"boost-libs"
	"eigen"
	"nlohmann-json"
	"cli11"
	"glib2-devel"
	"boost"
	"vulkan-headers"
	"libxrandr"
	"git"
)
optdepends=(
	"cuda: NVIDIA hardware encoding"
)
conflicts=("wivrn-server")
provides=("wivrn-server" "openxr-runtime")
source=("git+https://github.com/WiVRn/WiVRn")
sha256sums=('SKIP')
install=$_pkgname.install

pkgver() {
	cd "WiVRn"
	git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "WiVRn"
	cmake -B build-server . \
	-DGIT_DESC=v${pkgver} \
	-DWIVRN_BUILD_CLIENT=OFF \
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
	-DCMAKE_INSTALL_PREFIX="/usr" \
	-DWIVRN_USE_VAAPI=ON \
	-DWIVRN_USE_X264=ON \
	-DWIVRN_USE_NVENC=ON \
	-DOPENCOMPOSITE_SEARCH_PATH=/opt/opencomposite \
	-Wno-dev

	cmake --build build-server
}

package() {
	cd "WiVRn"
	DESTDIR="$pkgdir" cmake --install build-server
}