public
anonymous / PKGBUILD
Created

Fixed Cockatrice PKGBUILD

  • Download Gist
PKGBUILD
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
pkgname=cockatrice-git
pkgver=20121106
pkgrel=2
pkgdesc="A multiplatform application for playing card games such as Magic: The Gathering over a network."
arch=('i686' 'x86_64')
url="http://www.cockatrice.de/index.php"
license=('GPL2')
depends=('qt>=4.5.1' 'protobuf')
makedepends=('git' 'cmake')
 
_gitroot="git://github.com/mbruker/Cockatrice.git"
_gitname="Cockatrice"
 
# Set this to 1 to include servatrice in the package
_COMPILE_SERVATRICE=0
 
build() {
cd "${srcdir}"
 
msg "Connecting to the GIT server...."
if [ -d "${srcdir}/${_gitname}" ] ; then
cd ${_gitname}
git clean -f
git reset --hard HEAD
git pull --rebase || return 1
msg2 "Local files updated"
else
git clone ${_gitroot} || return 1
cd ${_gitname}
fi
msg2 "GIT checkout done or server timeout"
 
cd cockatrice/translations
lrelease *.ts
cd "${srcdir}/${_gitname}"
 
rm -rf build
mkdir build
cd build
 
if (( _COMPILE_SERVATRICE )); then
cmake -DCMAKE_INSTALL_PREFIX=/usr/ -DWITH_SERVATRICE=1 ..
else
cmake -DCMAKE_INSTALL_PREFIX=/usr/ ..
fi
make
}
 
package() {
cd "${srcdir}/${_gitname}/build"
 
make DESTDIR="$pkgdir" install
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.