Skip to content

Instantly share code, notes, and snippets.

@vlinkz vlinkz/PKGBUILD Secret
Created Dec 22, 2018

Embed
What would you like to do?
osvr-vive
pkgname=osvr-vive-git
pkgver=v0.4.r19.gf70a570
pkgrel=1
pkgdesc="OSVR driver for use with the HTC Vive (including Vive PRE)"
arch=(i686 x86_64)
url="https://github.com/OSVR/OSVR-Vive"
license=('APACHE')
makedepends=('git' 'cmake')
depends=('osvr-core-git' 'openvr-git')
source=("osvr-vive::git+https://github.com/OSVR/OSVR-Vive.git"
"openvr::git+https://github.com/ValveSoftware/openvr.git"
)
md5sums=('SKIP' 'SKIP')
pkgver() {
cd "$srcdir/osvr-vive"
( 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 osvr-vive
mkdir -p "$srcdir/osvr-vive-build"
git submodule init
git config submodule.vendor/openvr.url "$srcdir/openvr"
git submodule update --init --recursive
}
build() {
cd osvr-vive-build
cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Release ../osvr-vive
make
}
package() {
cd osvr-vive-build
make DESTDIR="$pkgdir/" install
mv "$pkgdir/usr/lib64" "$pkgdir/usr/lib" || true
rm -f "$pkgdir/usr/README.md"
rm -f "$pkgdir/usr/LICENSE"
mkdir -p "$pkgdir/usr/share/osvrcore/sample-configs"
mv "$pkgdir/usr/osvr_server_config.vive.sample.json" "$pkgdir/usr/share/osvrcore/sample-configs"
}
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.