summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 26091db175526cd086fe1251cca1cc96c4149820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer : Frederic Bezies <fredbezies at gmail dot com> 

# This PKGBUILD is based on work stone-soup-tiles stable PKGBUILD
# For curious players only ;)

pkgname=stone-soup-tiles-git
_pkgname=crawl
pkgver=0.27.a0.r1302.g7736ffe575
pkgrel=1
pkgdesc="Community maintained variant of Linley's Dungeon Crawl (tiles) - git version"
arch=('i686' 'x86_64')
url="http://crawl.develz.org"
depends=(sdl2_image xdg-utils freetype2 glu sqlite)
makedepends=(pngcrush git python-yaml lua)
license=('custom')
conflicts=('crawl' 'stone-soup-tiles')
source=(git://github.com/crawl/crawl.git
stone-soup-tiles-git.desktop)
sha256sums=('SKIP'
            'bc6985944bd5fc44d96fe705725430e97161b5e428ab17e6cf7a0d7976681119')

prepare() {
	cd "${srcdir}/${_pkgname}"
  	git submodule update --init
}

pkgver() {
  cd "${srcdir}/${_pkgname}"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
  cd "${srcdir}/${_pkgname}/crawl-ref/source"
  
  make prefix=/usr DESTDIR="${pkgdir}" SAVEDIR="~/.stone-soup/" \
         DATADIR="/usr/share/${_pkgname}/data" \
         USE_UNICODE=y TILES=y install
  
  # Some dirty operations needed to get everything working.
  
  mkdir -p $pkgdir/usr/share/{applications,pixmaps}
  mkdir -p $pkgdir/usr/bin/
  mv "${pkgdir}/usr/games/crawl" "${pkgdir}/usr/bin/crawl"
  rm -rf $pkgdir/usr/games/
  
  install -D -m644 $srcdir/$_pkgname/LICENSE "${pkgdir}/usr/share/licenses/$pkgname/license.txt"
  
  cp ${srcdir}/${_pkgname}/crawl-ref/source/dat/tiles/stone_soup_icon-32x32.png $pkgdir/usr/share/pixmaps/$pkgname.png
  cp $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/
}