Guest User

Untitled

a guest
Sep 12th, 2013
46
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Dennis Hamester <dennis [dot] hamester [at] gmail [dot] com>
  2. # Contributor: J0k3r <moebius282 e4at gmail D0_T com>
  3.  
  4. pkgname=ftl
  5. pkgver=1.03.3
  6. pkgrel=3
  7. pkgdesc="A spaceship simulation real-time roguelike-like (requires full copy of the game)"
  8. url="http://www.ftlgame.com/"
  9. license=('unknown')
  10. # Copyright (c) 2012 by Subset Games. All rights reserved.  Unauthorized duplication of this game is prohibited.
  11. arch=('i686' 'x86_64')
  12. groups=("games")
  13. depends=('sdl' 'libpng12' 'glu' 'libgl' 'gcc-libs' 'freetype2')
  14. makedepends=('imagemagick')
  15. _purgelibs=('libSDL-1.2.so.0' 'libfreetype.so.6' 'libpng12.so.0' 'libz.so.1' 'libstdc++.so.6')
  16. _archivename="${pkgname^^}.Linux.${pkgver}.tar.gz"
  17. source=("hib://${_archivename}"
  18.         "$pkgname.desktop")
  19. sha256sums=('a18983cac8cb0db8990d3b56c301d9983f0a8a5ad4850266922b7c5d538c178d'
  20.             '5efa9679c437b119874927d3117d4859dbb02cc754890994aac3e9b4dc1465dd')
  21. PKGEXT='.pkg.tar'
  22.  
  23.  
  24.  
  25. # You can download the Humble Indie Bundle file manually, or you can configure
  26. # DLAGENTS in makepkg.conf to auto-download.
  27. #
  28. # For example, to use hib-dlagent to download files set something like this in
  29. # your makepkg.conf (change/add -k and add -u/-p to your needs):
  30. # DLAGENTS=('hib::/usr/bin/hib-dlagent -k 1a2b3c -o %o $(echo %u | cut -c 7-)')
  31. #
  32. # To auto-search through a directory containing Humble Bundle downloads, you
  33. # could set:
  34. # DLAGENTS=('hib::/usr/bin/find /path/to/downloads -name $(echo %u | cut -c 7-) -exec ln -s \{\} %o \; -quit')
  35. DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Download manually to \"$(pwd)\" or setup hib:// DLAGENT in /etc/makepkg.conf."; exit 1')
  36.  
  37.  
  38. package() {
  39.   mkdir -p "${pkgdir}/opt/${pkgname}/"
  40.   mv "${srcdir}/FTL/"* "${pkgdir}/opt/${pkgname}/"
  41.  
  42.   chmod 0644 "${pkgdir}/opt/${pkgname}/data/resources/"{data.dat,resource.dat}
  43.  
  44.  
  45.   if [ "$CARCH" = "x86_64" ]; then
  46.  
  47.     rm -r "${pkgdir}/opt/${pkgname}/data/x86/"
  48.     chmod 0755 "${pkgdir}/opt/${pkgname}/data/amd64/lib/"{libbass.so,libbassmix.so}
  49.     for i in "${_purgelibs[@]}"; do
  50.       rm "${pkgdir}/opt/${pkgname}/data/amd64/lib/${i}"
  51.     done
  52.  
  53.   else
  54.  
  55.     rm -r "${pkgdir}/opt/${pkgname}/data/amd64/"
  56.     chmod 0755 "${pkgdir}/opt/${pkgname}/data/x86/lib/"{libbass.so,libbassmix.so}
  57.     for i in "${_purgelibs[@]}"; do
  58.       rm "${pkgdir}/opt/${pkgname}/data/x86/lib/${i}"
  59.     done
  60.  
  61.   fi
  62.  
  63. # fix for the included startup script
  64.  
  65.   sed -i -e 's|command="$(basename "$0")"|command="FTL"|' -e '6icd "$here"' "${pkgdir}/opt/${pkgname}/data/FTL"
  66.  
  67. # the spec only specifies png, svg and xpm..
  68.  
  69.   convert "${pkgdir}/opt/${pkgname}/data/exe_icon.bmp" "${pkgdir}/opt/${pkgname}/${pkgname}.png"
  70.  
  71. # huge amounts of errors in the console when we remove this ..
  72.   # rm "${pkgdir}/opt/${pkgname}/data/exe_icon.bmp"
  73.  
  74.   install -Dm644 "${pkgdir}/opt/${pkgname}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
  75.   install -Dm644 "${srcdir}/$pkgname.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  76.  
  77.   mkdir -p "${pkgdir}/usr/share/licenses/"
  78.   ln -s "/opt/${pkgname}/data/licenses/" "${pkgdir}/usr/share/licenses/${pkgname}"
  79.  
  80.   mkdir -p  "${pkgdir}/usr/bin/"
  81.   ln -s "/opt/${pkgname}/data/FTL" "${pkgdir}/usr/bin/${pkgname}"
  82. }
RAW Paste Data