Advertisement
erwinkendo

pcl-ros fix

May 14th, 2012
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. # Maintainer: hauptmech <hauptmech@gmail.com>
  2. pkgname=pcl-ros
  3. pkgver=1.5.1
  4. pkgrel=1
  5. pkgdesc="Point Cloud Library for ROS"
  6. arch=('i686' 'x86_64')
  7. url="http://pointclouds.org"
  8. license=('GPL')
  9. groups=()
  10. depends=()
  11. makedepends=('git' 'cmake' 'python2')
  12. provides=('pcl-ros')
  13. conflicts=()
  14. replaces=()
  15. backup=()
  16. options=()
  17. install=
  18. source=()
  19. noextract=()
  20. md5sums=() #generate with 'makepkg -g'
  21.  
  22. _gitroot=https://hauptmech@github.com/hauptmech/pcl.git
  23. _gitname=pcl
  24. _branch=arch
  25.  
  26.  
  27. build() {
  28. cd "$srcdir"
  29. msg "Connecting to GIT server...."
  30.  
  31. if [[ -d "$_gitname" ]]; then
  32. cd "$_gitname" && git pull origin
  33. msg "The local files are updated."
  34. else
  35. git clone -b "$_branch" "$_gitroot" "$_gitname"
  36. fi
  37.  
  38. msg "GIT checkout done or server timeout"
  39. msg "Starting build..."
  40.  
  41. rm -rf "$srcdir/$_gitname-build"
  42. git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  43. cd "$srcdir/$_gitname-build"
  44.  
  45. # Python2 FIX
  46. mkdir /usr/local/bin/alt
  47. ln -s /usr/bin/python2 /usr/local/bin/alt/python
  48. export PATH=/usr/local/bin/alt:$PATH
  49. #
  50. # BUILD HERE
  51. #
  52. mkdir build
  53. cd build
  54. cmake .. -DCMAKE_INSTALL_PREFIX=/opt/ros/fuerte -DSETUPTOOLS_DEB_LAYOUT=OFF -DUSE_ROS=ON
  55. make
  56.  
  57. }
  58.  
  59. package() {
  60. cd "$srcdir/$_gitname-build/build"
  61. make DESTDIR="$pkgdir/" install
  62. # Python2 FIX restore
  63. rm /usr/local/bin/alt/python
  64. }
  65.  
  66. # vim:set ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement