updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cockatrice-git / PKGBUILD
blob5c9a64db907216fe427f694d607806c147df6029
1 pkgname=cockatrice-git
2 pkgver=20120110
3 pkgrel=1
4 pkgdesc="A multiplatform application for playing card games such as Magic: The Gathering over a network."
5 arch=('i686' 'x86_64')
6 url="http://www.cockatrice.de/index.php"
7 license=('GPL2')
8 depends=('qt>=4.5.1')
9 source=('cockatrice.sh' 'arch_build.patch')
10 md5sums=('c3158c4b53526148faa0a036dc521860'
11          '0d2a8e4e983a12107490946e7585df94')
12 makedepends=('git')
13 install='cockatrice.install'
15 _gitroot="git://cockatrice.git.sourceforge.net/gitroot/cockatrice/cockatrice"
16 _gitname="cockatrice"
18 build() {
19   cd "$srcdir"
21   msg "Connecting to the GIT server...."
22   if [ -d "$_gitname" ]; then
23     cd $_gitname && git pull origin
24     msg2 "Local files updated"
25     cd ..
26   else
27     git clone $_gitroot
28   fi
29   msg2 "GIT checkout done or server timeout"
31   rm -rf $_gitname-build
32   cp -r $_gitname $_gitname-build
33   cd $_gitname-build/cockatrice
35   patch -Np2 -i "$srcdir/arch_build.patch"
37   lrelease cockatrice.pro
38   qmake
39   make
41   cd ../oracle
43   lrelease oracle.pro
44   qmake
45   make
47   cd ../servatrice
49   lrelease servatrice.pro
50   qmake
51   make
53   cd ..
55   install -dm775 -g games $pkgdir/opt/cockatrice/{bin,oracle,pic}
57   install -Dm755 $srcdir/cockatrice.sh $pkgdir/usr/bin/cockatrice
58   install -Dm644 cockatrice/cockatrice.desktop $pkgdir/usr/share/applications/cockatrice.desktop
59   install -Dm755 -g games cockatrice/cockatrice $pkgdir/opt/cockatrice/bin
60   install -Dm755 -g games servatrice/servatrice $pkgdir/opt/cockatrice/bin
61   install -Dm755 -g games oracle/oracle $pkgdir/opt/cockatrice/bin
62   install -dm775 -g games zonebg/ $pkgdir/opt/cockatrice/zonebg
63   install -m644 -g games zonebg/* $pkgdir/opt/cockatrice/zonebg/
65   install -Dm664 -g games oracle/sets.xml $pkgdir/opt/cockatrice/oracle
66   install -Dm644 -g games servatrice/servatrice.ini.example $pkgdir/opt/cockatrice/bin