blob: 8c9b645714bd13cdb8b65e17899458c86b75f792 (
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
74
75
76
77
78
|
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: pallegro from the AUR
pkgname=openni-module-sensorkinect
pkgver=20111121
pkgrel=2
pkgdesc="OpenNI SensorKinect harware modules for the Xbox Kinect device"
arch=('i686')
url="https://github.com/avin2/SensorKinect"
license=('GPL')
depends=('openni-unstable')
makedepends=('git')
provides=($_pkgname)
conflicts=('openni-primesensor')
install="sensorkinect.install"
source=()
md5sums=()
_gitroot="https://github.com/avin2/SensorKinect.git"
_gitname="sensorkinect"
#_gitbranch="unstable"
_gitbranch="master"
_os='Linux'
case "${CARCH}" in
'x86_64') _arch=x86;;
'i686') _arch=x86;;
'arm') _arch=Arm;; # untested
*) _arch=UNSUPPORTED_ARCH;;
esac
_platform="${_os}-${_arch}"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d ${_gitname} ] ; then
cd ${_gitname}
git checkout master
git pull origin
msg "The local files are updated."
else
git clone ${_gitroot} ${_gitname}
cd ${_gitname}
fi
git checkout ${_gitbranch}
cd ..
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd $srcdir/$_gitname-build
# BUILD
cd Platform/${_platform}/Build
make NI_CONF_DIR=/etc || return 1
}
package() {
install -d -m755 ${pkgdir}/usr/{lib,bin}
cd $srcdir/$_gitname-build/Platform/${_platform}/Bin/Release
install XnSensorServer ${pkgdir}/usr/bin
install libXnCore.so libXnDDK.so libXnDeviceFile.so libXnDeviceSensorV2KM.so libXnFormats.so ${pkgdir}/usr/lib
chmod +s ${pkgdir}/usr/bin/XnSensorServer
cd $srcdir/$_gitname-build/Platform/${_platform}/Install
install -d -m755 ${pkgdir}/etc/udev/rules.d
install 55-primesense-usb.rules ${pkgdir}/etc/udev/rules.d
cd $srcdir/$_gitname-build/Data
install -d -m755 ${pkgdir}/etc/primesense
install GlobalDefaultsKinect.ini ${pkgdir}/etc/primesense
install -d -m777 ${pkgdir}/var/log/primesense/XnSensorServer
}
|