# Maintainer: Jan Alexander Steffens (heftig) # Contributor: Jakob Gruber pkgname=stone-soup-git pkgver=0.29a0+25+g7f48f510a0 pkgrel=1 pkgdesc="Open-source, single-player, role-playing roguelike game of exploration and treasure-hunting" arch=(i686 x86_64) url="http://crawl.develz.org/" license=(custom) depends=(lua51 ncurses sdl2_image sdl2_mixer sqlite glu freetype2 ttf-dejavu) makedepends=(bison flex mesa git imagemagick optipng pngcrush python-yaml) conflicts=(stone-soup) options=(!debug) source=("git+https://github.com/crawl/crawl" crawl-tiles.desktop) sha256sums=('SKIP' '25cef1365a3b19d96c62c270642f3c14fd627ebac364f963271e4f3f3eb7ed7b') pkgver() { cd crawl git describe --long | sed -r 's/^([^-]+)(-([^-]+))?-([0-9]+)-(g.*)$/\1\3+\4+\5/' } prepare() { cd crawl/crawl-ref/source sed -i 's/lua5\.1/lua51/g' Makefile cd ../../.. cp -a crawl crawl-tiles } _make() { make -C $1/crawl-ref/source \ prefix=/usr \ bin_prefix=bin \ INSTALL_UGRP=root:root \ MCHMOD=755 \ CFOPTIMIZE="$CXXFLAGS" \ EXTERNAL_LDFLAGS="$LDFLAGS" \ LTO=1 \ "${@:2}" } build() { _make crawl-tiles TILES=y all _make crawl all } package() { _make crawl-tiles TILES=y DESTDIR="$pkgdir" install mv "$pkgdir"/usr/bin/crawl{,-tiles} _make crawl DESTDIR="$pkgdir" install install -Dt "$pkgdir/usr/share/applications" -m644 crawl-tiles.desktop install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 crawl/LICENSE local i s t for i in 32 48 64 128 256 512; do i=${i}x${i} s=crawl/crawl-ref/source/dat/tiles/stone_soup_icon-$i.png t="$pkgdir/usr/share/icons/hicolor/$i/apps/crawl-tiles.png" if [[ -f $s ]]; then install -Dm644 $s "$t" else mkdir -p "${t%/*}" convert ${s/$i/512x512} -resize $i "$t" fi done find "$pkgdir" -iname '*.png' -exec optipng -strip all -o4 -fix {} + } # vim:set sw=2 et: