summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 117f9a95b2561d47a347b4a1b20558d2eeccae94 (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
# Maintainer: yantene <contact at yantene dot net>

pkgname=hengband-git
_gitname=hengband
pkgver=v2.1.4.r376.g02901956
pkgrel=1
pkgdesc="A variant of angband"
arch=('i686' 'x86_64')
url="http://hengband.osdn.jp"
license=('unknown')
depends=('ncurses')
source=(git://git.osdn.net/gitroot/hengband/hengband.git)
md5sums=('SKIP')

pkgver() {
  cd $_gitname
  git describe --tags --always | sed -e 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $_gitname
  ./bootstrap
}

build() {
  cd $_gitname

  ./configure --with-libpath=/usr/lib/hengband/
  make
}

package() {
  cd $_gitname

  install -d "${pkgdir}/usr/lib"

  install -D -m755 "src/hengband" "${pkgdir}/usr/bin/hengband"
  cp -R ./lib/ "${pkgdir}/usr/lib/hengband"
  chmod -R 775 "${pkgdir}/usr/lib/hengband"
  chown -R root:users "${pkgdir}/usr/lib/hengband"

# removing unneeded files
  find "${pkgdir}" -iname delete.me -delete
  find "${pkgdir}" -iname Makefile -delete
  find "${pkgdir}" -iname Makefile.am -delete
  find "${pkgdir}" -iname Makefile.in -delete
}