summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 17b62bcb9dd426bc2178b4a9a384c566a977a175 (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
# Maintainer: Paul Davis ("dangersalad") <paul@dangersalad.com>
# Original Maintainer: Christian Krause ("wookietreiber") <christian.krause@mailbox.org>

pkgname=dfhack-twbt-bin
_pkgname=dfhack
pkgver=0.44.12
_pkgver=$pkgver-r2
_twbtver=6.61
pkgrel=6
pkgdesc="memory hacking library for Dwarf Fortress and a set of tools that use it including Text Will Be Text plugin"
arch=('x86_64')
url="https://dfhack.readthedocs.org/"
license=('custom')
depends=(dwarffortress=$pkgver lua protobuf libpng12 libxrandr libjpeg6 freetype2 libglvnd libxcursor libxinerama)

conflicts=(dfhack dfhack-git dfhack-bin)
provides=(dfhack)

source=(
    dfhack.sh
    dfhack-run.sh
    dfhack.init
    init.txt
    https://github.com/DFHack/dfhack/releases/download/$_pkgver/dfhack-$_pkgver-Linux-64-gcc-4.8.tar.bz2
    https://github.com/mifki/df-twbt/releases/download/v$_twbtver/twbt-$_twbtver-linux.zip
)

md5sums=('e630ae2fc93c6c7b55552336da2b6c07'
         '3853c6f890d3541f710f2c4833a9e696'
         '6730da5fec400ece9102552e77996fcb'
         '052a58e7f5f1af8be3ddefe9677b8fc6'
         'e200a6225dcf285e2eac19c1d1e118ea'
         '8eac5ae59dad0397090c4f50d50ef841')

prepare() {
    sed -e 's|setarch i386 -R ||' \
        -i $srcdir/dfhack
}

package() {
    install -d $pkgdir/opt/dwarffortress

    cp -r $srcdir/{hack,dfhack,dfhack-run,dfhack-config,dfhack.init-example,stonesense,dfhack.init} $pkgdir/opt/dwarffortress

    install -Dm755 $srcdir/init.txt      $pkgdir/opt/dwarffortress/data/init/init-twbt.txt
    install -Dm755 $srcdir/dfhack.sh     $pkgdir/usr/bin/dfhack
    install -Dm755 $srcdir/dfhack-run.sh $pkgdir/usr/bin/dfhack-run
    
    install -Dm755 $srcdir/$_pkgver/twbt.plug.so $pkgdir/opt/dwarffortress/hack/plugins
    
    install -Dm755 $srcdir/shadows.png $pkgdir/opt/dwarffortress/data/art/shadows.png
    install -Dm755 $srcdir/white1px.png $pkgdir/opt/dwarffortress/data/art/white1px.png
    install -Dm755 $srcdir/transparent1px.png $pkgdir/opt/dwarffortress/data/art/transparent1px.png
    install -Dm755 $srcdir/overrides.txt $pkgdir/opt/dwarffortress/data/init/overrides.txt

    install -Dm644 $srcdir/hack/LICENSE.rst $pkgdir/usr/share/licenses/$pkgname/LICENSE
}