Created
November 6, 2012 23:44
-
-
Save anonymous/4028520 to your computer and use it in GitHub Desktop.
Fixed Cockatrice PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment