Advertisement
Guest User

PKGBUILD

a guest
Apr 20th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. pkgname=brlcad-svn
  2. pkgver=50196
  3. pkgrel=1
  4. pkgdesc="An extensive 3D solid modeling system."
  5. url="http://brlcad.org"
  6. license=('LGPL' 'BSD' 'custom:BDL')
  7. arch=('i686' 'x86_64')
  8. install=$pkgname.install
  9. makedepends=('bc' 'cmake' 'libxslt')
  10. depends=('boost' 'flex' 'libgl' 'libpng' 'mesa' 'tk' 'zlib')
  11.  
  12. # Maybe we could build brlcad with these externally some time.
  13. # 'itcl: libs included, but package can build with external libs'
  14. # 'itk: libs included, but package can build with external libs'
  15. # 'opennurbs: libs included, but package can build with external libs'
  16. # 'tkhtml3-cvs: for man page browsing in mged. CVS repo dead'
  17. # 'urt: Utah Raster Toolkit'
  18. optdepends=(
  19. 'fop: for building pdf documentation'
  20. 'tkpng: for archer'
  21. )
  22.  
  23. _svntrunk=https://brlcad.svn.sourceforge.net/svnroot/brlcad/brlcad/trunk
  24. _svnmod=brlcad
  25.  
  26.  
  27. # tkhtml3-cvs is needed for manpage browsing in mged.
  28. # Older versions won't work properly
  29.  
  30. options=('!libtool')
  31.  
  32. source=()
  33.  
  34. _pkgprefix=/opt/$pkgname
  35.  
  36. build() {
  37.  
  38. cd "$srcdir"
  39.  
  40. if [ -d $_svnmod/.svn ]; then
  41. (cd $_svnmod && svn up )
  42. else
  43. svn co $_svntrunk --config-dir ./ $_svnmod
  44. fi
  45.  
  46. msg "SVN checkout done or server timeout"
  47. msg "Starting make..."
  48.  
  49. rm -rf "$srcdir/$_svnmod-build"
  50. cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  51. cd "$srcdir/$_svnmod-build"
  52.  
  53. # cmake $srcdir/$pkgname-$pkgver \
  54. sh ./autogen.sh
  55. ./configure
  56. cmake ./ \
  57. -DCMAKE_INSTALL_PREFIX=${_pkgprefix} \
  58. -DBRLCAD-ENABLE_OPTIMIZED=ON \
  59. -DCMAKE_BUILD_TYPE=Release \
  60. -DBRLCAD-ENABLE_STRICT=OFF
  61. make
  62. }
  63.  
  64. package() {
  65. cd $srcdir/$pkgname-build
  66.  
  67. make DESTDIR=$pkgdir install
  68.  
  69. mkdir -p $pkgdir/etc/profile.d
  70. echo "export PATH=\$PATH:$_pkgprefix/bin" > $pkgdir/etc/profile.d/$pkgname.sh
  71. chmod 755 $pkgdir/etc/profile.d/$pkgname.sh
  72.  
  73. mkdir -p $pkgdir/usr/share/licenses/$pkgname
  74. cp $srcdir/$pkgname-$pkgver/doc/legal/bdl.txt \
  75. $pkgdir/usr/share/licenses/$pkgname
  76. cp $srcdir/$pkgname-$pkgver/doc/legal/bsd.txt \
  77. $pkgdir/usr/share/licenses/$pkgname
  78. mkdir -p $pkgdir/etc/ld.so.conf.d
  79. echo ${_pkgprefix}/lib > $pkgdir/etc/ld.so.conf.d/$pkgname.conf
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement