aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4ea4bdd1377a3711a12a57b7df82e1e3c603f5e5 (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=2
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")
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/"
}