summaryrefslogtreecommitdiff
path: root/~lukeshu/openni-all/openni-module-sensorkinect-git
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2012-02-29 02:31:43 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2012-02-29 02:31:43 -0300
commite87b42b0f90e1a4d8b255f1dab945f2f3bb13cdc (patch)
treee36d5720f76b5db9dd5f97260108607023d7d2e7 /~lukeshu/openni-all/openni-module-sensorkinect-git
parentc0e37a8f32f335c12352f23cdc73113099e057ec (diff)
parent32b05a621cb20af1bd4b7cd6f5609b7512bb20f1 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: extra/avfs/PKGBUILD extra/gtk2/PKGBUILD extra/hercules/PKGBUILD multilib/lib32-libcap/PKGBUILD multilib/lib32-qt/PKGBUILD
Diffstat (limited to '~lukeshu/openni-all/openni-module-sensorkinect-git')
-rw-r--r--~lukeshu/openni-all/openni-module-sensorkinect-git/PKGBUILD77
-rw-r--r--~lukeshu/openni-all/openni-module-sensorkinect-git/sensorkinect.install15
2 files changed, 92 insertions, 0 deletions
diff --git a/~lukeshu/openni-all/openni-module-sensorkinect-git/PKGBUILD b/~lukeshu/openni-all/openni-module-sensorkinect-git/PKGBUILD
new file mode 100644
index 000000000..2a2abbdc5
--- /dev/null
+++ b/~lukeshu/openni-all/openni-module-sensorkinect-git/PKGBUILD
@@ -0,0 +1,77 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: pallegro from the AUR
+
+pkgname=openni-module-sensorkinect-git
+pkgver=20111211
+pkgrel=2
+pkgdesc="OpenNI SensorKinect harware modules for the Xbox Kinect device"
+arch=('i686' 'x86_64')
+url="https://github.com/avin2/SensorKinect"
+license=('GPL')
+depends=('openni-unstable' 'kinect-udev')
+makedepends=('git')
+provides=('openni-module-sensorkinect')
+conflicts=('openni-module-sensorkinect' 'openni-module-primesensor')
+install="sensorkinect.install"
+source=()
+md5sums=()
+
+_gitroot="https://github.com/avin2/SensorKinect.git"
+_gitname="sensorkinect"
+_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 build..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd $srcdir/$_gitname-build
+
+ # BUILD
+ cd Platform/${_platform}/Build
+ make
+ make redist
+}
+
+package() {
+ cd $srcdir/$_gitname-build
+ cd Platform/${_platform}/Redist
+
+ # This is all cloned from ./install.sh, which can't be used for a number
+ # of reasons.
+ install -d $pkgdir/usr/{lib,bin}
+ install -m755 Lib/* $pkgdir/usr/lib
+ install -m755 Bin/* $pkgdir/usr/bin
+
+ install -d $pkgdir/etc/primesense
+ install -m644 Config/GlobalDefaultsKinect.ini $pkgdir/etc/primesense
+
+ chmod +s $pkgdir/usr/bin/XnSensorServer
+
+ install -m777 -d $pkgdir/var/log/primesense/XnSensorServer
+}
diff --git a/~lukeshu/openni-all/openni-module-sensorkinect-git/sensorkinect.install b/~lukeshu/openni-all/openni-module-sensorkinect-git/sensorkinect.install
new file mode 100644
index 000000000..d62d263d1
--- /dev/null
+++ b/~lukeshu/openni-all/openni-module-sensorkinect-git/sensorkinect.install
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+export MODULES="libXnDeviceSensorV2KM.so libXnDeviceFile.so"
+
+post_install() {
+ for module in $MODULES; do
+ /usr/bin/niReg -r /usr/lib/$module /etc/primesense
+ done
+}
+
+pre_remove() {
+ for module in $MODULES; do
+ /usr/bin/niReg -u /usr/lib/$module
+ done
+}