Advertisement
Guest User

Dwarf Fortress 0.42.01 Arch Linux PKGBUILD

a guest
Dec 2nd, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. # Maintainer: Lukas Winkler <derwinlu+aur at gmail . com>
  2. # Modified from aur package dwarffortress-ironhand
  3. # Contributor: Chris Waddell <christopher at cwaddell . com >
  4. # Contributor: Christoph Hoopmann <choopm at 0pointer.org>
  5. # Contributor: Klaas Boesche <aurkagebe _at_ googlemail.com>
  6. # Modified from aur package dwarffortress-mayday by
  7. # Contributor: Patrick Chilton <chpatrick _at_ gmail _dot_ com>
  8. # Original from community by
  9. # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
  10. # Contributor: Daenyth <Daenyth+Arch [AT] gmail [DOT] com>
  11. # Contributor: djnm <nmihalich [at} gmail dott com>
  12.  
  13. pkgname=dwarffortress
  14. pkgver=0.42.01
  15. _dfver=42_01
  16. _df_unfuck=dwarf_fortress_unfuck
  17. pkgrel=1
  18. 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."
  19. arch=(i686 x86_64)
  20. url="http://www.bay12forums.com/smf/index.php?topic=129219.0"
  21. install="dwarffortress.install"
  22. license=('custom:dwarffortress-sf')
  23. depends=(gcc-libs glew glu gtk2 libsndfile libxdamage ncurses openal sdl_image sdl_ttf cmake)
  24. makedepends=(unrar unzip git)
  25. if [[ $CARCH == 'x86_64' ]]; then
  26. depends=(gcc-libs-multilib lib32-glew lib32-glu lib32-gtk2 lib32-libsndfile lib32-libxdamage lib32-ncurses lib32-openal lib32-sdl_image lib32-sdl_ttf)
  27. optdepends=('lib32-nvidia-utils: If you have nvidia graphics'
  28. 'lib32-catalyst-utils: If you have ATI graphics'
  29. 'lib32-alsa-lib: for alsa sound'
  30. 'lib32-libpulse: for pulse sound')
  31. fi
  32. backup=('opt/df_linux/data/init/colors.txt'
  33. 'opt/df_linux/data/init/init.txt'
  34. 'opt/df_linux/data/init/d_init.txt'
  35. 'opt/df_linux/data/init/interface.txt')
  36.  
  37. source=("http://www.bay12games.com/dwarves/df_${_dfver}_linux.tar.bz2"
  38. "git://github.com/svenstaro/${_df_unfuck}.git"
  39. "dwarffortress"
  40. "dwarffortress.desktop"
  41. "dwarffortress.png"
  42. "LICENSE-sf")
  43.  
  44. md5sums=('5e119fce35e465a49bf85410d1deea14'
  45. 'SKIP'
  46. 'c19aacc31e8df354827db352fecfd200'
  47. '60de2d654998220f426bbe41f2e57471'
  48. 'b1d51f82400073af9bb179e34a9209d0'
  49. '531f90ee12c6752762b64418a100a991')
  50.  
  51.  
  52. _installname=df_linux
  53.  
  54. build() {
  55. cd "$srcdir/$_df_unfuck"
  56. mkdir -p build && cd build
  57. cmake ..
  58. make -j4
  59. }
  60.  
  61. package() {
  62.  
  63. cd $srcdir/df_linux
  64. install -dm755 $pkgdir/opt/
  65. install -dm775 -o root -g games $pkgdir/opt/${_installname}
  66. cp -r $srcdir/df_linux/* $pkgdir/opt/${_installname}/
  67. #cp -rf $srcdir/Spacefox/* $pkgdir/opt/${_installname}/ # copy tileset
  68.  
  69. find $pkgdir/opt/${_installname} -type d -exec chmod 755 {} +
  70. find $pkgdir/opt/${_installname} -type f -exec chmod 644 {} +
  71.  
  72. install -Dm755 $srcdir/dwarffortress $pkgdir/usr/bin/dwarffortress
  73.  
  74. chmod 755 $pkgdir/opt/${_installname}/libs/Dwarf_Fortress
  75.  
  76. install -Dm755 $srcdir/${_df_unfuck}/build/libgraphics.so $pkgdir/opt/${_installname}/libs/libgraphics.so
  77. ln -s /usr/lib32/libpng.so $pkgdir/opt/${_installname}/libs/libpng.so.3
  78. rm $pkgdir/opt/${_installname}/libs/{libgcc_s.so.1,libstdc++.so.6}
  79.  
  80. install -d -m775 -o root -g games $pkgdir/opt/${_installname}/data/save
  81.  
  82. chown -R root:games $pkgdir/opt/${_installname}/data
  83. find $pkgdir/opt/${_installname}/data -type d -exec chmod 775 {} +
  84. find $pkgdir/opt/${_installname}/data -type f -exec chmod 664 {} +
  85. chown root:games $pkgdir/opt/${_installname}
  86.  
  87. install -Dm644 $srcdir/dwarffortress.desktop $pkgdir/usr/share/applications/dwarffortress.desktop
  88. install -Dm644 $srcdir/dwarffortress.png $pkgdir/usr/share/pixmaps/dwarffortress.png
  89.  
  90. #install -Dm644 $srcdir/df_linux/readme.txt $pkgdir/usr/share/licenses/dwarffortress-spacefox/readme.txt
  91. #install -Dm644 $srcdir/LICENSE-sf $pkgdir/usr/share/licenses/dwarffortress-spacefox/LICENSE-sf
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement