diff options
Diffstat (limited to '~lukeshu')
-rw-r--r-- | ~lukeshu/openni-git/PKGBUILD | 67 | ||||
-rw-r--r-- | ~lukeshu/openni-git/openni.install | 11 |
2 files changed, 78 insertions, 0 deletions
diff --git a/~lukeshu/openni-git/PKGBUILD b/~lukeshu/openni-git/PKGBUILD new file mode 100644 index 000000000..86734fef0 --- /dev/null +++ b/~lukeshu/openni-git/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com> +# Contributor: bugix +# Contributor: Lubosz Sarnecki <lubosz at gmail> + +_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 000000000..8470f4512 --- /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 +} |