summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b496c1363942d8ce9f179b45ad41f4c848a676e8 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# Maintainer: Alexej Magura <agm2819*gmail*>
# Contributor: SaThaRiel <sathariel74[at]gmail[dot]com>
#
pkgname=steamband
pkgver=0.4.1f
_dir="Steamband $pkgver SRC"
pkgrel=5
pkgdesc="a Steampunk / Victorian / Pulp variant of Angband, A roguelike ASCII dungeon exploration simulation game."
arch=('i686' 'x86_64')
url="http://angband.oook.cz/steamband/steamband.html"
license=('unknown')
depends=('ncurses' 'libx11' 'slang')
options=('ccache' 'emptydirs')
source=("http://angband.oook.cz/steamband/Steamband-041f-SRC.zip")
md5sums=('14fd9bc6f218bb655e0dc247793f7a87')
 
prepare () {
    
  cd "$srcdir/$_dir/src"
  sed -e '175,180d' Makefile.std > Makefile

  sed -i 's|\(# define DEFAULT_PATH\) .*$|\1 "/usr/lib/steamband/"|' config.h
  # CPPFLAGS="-DDEFAULT_PATH=/usr/lib/steamband/"

  #sed -r ':begin; $!N; s/#(CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU")\n#(LIBS = -lX11 -lcurses) -ltermcaip/\1\n\2/' -i Makefile
}

build () {
  cd "$srcdir/$_dir/src"
  make -f Makefile.std
}

package () {
  cd "$srcdir/$_dir"
 
  install -d "$pkgdir/usr/bin"
  install -d "$pkgdir/usr/share/doc/$pkgname"
  install -d "$pkgdir/usr/lib/$pkgname/"{edit,bone,file,help,info,pref,spoiler,testing,user}
  install -d "$pkgdir/usr/lib/$pkgname/xtra/"{font,graf,sound}

  # todo, something more clever with install
  # but less clever than the old version
  cp lib/edit/*.txt  "$pkgdir/usr/lib/$pkgname/edit/"
  cp lib/file/*.txt  "$pkgdir/usr/lib/$pkgname/file/"
  cp lib/help/*.txt  "$pkgdir/usr/lib/$pkgname/help/"
  cp lib/help/*.hlp  "$pkgdir/usr/lib/$pkgname/help/"
  cp lib/pref/*      "$pkgdir/usr/lib/$pkgname/pref/"
  cp lib/spoiler/*   "$pkgdir/usr/lib/$pkgname/spoiler/"
  cp lib/xtra/font/* "$pkgdir/usr/lib/$pkgname/xtra/font/"

  install -dm 775 "$pkgdir/usr/lib/$pkgname/"{apex,save,data}

  pushd src
  install -m 755 -t "$pkgdir/usr/bin" $pkgname
  popd
  
  install -m 644 -t "$pkgdir/usr/share/doc/$pkgname" \
      changelist.txt \
      porting\ readme.txt \
      readme.txt
  
  chown -R root:games "$pkgdir/usr/lib/$pkgname/"
}