updated on Sun Jan 8 20:02:33 UTC 2012
[aur-mirror.git] / dfhack-git / PKGBUILD
blob7e301738f93a66fadefae168a786d4259f931b75
1 # Maintainer: Gazj < garyjames82 AT gmail DOT com>
2 # Contributor: Daenyth <Daenyth+Arch AT gmail DOT com>
3 pkgname=dfhack-git
4 pkgver=20111118
5 pkgrel=1
6 pkgdesc="A cross-platform library for accessing Dwarf Fortress memory"
7 arch=('i686' 'x86_64')
8 url="http://sourceforge.net/projects/dfhack/"
9 license=('custom:zlib')
10 depends=(gcc-libs libx11 allegro perl-xml-libxml)
11 makedepends=(cmake git)
12 if [[ $CARCH == 'x86_64' ]]; then
13   depends=(lib32-allegro)
14   makedepends=(gcc-multilib cmake git perl-xml-libxml perl-xml-libxslt)
16 conflicts=(dfhack dfhack-svn)
17 provides=(dfhack)
18 replaces=(dfhack-svn stonesense-svn)
19 source=(dwarffortress-hacked)
20 md5sums=('98009af563c97a0e28379e31232b9d42')
22 _gitroot="git://github.com/peterix/dfhack.git"
23 _gitname="dfhack"
25 build() {
26   cd "$srcdir"
27   msg "Connecting to GIT server...."
29   if [ -d $_gitname ] ; then
30     cd $_gitname && git pull origin
31     msg "The local files are updated."
32   else
33     git clone $_gitroot $_gitname
34   fi
36   msg "GIT checkout done or server timeout"
37   msg "Starting make..."
39   rm -rf "$srcdir/$_gitname-build"
40   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
41   cd "$srcdir/$_gitname-build"
42   git submodule init
43   git submodule update
44   
46   # BUILD
47   #
49   cd build
50   ccmake .. -DCMAKE_INSTALL_PREFIX=$pkgdir/opt/df_linux -DBUILD_STONESENSE=on -DBUILD_LIBRARY=on -DBUILD_PLUGINS=on -DSTONESENSE_INTERNAL_SO=off || return 1
51   # cmake .. -DCMAKE_BUILD_TYPE:string=Debug -DCMAKE_INSTALL_PREFIX=$pkgdir/usr -DMEMXML_DATA_PATH:path=/usr/share/dfhack|| return 1
52   make || return 1
53   make install
55   cd ..
56   install -Dm755 "$srcdir/dwarffortress-hacked" "$pkgdir/usr/bin/dwarffortress-hacked"
57   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/dfhack/LICENCE"
60 # vim:set ts=2 sw=2 et: