diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-11-15 20:48:50 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-11-15 20:48:50 -0500 |
commit | 96dee30e95d8d67acf025365a720047df2e1bc2d (patch) | |
tree | 353d84927564997d982920ca5136f50c1eea0108 | |
parent | 182a63be17ee1e70366f0772197c554f7e3a7225 (diff) | |
download | abslibre-96dee30e95d8d67acf025365a720047df2e1bc2d.tar.gz abslibre-96dee30e95d8d67acf025365a720047df2e1bc2d.tar.bz2 abslibre-96dee30e95d8d67acf025365a720047df2e1bc2d.zip |
Add libfreenect-git, based on libfreenect-sound-git from AUR
-rw-r--r-- | ~lukeshu/libfreenect-git/PKGBUILD | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/~lukeshu/libfreenect-git/PKGBUILD b/~lukeshu/libfreenect-git/PKGBUILD new file mode 100644 index 000000000..69edf428f --- /dev/null +++ b/~lukeshu/libfreenect-git/PKGBUILD @@ -0,0 +1,71 @@ +# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com> +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> + +pkgname=libfreenect-git +pkgver=20111115 +pkgrel=1 +pkgdesc="OpenKinect drivers and libraries for the Xbox Kinect device on Linux" +arch=('i686' 'x86_64') +url="http://openkinect.org" +license=('GPL') +depends=('libusb' 'freeglut' 'libxmu') +makedepends=('cmake' 'git' 'python2') +provides=('libfreenect') +conflicts=('libfreenect') +source=() +md5sums=() + +_gitroot="git://github.com/OpenKinect/libfreenect.git" +_gitname=libfreenect + +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 "$_gitroot" "$_gitname" + fi + + 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 HERE + # + + # Install "libfreenect.hpp" to "/usr/include/libfreenect" + sed 's/DESTINATION include/DESTINATION include\/${projectNameLower}/g' -i "wrappers/cpp/CMakeLists.txt" + + export DYLD_FRAMEWORK_PATH=/usr/lib/python2.7/site-packages + + mkdir build + cd build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX="" \ + -DBUILD_AUDIO=ON \ + -DBUILD_PYTHON=OFF \ + -DPYTHON_EXECUTABLE="`which python2`" \ + .. + make +} + +package() { + # Make install + cd "${srcdir}/${_gitname}-build/build" + make DESTDIR="${pkgdir}" install + + # Install udev rules + cd "${srcdir}/${_gitname}-build/" + install -Dm644 platform/linux/udev/51-kinect.rules "${pkgdir}/etc/udev/rules.d/51-kinect.rules" + + # Patch include files + sed 's/<libfreenect.h>/<libfreenect\/libfreenect.h>/g' -i "${pkgdir}/usr/include/libfreenect/libfreenect.hpp" +} |