updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / libfreenect-git / PKGBUILD
blob89366552bbb9782f9691dc31a2a2eea7116d0e1c
1 # Maintainer: Sven Schneider <archlinux.sandmann@googlemail.com>
3 pkgname=libfreenect-git
4 pkgver=20110115
5 pkgrel=1
6 pkgdesc="Drivers and libraries for the Xbox Kinect device on Linux"
7 arch=('i686' 'x86_64')
8 url="http://openkinect.org"
9 license=('GPL')
10 depends=('libusb' 'freeglut' 'libxmu')
11 makedepends=('cmake' 'git')
12 provides=('libfreenect')
13 conflicts=('libfreenect')
14 source=()
15 md5sums=()
17 _gitroot="git://github.com/OpenKinect/libfreenect.git"
18 _gitname=libfreenect
20 build() {
21         cd "${srcdir}"
22         
23         if [ ! -d "${srcdir}/${_gitname}" ]; then
24                 git clone ${_gitroot}
25         else
26                 cd ${_gitname} && git pull origin
27         fi
28         
29         msg "GIT checkout done."
31         cd "${srcdir}"
32         cp -rf "${_gitname}" "${_gitname}-build"
33         cd "${_gitname}-build"
34         
35         # Install "libfreenect.hpp" to "/usr/include/libfreenect"
36         sed 's/DESTINATION include/DESTINATION include\/${projectNameLower}/g' -i "wrappers/cpp/CMakeLists.txt"
37         
38         cmake -DCMAKE_INSTALL_PREFIX=/usr -DPROJECT_INCLUDE_INSTALL_DIR=/usr/include -DLIB_SUFFIX="" .
39         make
42 package() {
43         cd "${srcdir}/${_gitname}-build"
44         
45         make DESTDIR="${pkgdir}" install
46         install -Dm644 platform/linux/udev/51-kinect.rules "${pkgdir}/etc/udev/rules.d/51-kinect.rules"
47         
48         # Patch include files
49         sed 's/<libfreenect.h>/<libfreenect\/libfreenect.h>/g' -i "${pkgdir}/usr/include/libfreenect/libfreenect.hpp"