summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e9192ce5f6f13123b490a88b1d3cdeeaa5ab2a54 (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
# Maintainer: Ryan Jacobs <ryan@rmj.us>
pkgname=azure-kinect-sensor-sdk-git
pkgver=v1.2.0.beta.1.r4.4b37ca7d
pkgrel=1
pkgdesc="A cross platform user mode SDK to read data from Azure Kinect devices."
arch=("x86_64")
url="https://github.com/microsoft/Azure-Kinect-Sensor-SDK"
license=("MIT")
depends=("libsoundio" "libxinerama" "libxrandr" "libglvnd" "libxcursor" "systemd-libs")
makedepends=("git" "cmake" "ninja")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("azure-kinect-sensor-sdk::git+https://github.com/microsoft/Azure-Kinect-Sensor-SDK")
md5sums=("SKIP")

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
    cp -v ../50-kinect-azure.rules .
}

build() {
	cd "$srcdir/${pkgname%-git}"
    mkdir -p build
    cd build
    cmake ..
    make -j$(nproc)
}

package() {
	cd "$srcdir/${pkgname%-git}"

    # make install
    cd build
	make DESTDIR="$pkgdir/" install
    cd ../../

    # install udev rule
    mkdir -p "$pkgdir/udev/rules.d"
    cp -v 50-kinect-azure.rules "$pkgdir/udev/rules.d/"
}