# $Id: PKGBUILD 58860 2011-11-19 03:18:24Z svenstaro $ # Maintainer: Sven-Hendrik Haase # Contributor: Daenyth # Contributor: djnm pkgname=dwarffortress pkgver=0.31.25 _pkgver=31_25 pkgrel=2 pkgdesc="A single-player fantasy game. You control a dwarven outpost or an adventurer in a randomly generated persistent world." arch=(i686 x86_64) # WIP Thread: http://www.bay12forums.com/smf/index.php?topic=66142.0 url="http://www.bay12games.com/dwarves/" install="$pkgname.install" license=('custom:dwarffortress') depends=(gtk2 mesa sdl_image libsndfile openal sdl_ttf) if [[ $CARCH == 'x86_64' ]]; then depends=(lib32-gtk2 lib32-mesa lib32-sdl_image lib32-libsndfile lib32-openal lib32-libxdamage lib32-ncurses lib32-sdl_ttf) optdepends=('lib32-nvidia-utils: If you have nvidia graphics' 'lib32-catalyst-utils: If you have ATI graphics') fi replaces=(bin32-dwarffortress) source=(http://www.bay12games.com/dwarves/df_${_pkgver}_linux.tar.bz2 dwarffortress dwarffortress.desktop dwarffortress.png) md5sums=('def0c37560d7165c9065c4a4d8defc7e' 'c19aacc31e8df354827db352fecfd200' 'c8984d1eea6e409ecf339d6ee9e91e42' 'b1d51f82400073af9bb179e34a9209d0') build() { cd $srcdir/df_linux install -dm755 $pkgdir/opt/ cp -r $srcdir/df_linux/ $pkgdir/opt/ # Yay for precompiled stuff with junk permissions! :D find $pkgdir/opt/df_linux -type d -exec chmod 755 {} + find $pkgdir/opt/df_linux -type f -exec chmod 644 {} + install -Dm755 $srcdir/dwarffortress $pkgdir/usr/bin/dwarffortress chmod 755 $pkgdir/opt/df_linux/libs/Dwarf_Fortress install -d -m775 -o root -g games $pkgdir/opt/df_linux/data/save # This probably is overkill, but I don't know what specific files df needs permission for in here. chmod 775 $pkgdir/opt/df_linux chown root:games $pkgdir/opt/df_linux chown -R root:games $pkgdir/opt/df_linux/data find $pkgdir/opt/df_linux/data -type d -exec chmod 775 {} + find $pkgdir/opt/df_linux/data -type f -exec chmod 664 {} + # Desktop launcher with icon install -Dm644 $srcdir/dwarffortress.desktop $pkgdir/usr/share/applications/dwarffortress.desktop install -Dm644 $srcdir/dwarffortress.png $pkgdir/usr/share/pixmaps/dwarffortress.png install -Dm644 $srcdir/df_linux/readme.txt $pkgdir/usr/share/licenses/dwarffortress/readme.txt } # vim:set ts=2 sw=2 et: