Skip to content

Instantly share code, notes, and snippets.

@lahwaacz
Created Mar 4, 2013
Embed
What would you like to do?
Fixed PKGBUILD for cutechess-git (https://aur.archlinux.org/packages/cutechess-git/). Uses qmake-qt4 instead of qmake4, also first remove build directory - see /usr/share/pacman/PKGBUILD-git.proto
pkgname=cutechess-git
pkgver=20130304
pkgrel=1
pkgdesc="GUI and cli application for automating chess engine tournaments.(xboard & UCI)"
url="http://ajonsson.kapsi.fi/cutechess.html"
arch=('i686' 'x86_64')
license=('GPL3')
depends=('qt4')
makedepends=('git')
source=('cutechess.desktop')
md5sums=('484ede49e1f307994972476b3ede3970')
_gitroot="git://github.com/cutechess/cutechess.git"
_gitname="cutechess"
build() {
cd $srcdir
msg "Connecting to GIT server...."
if [ -d $srcdir/$_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/${_gitname}-build"
# Build
qmake-qt4
make
}
package() {
# Install binaries and libraries
cd $srcdir/$_gitname-build/projects
install -Dm755 cli/cutechess-cli $pkgdir/usr/bin/cutechess-cli
install -Dm755 gui/cutechess $pkgdir/usr/bin/cutechess
install -Dm644 lib/libcutechess.so.1.0.0 $pkgdir/usr/lib/libcutechess.so.1.0.0
# Symlinks to libcutechess library
ln -s "/usr/lib/libcutechess.so.1.0.0" "$pkgdir/usr/lib/libcutechess.so"
ln -s "/usr/lib/libcutechess.so.1.0.0" "$pkgdir/usr/lib/libcutechess.so.1"
ln -s "/usr/lib/libcutechess.so.1.0.0" "$pkgdir/usr/lib/libcutechess.so.1.0"
# Desktop icon
install -Dm644 gui/res/icons/cutechess_128x128.png $pkgdir/usr/share/pixmaps/cutechess.png
install -Dm644 $startdir/cutechess.desktop $pkgdir/usr/share/applications/cutechess.desktop
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment