summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 99f4c55675b82e0554bc6515527d81668c41b6be (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Maintainer: Lukas Winkler <derwinlu+aur at gmail . com>
# Modified from aur package dwarffortress-ironhand 
# Contributor: Chris Waddell <christopher at cwaddell . com >
# Contributor: Christoph Hoopmann <choopm at 0pointer.org>
# Contributor: Klaas Boesche <aurkagebe _at_ googlemail.com>
# Modified from aur package dwarffortress-mayday by
# Contributor: Patrick Chilton <chpatrick _at_ gmail _dot_ com>
# Original from community by
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Daenyth <Daenyth+Arch [AT] gmail [DOT] com>
# Contributor: djnm <nmihalich [at} gmail dott com>

pkgname=dwarffortress-spacefox
pkgver=0.47.02
_dfver=47_02
_sfver=47.02
_ufver=0.47.02
pkgrel=1
pkgdesc="A single-player fantasy game. You control a dwarven outpost or an adventurer in a randomly generated persistent world. Packed with Spacefox's tileset and graphics pack.  Does not replace other dwarffortress packages."
arch=(i686 x86_64)
url="http://www.bay12forums.com/smf/index.php?topic=129219.0"
install="dwarffortress-sf.install"
license=('custom:dwarffortress-sf')
makedepends=(unrar unzip git cmake)
depends_i686=(glew glu gtk2 libsndfile libxdamage ncurses openal sdl_image sdl_ttf zlib)
depends_x86_64=(lib32-glew lib32-glu lib32-gtk2 lib32-libsndfile lib32-libxdamage lib32-ncurses lib32-openal lib32-sdl_image lib32-sdl_ttf lib32-zlib)
optdepends=('nvidia-utils: If you have nvidia graphics'
            'catalyst-utils: If you have ATI graphics'
            'alsa-lib: for alsa sound'
            'libpulse: for pulse sound')
if test "$CARCH" == "x86_64"; then
    optdepends=('lib32-nvidia-utils: If you have nvidia graphics'
                'lib32-catalyst-utils: If you have ATI graphics'
                'lib32-alsa-lib: for alsa sound'
                'lib32-libpulse: for pulse sound')
fi

backup=('opt/df_linux-sf/data/init/colors.txt'
        'opt/df_linux-sf/data/init/init.txt'
        'opt/df_linux-sf/data/init/d_init.txt'
        'opt/df_linux-sf/data/init/interface.txt')

source=("df_${_dfver}.tar.bz2::http://www.bay12games.com/dwarves/df_${_dfver}_linux.tar.bz2"
        "spacefox_${_sfver}.zip::https://github.com/DFgraphics/Spacefox/archive/${_sfver}.zip"
        "unfuck_${_ufver}.zip::https://github.com/svenstaro/dwarf_fortress_unfuck/archive/${_ufver}.zip"
        "dwarffortress-sf"
        "dwarffortress-sf.desktop"
        "dwarffortress-sf.png"
        "LICENSE-sf")

md5sums=('f888c07240c02fa792d25d325517d1ec'
         'cfba769b568d520a3e42e748c552774f'
         'f872d22e6d397dcf54c1a7fec4078df6'
         '53c9d5bfcb35281c81b78fea23da0698'
         '60de2d654998220f426bbe41f2e57471'
         'b1d51f82400073af9bb179e34a9209d0'
         '531f90ee12c6752762b64418a100a991')


_installname=df_linux-sf


build() {
  # build df unfuck
  cd "$srcdir/dwarf_fortress_unfuck-${_ufver}"
  mkdir -p build && cd build
  cmake ..
  make
}

package() {
  cd $srcdir/df_linux
  install -dm755 $pkgdir/opt/
  install -dm755 -o root -g games $pkgdir/opt/${_installname}

  # cp df
  cp -r $srcdir/df_linux/* $pkgdir/opt/${_installname}/

  # cp tileset
  cp -rf $srcdir/Spacefox-${_sfver}/* $pkgdir/opt/${_installname}/

  # fix libs
  install -Dm755 $srcdir/dwarf_fortress_unfuck-${_ufver}/build/libgraphics.so $pkgdir/opt/${_installname}/libs/libgraphics.so
  #ln -s /usr/lib32/libpng.so $pkgdir/opt/${_installname}/libs/libpng.so.3
  rm $pkgdir/opt/${_installname}/libs/{libgcc_s.so.1,libstdc++.so.6}

  # permissions
  find $pkgdir/opt/${_installname} -type d -exec chmod 755 {} +
  find $pkgdir/opt/${_installname} -type f -exec chmod 644 {} +
  chmod 755 $pkgdir/opt/${_installname}/libs/Dwarf_Fortress
  chmod 664 $pkgdir/opt/${_installname}/data/index
  chown -R root:games $pkgdir/opt/${_installname}

  install -d -m775 -o root -g games $pkgdir/opt/${_installname}/data/save
  install -Dm755 $srcdir/dwarffortress-sf $pkgdir/usr/bin/dwarffortress-sf
  install -Dm644 $srcdir/dwarffortress-sf.desktop $pkgdir/usr/share/applications/dwarffortress-sf.desktop
  install -Dm644 $srcdir/dwarffortress-sf.png $pkgdir/usr/share/pixmaps/dwarffortress-sf.png
  install -Dm644 $srcdir/df_linux/readme.txt $pkgdir/usr/share/licenses/dwarffortress-spacefox/readme.txt
  install -Dm644 $srcdir/LICENSE-sf $pkgdir/usr/share/licenses/dwarffortress-spacefox/LICENSE-sf
}