This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

cutechess-git PKGBUILD

By: a guest on Oct 1st, 2012  |  syntax: Bash  |  size: 1.59 KB  |  views: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pkgname=cutechess-git
  2. pkgver=20121001
  3. pkgrel=1
  4. pkgdesc="GUI and cli application for automating chess engine tournaments.(xboard & UCI)"
  5. url="http://ajonsson.kapsi.fi/cutechess.html"
  6. arch=('i686' 'x86_64')
  7. license=('GPL3')
  8. depends=('qt')
  9. makedepends=('git')
  10.  
  11. _gitroot="git://github.com/cutechess/cutechess.git"
  12. _gitname="cutechess"
  13.  
  14.  
  15. build() {
  16.     cd "$srcdir"
  17.     msg "Connecting to GIT server...."
  18.  
  19.     if [ -d "$srcdir/$_gitname" ] ; then
  20.         cd $_gitname && git pull origin
  21.         msg "The local files are updated."
  22.     else
  23.         git clone $_gitroot
  24.     fi
  25.  
  26.     msg "GIT checkout done or server timeout"
  27.     msg "Starting make..."
  28.  
  29.     cp -r ${srcdir}/$_gitname ${srcdir}/$_gitname-build
  30.  
  31.     cd "$srcdir/${_gitname}-build"
  32.  
  33.     # Build
  34.     qmake # -config release
  35.     make
  36. }
  37.  
  38. package() {
  39.     # Install binaries and libraries
  40.     cd "$srcdir/$_gitname-build/projects"
  41.     install -Dm755 cli/cutechess-cli $pkgdir/usr/bin/cutechess-cli
  42.     install -Dm755 gui/cutechess $pkgdir/usr/bin/cutechess
  43.     install -Dm644 lib/libcutechess.so.1.0.0 $pkgdir/usr/lib/libcutechess.so.1.0.0
  44.  
  45.     # Symlinks to libcutechess library
  46.     ln -s "/usr/lib/libcutechess.so.1.0.0" "$pkgdir/usr/lib/libcutechess.so"
  47.     ln -s "/usr/lib/libcutechess.so.1.0.0" "$pkgdir/usr/lib/libcutechess.so.1"
  48.     ln -s "/usr/lib/libcutechess.so.1.0.0" "$pkgdir/usr/lib/libcutechess.so.1.0"
  49.  
  50.     # Desktop icon
  51.     install -Dm644 gui/res/icons/cutechess_128x128.png $pkgdir/usr/share/pixmaps/cutechess.png
  52.     install -Dm644 $startdir/cutechess.desktop $pkgdir/usr/share/applications/cutechess.desktop
  53. }
clone this paste RAW Paste Data