Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD blocks-that-matter 1.0.0.8 (broken)

By: a guest on Nov 23rd, 2011  |  syntax: Bash  |  size: 3.52 KB  |  views: 97  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: ZDragon
  2.  
  3. pkgname=blocks-that-matter
  4. pkgver=1.0.0.8
  5. pkgrel=1
  6. pkgdesc="Platformer with puzzle elements that form a mix of Tetris and Minecraft."
  7. url="http://www.swingswingsubmarine.com/games/blocks-that-matter/"
  8. license=('custom: "commercial"')
  9. groups=('humblevoxatronbundle' 'humblebundles')
  10. arch=('i686' 'x86_64')
  11. depends=('java-runtime' 'bash')
  12. [ "${CARCH}" = "x86_64" ] && depends=("${depends[@]}" 'lib32-libxcursor' 'lib32-libxrandr')
  13. [ "${CARCH}" = "i686" ]   && depends=("${depends[@]}" 'libxcursor' 'libxrandr')
  14. [ "${CARCH}" = "x86_64" ] && optdepends=('lib32-alsa-lib: sound support' 'lib32-openal: sound support')
  15. [ "${CARCH}" = "i686" ]   && optdepends=('alsa-lib: sound support' 'openal: sound support')
  16. options=(!strip)
  17. PKGEXT='.pkg.tar'
  18. source=("${pkgname}.desktop" "btm-exec" "${pkgname}-icon.png")
  19. sha256sums=('b3f9934c39624d7ac31f7de8fa660f0f150d383339fa3cea269f33442c006439'
  20.         'a5245828006404ebb4f324727fa98deb149a84b076bd24bf5b1e49443bb9c2a5'
  21.         'd6f8b24e1545009c7598be0bb0b36c40123a14210f4654813c85fbccd174c0f2')
  22. [ "${CARCH}" = "x86_64" ] && ext="x64"
  23. [ "${CARCH}" = "i686" ]   && ext="x86"
  24. _gamepkg="blocks-matter_${pkgver}_${ext}.tar.gz"
  25.  
  26. build() {
  27.    cd "${srcdir}"
  28.    msg "You need a full copy of this game in order to install it"
  29.    msg "Searching for ${_gamepkg} in dir: $(readlink -f `pwd`/..)"
  30.    if [[ -f "../${_gamepkg}" ]]; then
  31.        msg "Found game package, installing..."
  32.        ln -fs "../${_gamepkg}" .
  33.    elif [ -n "${_humblevoxatronkey}" ]; then
  34.        msg "Game package not found, trying to download..."
  35.        rm -f index.html\?key\=${_humblevoxatronkey}*
  36.        wget http://www.humblebundle.com/?key=${_humblevoxatronkey}
  37.        wget $(cat index.html\?key\=${_humblevoxatronkey} | grep "${_gamepkg}" | cut -d "'" -f 10)
  38.        mv ${_gamepkg}* ${_gamepkg}
  39.    else
  40.        msg "Game package not found and download failed."
  41.        msg "You can add \'export _humblevoxatronkey\=\<Your key here\>\' to \.bashrc if you want automated download ability."
  42.        error "Please type absolute path to ${_gamepkg} (/home/joe):"
  43.        read pkgpath
  44.        if [[ -f "${pkgpath}/${_gamepkg}" ]]; then
  45.            msg "Found game package, installing..."
  46.            ln -fs "${pkgpath}/${_gamepkg}" .
  47.        else
  48.            error "Unable to find game package."
  49.            return 1
  50.        fi
  51.    fi
  52.    tar zxvf ${_gamepkg}
  53.    install -d "${pkgdir}/opt/${pkgname}"
  54.    cp -R "${srcdir}"/blocks-matter_${pkgver}_${ext}/* "${pkgdir}/opt/${pkgname}/"
  55.    #Use system-wide OpenAL library instead of the provided lib versions
  56.    rm "${pkgdir}/opt/${pkgname}/libopenal64.so"
  57.    rm "${pkgdir}/opt/${pkgname}/libopenal.so"
  58.    chmod +rx ${pkgdir}/opt/${pkgname}/*.sh
  59.    chmod +rx ${pkgdir}/opt/${pkgname}/*.so
  60.    chmod +rx ${pkgdir}/opt/${pkgname}/*.jar
  61.    chmod -R +rx "${pkgdir}/opt/${pkgname}/BTM_lib"
  62.    chmod -R +rx "${pkgdir}/opt/${pkgname}/lib"
  63.    chmod -R +rx "${pkgdir}/opt/${pkgname}/README"
  64.    chmod -R +rx "${pkgdir}/opt/${pkgname}/Community"
  65.    chmod -R +wrx "${pkgdir}/opt/${pkgname}/config"
  66.    chmod -R +wrx "${pkgdir}/opt/${pkgname}/Blocks That Matter Save"
  67. }
  68.  
  69. package(){
  70.   cd "${srcdir}"
  71.   # create Launcher
  72.   install -d "${pkgdir}/usr/bin/"
  73.   install -D -m755 "${srcdir}/btm-exec" "${pkgdir}/usr/bin/${pkgname}"
  74.   # Install Desktop File and Icon
  75.   install -D -m644 "${srcdir}/${pkgname}.desktop" \
  76.         "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  77.   install -D -m644 "${srcdir}/${pkgname}-icon.png" \
  78.         "${pkgdir}/usr/share/icons/${pkgname}-icon.png"
  79. }
  80.  
  81.  
  82.  
clone this paste RAW Paste Data