1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Daenyth <Daenyth+Arch [AT] gmail [DOT] com>
3 # Contributor: djnm <nmihalich [at} gmail dott com>
9 pkgdesc="A single-player fantasy game in which you build a dwarven outpost or play an adventurer in a randomly generated world"
11 url="https://www.bay12games.com/dwarves/"
12 license=('custom:dwarffortress')
13 depends=('libice' 'gtk3' 'glu' 'sdl' 'sdl_image' 'sdl_ttf' 'libsndfile'
14 'libsm' 'openal' 'glew' 'gcc-libs' 'glib2')
15 makedepends=('git' 'cmake')
16 optdepends=('nvidia-utils: If you have nvidia graphics'
17 'alsa-lib: for alsa sound'
18 'libpulse: for pulse sound')
19 options=('!strip' '!buildflags')
20 install=$pkgname.install
21 # I made a github repo for the sole purpose of cleaning up df a bit
22 # We try to compile whatever little bit of df is open source
23 source=(git+https://github.com/svenstaro/dwarf_fortress_unfuck.git#tag=${pkgver}
27 https://www.bay12games.com/dwarves/df_${_pkgver}_linux.tar.bz2)
29 '8c719b8922ce8dcb3173ec035938d0271e6ba6d73795b246bfb313494adb5a38'
30 'e79e3d945c6cc0da58f4ca30a210c7bf1bc3149fd10406d1262a6214eb40445a'
31 '83183abc70b11944720b0d86f4efd07468f786b03fa52fe429ca8e371f708e0f'
32 'ac74a6dbb7d7d9621f430405080322ab50c35f6632352ff2ea923f6dc5affca3')
35 cd dwarf_fortress_unfuck
42 install -dm755 "$pkgdir"/opt/
43 cp -r "$srcdir"/df_linux "$pkgdir"/opt/$pkgname
44 rm -r "$pkgdir"/opt/$pkgname/df "$pkgdir"/opt/$pkgname/libs/* "$pkgdir"/opt/$pkgname/g_src
46 find "$pkgdir"/opt/$pkgname -type d -exec chmod 755 {} +
47 find "$pkgdir"/opt/$pkgname -type f -exec chmod 644 {} +
49 install -Dm755 "$srcdir"/df_linux/libs/Dwarf_Fortress "$pkgdir"/opt/$pkgname/libs/Dwarf_Fortress
50 install -Dm755 "$srcdir"/dwarf_fortress_unfuck/libgraphics.so "$pkgdir"/opt/$pkgname/libs/libgraphics.so
51 install -Dm755 "$srcdir"/dwarffortress "$pkgdir"/usr/bin/$pkgname
53 # No idea why we need this. Really. This isn't being loaded dynamically, it's not linked and
54 # in general there is no indication this is being used. However, it doesn't work without this symlink.
55 ln -s /usr/lib/libpng.so "$pkgdir"/opt/$pkgname/libs/libpng.so.3
57 # Set pkgname in runscript
58 sed -i "s/^pkgname=.*/pkgname=$pkgname/" "$pkgdir"/usr/bin/$pkgname
60 # Desktop launcher with icon
61 install -Dm644 "$srcdir"/dwarffortress.desktop "$pkgdir"/usr/share/applications/"$pkgname".desktop
62 install -Dm644 "$srcdir"/dwarffortress.png "$pkgdir"/usr/share/pixmaps/"$pkgname".png
64 install -Dm644 "$srcdir"/df_linux/readme.txt "$pkgdir"/usr/share/licenses/$pkgname/readme.txt
67 # vim:set ts=2 sw=2 et: