summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7af5804da4f1965a6a4d2542b5dcea184d205978 (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
# Maintainer: Frederic Bezies <fredbezies at gmail dot com>
# Contributor: andmars <andreas.marschall @ unitybox.de>
# Contributor: SaThaRiel <sathariel74[at] gmail[dot]com>
pkgname=angband-git
pkgver=4.2.5.r161.g787117605
pkgrel=1
pkgdesc="A roguelike dungeon-exploration game based on Tolkien's books"
arch=('i686' 'x86_64')
url="http://rephial.org/"
license=('GPL2' 'custom')
depends=('sdl2_image' 'sdl2_ttf' 'sdl2_mixer')
makedepends=('git' 'autogen' 'python-docutils')
conflicts=('angband')
source=("$pkgname"::'git+https://github.com/angband/angband.git')
sha256sums=('SKIP')

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

prepare() {
  cd "$srcdir/$pkgname"
  ./autogen.sh

  # Fix detection of ncurses config script for ncurses 6.0
  sed -i 's/ncursesw5-config/ncursesw6-config/g' acinclude.m4
}

build() {
  cd "$srcdir/$pkgname"
  ./configure \
    --prefix=/usr \
    --bindir=/usr/bin/ \
    --sysconfdir=/usr/share/angband \
    --with-configpath=/usr/share/angband \
    --with-libpath=/usr/share/angband \
    --enable-gtk \
    --enable-sdl2 \
    --enable-sdl2-mixer
  make
}

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir" install
  rm -f "$pkgdir"/usr/share/angband/*/delete.me
  install -Dm644 $srcdir/$pkgname/docs/copying.rst "$pkgdir"/usr/share/licenses/$pkgname/COPYING
  install -d "$pkgdir"/usr/bin
}