updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / stone-soup-git / PKGBUILD
blobdc695a5c7977eb34bf50adf042b9a9855662dc7b
1 # Maintainer: Jakob Gruber <jakob.gruber@gmail.com>
3 pkgname=stone-soup-git
4 _pkgname=stone-soup
5 pkgver=20111026
6 pkgrel=1
7 pkgdesc="An open-source, single-player, role-playing roguelike game of exploration and treasure-hunting"
8 arch=('i686' 'x86_64' 'ppc')
9 url='http://crawl.develz.org/'
10 depends=('lua' 'ncurses' 'sdl_image' 'sqlite3' 'libgl' 'mesa')
11 makedepends=('git' 'bison' 'flex')
12 conflicts=('crawl' 'stone-soup' 'stone-soup-tile')
13 license=('custom')
14 backup=('usr/share/stone-soup/data/settings/tiles_options.txt'
15         'usr/share/stone-soup/data/settings/init.txt')
16 source=("${_pkgname}.desktop")
17 md5sums=('98be780cddb2a0915bbab15ad93644f1')
19 _gitroot="git://gitorious.org/crawl/crawl.git"
20 _gitname="crawl-ref"
22 build() {
23     cd "$srcdir"
24     msg "Connecting to GIT server...."
26     if [ -d $_gitname ] ; then
27       cd $_gitname && git pull origin
28       msg "The local files are updated."
29     else
30       git clone $_gitroot $_gitname
31     fi
33     msg "GIT checkout done"
34     msg "Starting make..."
36     cd $srcdir/$_gitname/crawl-ref/source
38     # adjust makefile to use /usr/bin, owner root:root, disable setgid on executable
40     sed -i 's|bin_prefix    := bin|bin_prefix    := usr/bin|' Makefile
41     sed -i 's/INSTALL_UGRP := games:games/INSTALL_UGRP := root:root/' Makefile
42     sed -i 's|MCHMOD := 2755|MCHMOD := 755|' Makefile
44     # first build and install tiles version
46     make DESTDIR="${pkgdir}" \
47          SAVEDIR="~/.stone-soup/" \
48          DATADIR="/usr/share/${_pkgname}/data" \
49          USE_UNICODE=y \
50          TILES=y \
51          install
53     # rename tiles executable to avoid clashing with console crawl
55     mv "${pkgdir}/usr/bin/crawl" "${pkgdir}/usr/bin/crawl-tiles"
57     # then build and install console version
59     make DESTDIR="${pkgdir}" \
60          SAVEDIR="~/.stone-soup/" \
61          DATADIR="/usr/share/${_pkgname}/data" \
62          USE_UNICODE=y \
63          install
65     # install crawl license
67     install -D -m644 ../licence.txt "${pkgdir}/usr/share/licenses/${_pkgname}/license.txt"
69     # install icon and .desktop file
71     install -D -m644 dat/tiles/stone_soup_icon-32x32.png "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
72     install -D -m644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"