summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Chr├ętien2014-04-13 11:58:53 +0200
committerBenjamin Chr├ętien2014-04-13 11:58:53 +0200
commitd43d9f56c07d03bd5e7a2b2ad1559848df89e3cd (patch)
tree4eeb3dc6f5de1f341c4af17651b1233f885e9bfd
downloadaur-d43d9f56c07d03bd5e7a2b2ad1559848df89e3cd.tar.gz
Add release OpenNI package.
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD63
-rw-r--r--libopenni.pc10
-rw-r--r--openni.install13
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..533860399f1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = openni
+ pkgdesc = The OpenNI Framework provides the interface for physical devices and for middleware components
+ pkgver = 1.5.7.10
+ pkgrel = 1
+ url = http://www.openni.org/
+ install = openni.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ depends = freeglut
+ depends = mesa
+ depends = libusb
+ depends = java-environment
+ source = openni-build::git+https://github.com/OpenNI/OpenNI.git#tag=Stable-1.5.7.10
+ source = libopenni.pc
+ md5sums = SKIP
+ md5sums = 846a9b0be1dbee5f1d4619db42034978
+
+pkgname = openni
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d9c3652e5b5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Benjamin Chretien <chretien at lirmm dot fr>
+# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com>
+# Contributor: bugix
+# Contributor: Lubosz Sarnecki <lubosz at gmail>
+
+pkgname=openni
+pkgver=1.5.7.10
+pkgrel=1
+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' 'mesa' 'libusb' 'java-environment')
+makedepends=('git')
+install="openni.install"
+
+_gitroot="github.com/OpenNI/OpenNI.git"
+_gitname="openni"
+_gitbranch="Stable"
+
+source=("$_gitname-build"::"git+https://$_gitroot"#tag=$_gitbranch-$pkgver
+ "libopenni.pc")
+md5sums=('SKIP'
+ '846a9b0be1dbee5f1d4619db42034978')
+
+if [ "${CARCH}" = "x86_64" ]; then
+ _platform=x64
+else
+ _platform=x86
+fi
+
+
+build() {
+ find "${srcdir}/${_gitname}-build/Samples" -type f -exec sed -i 's#../../../../Data/SamplesConfig.xml#/usr/share/openni/SamplesConfig.xml#g' {} \;
+
+ cd "${srcdir}/${_gitname}-build/Platform/Linux/Build"
+
+ if [ -f Common ]; then ln -fs `cat Common` Common; fi
+
+ # BUILD
+ LDFLAGS+=' -lGL' make
+}
+
+package() {
+ install -d -m755 "${pkgdir}/usr/"{lib,bin,share/openni,include/ni/Linux-x86}
+ install -d -m755 "${pkgdir}/var/lib/ni"
+
+ cd "${srcdir}/${_gitname}-build/Include"
+ install *.h "${pkgdir}/usr/include/ni"
+ install Linux-x86/* "${pkgdir}/usr/include/ni/Linux-x86"
+
+ cd "${srcdir}/${_gitname}-build/Data"
+ install SamplesConfig.xml "${pkgdir}/usr/share/openni"
+
+ cd "${srcdir}/${_gitname}-build/Platform/Linux/Bin/${_platform}-Release"
+ install niLicense niReg "${pkgdir}/usr/bin"
+ install Sample* "${pkgdir}/usr/bin"
+
+ install libnimCodecs.so libnimMockNodes.so libnimRecorder.so libOpenNI.so libOpenNI.jni.so "${pkgdir}/usr/lib"
+
+ install -d -m755 "${pkgdir}/usr/lib/pkgconfig"
+ cp "${srcdir}/libopenni.pc" "${pkgdir}/usr/lib/pkgconfig/"
+}
diff --git a/libopenni.pc b/libopenni.pc
new file mode 100644
index 00000000000..5a9b1267a1a
--- /dev/null
+++ b/libopenni.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/ni
+
+Name: OpenNI2
+Description: A general purpose driver for all OpenNI cameras.
+Version: 1.5.7.10
+Cflags: -I${includedir}
+Libs: -L${libdir} -lOpenNI
diff --git a/openni.install b/openni.install
new file mode 100644
index 00000000000..94ec3d5a926
--- /dev/null
+++ b/openni.install
@@ -0,0 +1,13 @@
+post_install() {
+ MODULES="libnimMockNodes.so libnimCodecs.so libnimRecorder.so"
+ for module in $MODULES
+ do
+ /usr/bin/niReg /usr/lib/$module
+ done
+
+ echo "Don't forget to install a hardware driver such as sensorkinect-git"
+}
+
+pre_remove() {
+ rm /var/lib/ni/modules.xml
+}