1 # Maintainer: Patrick Chilton <chpatrick _at_ gmail _dot_ com>
2 # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
3 # Contributor: Daenyth <Daenyth+Arch [AT] gmail [DOT] com>
4 # Contributor: djnm <nmihalich [at} gmail dott com>
5 pkgname=dwarffortress-mayday
10 pkgdesc="A single-player fantasy game. You control a dwarven outpost or an adventurer in a randomly generated persistent world. Mayday tileset."
12 # WIP Thread: http://www.bay12forums.com/smf/index.php?topic=66142.0
13 url="http://mayday.w.staszic.waw.pl/df.php"
14 install="$pkgname.install"
15 license=('custom:dwarffortress')
16 depends=(gtk2 mesa sdl_image libsndfile openal sdl_ttf)
18 if [[ $CARCH == 'x86_64' ]]; then
19 depends=(lib32-gtk2 lib32-mesa lib32-sdl_image lib32-libsndfile lib32-openal
20 lib32-libxdamage lib32-ncurses lib32-sdl_ttf)
21 optdepends=('lib32-nvidia-utils: If you have nvidia graphics'
22 'lib32-catalyst-utils: If you have ATI graphics')
24 replaces=(bin32-dwarffortress dwarffortress)
25 source=(http://www.bay12games.com/dwarves/df_${_dfver}_linux.tar.bz2
26 http://mayday.w.staszic.waw.pl/~mayday/upload/DFG/dfg_${_dfgver}_win.zip
27 dwarffortress dwarffortress.desktop dwarffortress.png)
28 noextract=(dfg_${_dfgver}_win.zip df_${_dfver}_linux.tar.bz2)
29 md5sums=('def0c37560d7165c9065c4a4d8defc7e'
30 '6d03f22f96f44065feb3952263f8e83e'
31 'c19aacc31e8df354827db352fecfd200'
32 'c8984d1eea6e409ecf339d6ee9e91e42'
33 'b1d51f82400073af9bb179e34a9209d0')
37 tar -f "df_${_dfver}_linux.tar.bz2" -x \
38 --exclude "df_linux/raw" \
39 --exclude "df_linux/data/art" \
40 --exclude "df_linux/data/init/colors.txt" \
41 --exclude "df_linux/data/init/init.txt"
43 unzip -qod df_linux "dfg_${_dfgver}_win.zip" \
46 "data/init/embark_profiles.txt" \
47 "data/init/colors.txt" \
51 install -dm755 $pkgdir/opt/
52 cp -r $srcdir/df_linux/ $pkgdir/opt/
54 # Yay for precompiled stuff with junk permissions! :D
55 find $pkgdir/opt/df_linux -type d -exec chmod 755 {} +
56 find $pkgdir/opt/df_linux -type f -exec chmod 644 {} +
58 install -Dm755 $srcdir/dwarffortress $pkgdir/usr/bin/dwarffortress
60 chmod 755 $pkgdir/opt/df_linux/libs/Dwarf_Fortress
62 install -d -m775 -o root -g games $pkgdir/opt/df_linux/data/save
64 # This probably is overkill, but I don't know what specific files df needs permission for in here.
65 chmod 775 $pkgdir/opt/df_linux
66 chown root:games $pkgdir/opt/df_linux
67 chown -R root:games $pkgdir/opt/df_linux/data
68 find $pkgdir/opt/df_linux/data -type d -exec chmod 775 {} +
69 find $pkgdir/opt/df_linux/data -type f -exec chmod 664 {} +
71 # Desktop launcher with icon
72 install -Dm644 $srcdir/dwarffortress.desktop $pkgdir/usr/share/applications/dwarffortress.desktop
73 install -Dm644 $srcdir/dwarffortress.png $pkgdir/usr/share/pixmaps/dwarffortress.png
75 install -Dm644 $srcdir/df_linux/readme.txt $pkgdir/usr/share/licenses/dwarffortress/readme.txt
78 # vim:set ts=2 sw=2 et: