From 0d2055f83f7240e2c03193e340c3db48ed160a90 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 16 Nov 2011 00:23:11 -0500 Subject: Add openni, based on openni-git from AUR --- ~lukeshu/openni-git/PKGBUILD | 67 ++++++++++++++++++++++++++++++++++++++ ~lukeshu/openni-git/openni.install | 11 +++++++ 2 files changed, 78 insertions(+) create mode 100644 ~lukeshu/openni-git/PKGBUILD create mode 100644 ~lukeshu/openni-git/openni.install diff --git a/~lukeshu/openni-git/PKGBUILD b/~lukeshu/openni-git/PKGBUILD new file mode 100644 index 0000000..86734fe --- /dev/null +++ b/~lukeshu/openni-git/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Luke Shumaker +# Contributor: Sven Schneider +# Contributor: bugix +# Contributor: Lubosz Sarnecki + +_pkgname=openni +pkgname=${_pkgname}-git +pkgver=20111115 +pkgrel=3 +pkgdesc="The OpenNI Framework provides the interface for physical devices and for middleware components" +arch=('i686' 'x86_64') +url="http://www.openni.org/" +license=('GPL') +depends=('freeglut' 'libusb' 'java-environment') +makedepends=('git') +provides=($_pkgname) +conflicts=($_pkgname) +install="openni.install" +source=() +md5sums=() + +_gitroot="git://github.com/OpenNI/OpenNI.git" +_gitname="openni" +_gitbranch="unstable" +#_gitbranch="master" + +if [ "${CARCH}" = "x86_64" ]; then + _platform=x64 +else + _platform=x86 +fi + +build() { + cd "${srcdir}" + msg "Connecting to GIT server...." + + if [ -d ${_gitname} ] ; then + cd ${_gitname} && git pull origin + msg "The local files are updated." + else + git clone -b ${_gitbranch} ${_gitroot} ${_gitname} + fi + + 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/Platform/Linux/Build" + + # BUILD + make -j1 || return 1 +} + +package() { + install -d -m755 "${pkgdir}/usr/"{lib,bin,include/ni/Linux-${_platform}} + install -d -m755 "${pkgdir}/var/lib/ni" + + cd "${srcdir}/${_gitname}-build/Include" + install *.h "${pkgdir}/usr/include/ni" + install Linux-${_platform}/* "${pkgdir}/usr/include/ni/Linux-${_platform}" + + cd "${srcdir}/${_gitname}-build/Platform/Linux/Bin/${_platform}-Release" + install niLicense niReg "${pkgdir}/usr/bin" + + install libnimCodecs.so libnimMockNodes.so libnimRecorder.so libOpenNI.so "${pkgdir}/usr/lib" +} diff --git a/~lukeshu/openni-git/openni.install b/~lukeshu/openni-git/openni.install new file mode 100644 index 0000000..8470f45 --- /dev/null +++ b/~lukeshu/openni-git/openni.install @@ -0,0 +1,11 @@ +post_install() { + MODULES="libnimMockNodes.so libnimCodecs.so libnimRecorder.so" + for module in $MODULES + do + /usr/bin/niReg /usr/lib/$module + done +} + +pre_remove() { + rm /var/lib/ni/modules.xml +} -- cgit v1.2.3