# Depends on:  git xorg-glu sdl2 sdl2-image sdl2-mixer freetype zlib libpng pcre mesa glew dejavu-ttf

description="Dungeon Crawl Stone Soup is a singleplayer roguelike game - Tiles version"
url="http://crawl.develz.org/"
packager="remy <remy@nutyx.org>"
contributors="berlius at nutyx dot com, tnut at nutyx dot org"
name=crawl-tiles
version=0.21.1
release=1
source=()

prepare() {
git clone https://github.com/crawl/crawl.git

cd crawl

git submodule update --init

}

build () {

cd crawl/crawl-ref/source

echo $version > util/release_ver

sed -i Makefile \
        -e 's/INSTALL_UGRP := games:games/INSTALL_UGRP := root:root/' \
        -e 's|MCHMOD := 2755|MCHMOD := 755|'
        		

make DESTDIR=$PKG \
	 prefix=/usr \
	 bin_prefix=bin \
	 BUILD_LUA=yes \
	 DATADIR=/usr/share/$name \
	 SAVEDIR='~/.crawl/' \
	 TILES=y \
         SOUND=y \
	install
}
