Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 19th, 2013  |  syntax: None  |  size: 3.34 KB  |  views: 103  |  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.  
  2. # Maintainer: Zachary A. Jones <JazzplayerL9@gmail.com>
  3.  
  4. pkgname=voxatron
  5. pkgver=0.2.5
  6. pkgrel=1
  7. pkgdesc="Voxatron is an action/adventure game set in a world completely made of tiny cubes that can be blasted to smithereens"
  8. url="http://www.lexaloffle.com/voxatron.php"
  9. license=('custom: "commercial"')
  10. groups=('humblevoxatronbundle' 'games')
  11. arch=('i686' 'x86_64')
  12. case $CARCH in
  13.     i686)
  14.         depends=('libgl' 'sdl')
  15.         optdepends=('alsa-lib: sound support' 'libpulse: sound support')
  16.     ;;
  17.     x86_64)
  18.         depends=('lib32-libgl' 'lib32-sdl')
  19.         optdepends=('lib32-alsa-lib: sound support' 'lib32-libpulse: sound suport')
  20.     ;;
  21. esac
  22. makedepends=('curl')
  23. options=(!strip)
  24.  
  25. _gamepkg="${pkgname}_${pkgver}_i386.tar.gz"
  26. source=("${_gamepkg}::https://www.humblebundle.com/login"
  27.         "${_gamepkg}::http://www.humblebundle.com/downloads?key=${_humblevoxatronkey}"
  28.         "$pkgname.desktop"
  29.         "vox-exec")
  30.  
  31. _char=\'
  32. DLAGENTS=('https::/bin/echo %o > /tmp/arch && sed -i "s/.part//" /tmp/arch && /usr/bin/curl -s --cookie-jar /tmp/cjar --output /dev/null %u && cp /tmp/cjar ./ && /usr/bin/curl -sL --cookie /tmp/cjar --cookie-jar /tmp/cjar --data "username=$_humbleemail" --data "password=$_humblepassword" %u | grep -f /tmp/arch |grep -o -E "data-web=[^ ]+"| sed -e "s/data-web=\([^ ]*\)/\1/" > /tmp/url && sed -i "s/$_char//g" /tmp/url && /usr/bin/curl --cookie /tmp/cjar --cookie-jar /tmp/cjar -fLC -  --retry 3 --retry-delay 3 -o %o "$(</tmp/url)" && rm -f /tmp/{arch,url} || return 0'
  33.           "http::/usr/bin/curl -sL %u | grep voxatron_${pkgver}_ | sed \"s/.*data-web='/url=/\" | sed \"s/' data-bt.*//\" | grep .tar.gz > /tmp/url && /usr/bin/curl -fLC -  --retry 3 --retry-delay 3 -o %o -K /tmp/url && rm /tmp/url")
  34.  
  35. #curl reference for update use:
  36. #curl -sL http://www.humblebundle.com/downloads?key=${_humblevoxatronkey} | grep voxatron_${pkgver}_ | sed -e \"s/.*data-web='/url=/\" | sed -e \"s/' data-bt.*//\" | grep .tar.gz > weblinks.txt
  37.  
  38. if [[ ! -f $SRCDEST/${source[0]%%:*} ]]; then
  39.     if [[ -z $_humbleemail || -z $_humblepassword ]]; then
  40.         if [[ -z $_humblevoxatronkey ]]; then
  41.             msg "if you have bound your email and password to your account, "
  42.             msg "please export the values _humbleemail and _humblepassword so"
  43.             msg "that you can be logged in to download the game."
  44.             echo
  45.             msg "if you have not bound the key to an email, "
  46.             msg "please export _humblevoxatronkey in your .bashrc"
  47.             return 1
  48.         fi
  49.     fi
  50. fi
  51.  
  52. package(){
  53.   cd "${srcdir}"
  54.   mkdir -p "${pkgdir}/opt/${pkgname}"
  55.   mv -T "${srcdir}/${pkgname}" "${pkgdir}/opt/${pkgname}"
  56.  
  57.   # create Launcher
  58.   install -d "${pkgdir}/usr/bin/"
  59.   install -D -m755 "${srcdir}/vox-exec" "${pkgdir}/usr/bin/${pkgname}"
  60.   # Install Desktop File and Icon
  61.   install -D -m644 "${srcdir}/${pkgname}.desktop" \
  62.         "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  63.   install -D -m644 "${pkgdir}/opt/${pkgname}/lexaloffle-vox.png" \
  64.                 "${pkgdir}/usr/share/icons/${pkgname}-icon.png"
  65.   # Install license
  66.   install -Dm 644 "${pkgdir}"/opt/${pkgname}/license.txt "${pkgdir}"/usr/share/licenses/${pkgname}/license
  67. }
  68. md5sums=('898db01f16e0420db8239a84252a869b'
  69.          '898db01f16e0420db8239a84252a869b'
  70.          '184c021b52d3a9c8ac5f49435b4b93e0'
  71.          'bb84f6fcd7cdb18eb417173a6f58e00e')