diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-12-11 19:20:11 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-12-11 19:20:11 -0500 |
commit | 2574d86e478780b7f332aa097b4db4a3a5e4ca30 (patch) | |
tree | c5ea5d81f1787e20a8877ed55e36db2504b20428 /~lukeshu/libfreenect-git/PKGBUILD | |
parent | 4e95bca59f0c5b9958ffd378be9934f7dee4f98a (diff) | |
parent | b503754d5f727f122db3affe434ab54426fb0cb9 (diff) | |
download | abslibre-2574d86e478780b7f332aa097b4db4a3a5e4ca30.tar.gz abslibre-2574d86e478780b7f332aa097b4db4a3a5e4ca30.tar.bz2 abslibre-2574d86e478780b7f332aa097b4db4a3a5e4ca30.zip |
Merge gitorious.org:lukeshu-parabola-repo/lukeshu-parabola-repo
Conflicts:
.gitignore
Diffstat (limited to '~lukeshu/libfreenect-git/PKGBUILD')
-rw-r--r-- | ~lukeshu/libfreenect-git/PKGBUILD | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/~lukeshu/libfreenect-git/PKGBUILD b/~lukeshu/libfreenect-git/PKGBUILD new file mode 100644 index 000000000..edc9e7483 --- /dev/null +++ b/~lukeshu/libfreenect-git/PKGBUILD @@ -0,0 +1,86 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> +# Contributor: Sven Schneider <archlinux.sandmann@googlemail.com> + +# I am not giving libfreenect nearly the attention it deserves. +# There are a lot of options for it that I'm ignoring. +# Right now I'm focussing more on sensorkinect. +# Patches welcome! + +pkgname=("libfreenect-git" 'kinect-udev-git') +pkgver=20111211 +pkgrel=1 +pkgdesc="OpenKinect drivers and libraries for the Xbox Kinect device" +arch=('i686' 'x86_64') +url="http://openkinect.org" +license=('GPL') +makedepends=('cmake' 'git' 'python2') +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 \ + -DBUILD_REDIST_PACKAGE=ON \ + -DLIB_SUFFIX="" \ + -DBUILD_AUDIO=OFF \ + -DBUILD_PYTHON=OFF \ + -DPYTHON_EXECUTABLE="`which python2`" \ + .. + make +} + +package_libfreenect-git() { + depends=('libusb' 'freeglut' 'libxmu' 'kinect-udev') + provides=(libfreenect) + conflicts=(libfreenect) + + # Make install + cd "${srcdir}/${_gitname}-build/build" + make DESTDIR="${pkgdir}" install + + # Patch include files + sed 's/<libfreenect.h>/<libfreenect\/libfreenect.h>/g' -i "${pkgdir}/usr/include/libfreenect/libfreenect.hpp" +} + +package_kinect-udev-git() { + pkgdesc="Udev rules for the Xbox Kinect device" + depends=('udev') + provides=(kinect-udev) + conflicts=(kinect-udev) + + # Install udev rules + cd "${srcdir}/${_gitname}-build/" + install -d "${pkgdir}/etc/udev/rules.d" + install -m644 platform/linux/udev/51-kinect.rules "${pkgdir}/etc/udev/rules.d" +}
\ No newline at end of file |