summaryrefslogtreecommitdiff
path: root/~lukeshu/openni-module-sensorkinect-git
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-11-22 00:07:29 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-11-22 00:07:29 -0500
commit00d7d1f1b8496cfe48fa7c41070309304b1ae75d (patch)
treed4ae3d3be19a6b95f6328a3ce8d5151453f0423e /~lukeshu/openni-module-sensorkinect-git
parent8781e67191e34888d46e681a62d508f403540eca (diff)
downloadabslibre-00d7d1f1b8496cfe48fa7c41070309304b1ae75d.tar.gz
abslibre-00d7d1f1b8496cfe48fa7c41070309304b1ae75d.tar.bz2
abslibre-00d7d1f1b8496cfe48fa7c41070309304b1ae75d.zip
Move openni-{primesenseor,sensorkinect} to openni-module-*
Diffstat (limited to '~lukeshu/openni-module-sensorkinect-git')
-rw-r--r--~lukeshu/openni-module-sensorkinect-git/PKGBUILD78
-rw-r--r--~lukeshu/openni-module-sensorkinect-git/sensorkinect.install15
2 files changed, 93 insertions, 0 deletions
diff --git a/~lukeshu/openni-module-sensorkinect-git/PKGBUILD b/~lukeshu/openni-module-sensorkinect-git/PKGBUILD
new file mode 100644
index 000000000..8c9b64571
--- /dev/null
+++ b/~lukeshu/openni-module-sensorkinect-git/PKGBUILD
@@ -0,0 +1,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
+}
diff --git a/~lukeshu/openni-module-sensorkinect-git/sensorkinect.install b/~lukeshu/openni-module-sensorkinect-git/sensorkinect.install
new file mode 100644
index 000000000..0928e3dd9
--- /dev/null
+++ b/~lukeshu/openni-module-sensorkinect-git/sensorkinect.install
@@ -0,0 +1,15 @@
+post_install() {
+ MODULES="libXnDeviceSensorV2KM.so libXnDeviceFile.so"
+ for module in $MODULES
+ do
+ /usr/bin/niReg -r /usr/lib/$module /etc/primesense
+ done
+}
+
+pre_remove() {
+ MODULES="libXnDeviceSensorV2KM.so libXnDeviceFile.so"
+ for module in $MODULES
+ do
+ /usr/bin/niReg -u /usr/lib/$module
+ done
+}