upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / dwarffortress / trunk / PKGBUILD
blob24b23f3bcfe4639d2aeec6f476c6d5b0961c8a65
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>
5 pkgname=dwarffortress
6 pkgver=0.47.05
7 _pkgver=47_05
8 pkgrel=3
9 pkgdesc="A single-player fantasy game in which you build a dwarven outpost or play an adventurer in a randomly generated world"
10 arch=('x86_64')
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}
24         dwarffortress
25         dwarffortress.desktop
26         dwarffortress.png
27         https://www.bay12games.com/dwarves/df_${_pkgver}_linux.tar.bz2)
28 sha256sums=('SKIP'
29             '8c719b8922ce8dcb3173ec035938d0271e6ba6d73795b246bfb313494adb5a38'
30             'e79e3d945c6cc0da58f4ca30a210c7bf1bc3149fd10406d1262a6214eb40445a'
31             '83183abc70b11944720b0d86f4efd07468f786b03fa52fe429ca8e371f708e0f'
32             'ac74a6dbb7d7d9621f430405080322ab50c35f6632352ff2ea923f6dc5affca3')
34 build() {
35   cd dwarf_fortress_unfuck
37   cmake .
38   make
41 package() {
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: