1. # Maintainer: TryA <tryagainprod {at} gmail.com>
  2. # Contributor: mirandir <mirandir AT orange DOT fr>
  3.  
  4. pkgname=braid
  5. _gamepkg="braid-linux-build2.run.bin"
  6. pkgver=1.0
  7. pkgrel=5
  8. pkgdesc="A puzzle-platformer where the player manipulates the flow of time in strange and unusual ways \
  9. (requires copy of the full game)"
  10. url="http://braid-game.com"
  11. license=('custom: "commercial"')
  12. arch=('i686' 'x86_64')
  13. depends=('sdl' 'mesa' 'sh')
  14. optdepends=('libtxc_dxtn: mandatory S3TC implementation for free DRI drivers')
  15. makedepends=('unzip')
  16. source=('braid.desktop' 'braid.sh')
  17. md5sums=('5ab9e39da4209196fbf4a3d4121287e0'
  18. '773db3f2c423722d9ba04146195204c8')
  19. options=(!strip)
  20.  
  21. build() {
  22. cd ${srcdir}
  23.  
  24. msg "You need a full copy of this game in order to install it"
  25. msg "Searching for ${_gamepkg} in dir: $(readlink -f `pwd`/..)"
  26. if [[ -f "../${_gamepkg}" ]]; then
  27. msg "Found game package, installing..."
  28. ln -fs ../${_gamepkg} .
  29. unzip braid-linux-build2.run.bin || true
  30. else
  31. error "Game package not found, please type absolute path to ${_gamepkg}:"
  32. read pkgpath
  33. if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then
  34. error "Unable to find game package."
  35. return 1
  36. else
  37. msg "Found game package, installing..."
  38. ln -fs "${pkgpath}/${_gamepkg}" .
  39. unzip braid-linux-build2.run.bin || true
  40. fi
  41. fi
  42.  
  43. # data
  44. mkdir ${pkgdir}/opt
  45. cp -r data/gamedata/ ${pkgdir}/opt/Braid
  46.  
  47. if [ "${CARCH}" == "x86_64" ]; then
  48. _arch=amd64
  49. else
  50. _arch=x86
  51. fi
  52.  
  53. cp data/${_arch}/libCg.so ${pkgdir}/opt/Braid
  54. cp data/${_arch}/libCgGL.so ${pkgdir}/opt/Braid
  55. cp data/${_arch}/braid ${pkgdir}/opt/Braid
  56.  
  57. # startup script
  58. install -D ${srcdir}/braid.sh ${pkgdir}/usr/bin/braid
  59.  
  60. # desktop icon
  61. install -Dm644 ${srcdir}/braid.desktop ${pkgdir}/usr/share/applications/braid.desktop
  62. install -Dm644 ${srcdir}/data/gamedata/braid.png ${pkgdir}/usr/share/pixmaps/braid.png
  63. }