Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

AURSpiderOakExecFix

By: tpavlic on Sep 27th, 2011  |  syntax: Bash  |  size: 2.17 KB  |  hits: 73  |  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: Dan Serban
  2. # Contributors: nblock, sfabius, ddffnn, mond
  3.  
  4. pkgname=spideroak
  5. pkgver=4.x.xxxx.stable
  6. pkgrel=5
  7. pkgdesc="Secure, cross-platform, consolidated, free online backup, storage, access, sharing and sync tool (stable channel)"
  8. url=https://spideroak.com/
  9. arch=(i686 x86_64)
  10. depends=(openssl)
  11. optdepends=(dbus qt)
  12. conflicts=(spideroak-beta)
  13. license=(custom:freeware)
  14. options=(!strip)
  15. install=spideroak.install
  16. _filearch=i386 && _last_known_md5sum="44d0d6032aa38c0270ab45829200e31d"
  17. [ "${CARCH}" == "x86_64" ] && _filearch=x86_64 && _last_known_md5sum="b67c59c9d484d79baafd6998df9fcf85"
  18.  
  19. build()
  20. {
  21.   _file="${pkgname}_stable.deb"
  22.   wget -O "${_file}" "https://spideroak.com/directdownload?platform=ubuntumaverick&arch=${_filearch}"
  23.   _actual_md5sum=$(md5sum "${_file}" | cut -d" " -f1)
  24.   [ "${_actual_md5sum}" != "${_last_known_md5sum}" ] && echo && echo && echo "Please raise the out-of-date flag for this package: http://aur.archlinux.org/packages.php?ID=24401" && echo && echo
  25.   msg "Extracting ..."
  26.   bsdtar -xf "${_file}" data.tar.gz
  27.   bsdtar -xf data.tar.gz
  28.   msg2 "... completed."
  29.   rm data.tar.gz
  30.   cd "${srcdir}"/etc
  31.   rm -r apt
  32.   mkdir -p "${srcdir}"/usr/share/spideroak
  33.   cd "${srcdir}"/usr/lib
  34.   mv SpiderOak lib
  35.   mv lib "${srcdir}"/usr/share/spideroak/
  36.   cd "${srcdir}"/usr
  37.   rm -r bin lib
  38.   cd "${srcdir}"
  39.   mv etc usr "${pkgdir}"/
  40.   mkdir -p "${pkgdir}"/usr/bin
  41.   USRBINFILE="${pkgdir}"/usr/bin/SpiderOak
  42.   echo '#!/bin/bash' > "${USRBINFILE}"
  43.   echo 'export LD_LIBRARY_PATH="/usr/share/spideroak/lib:${LD_LIBRARY_PATH}"' >> "${USRBINFILE}"
  44.   echo 'exec /usr/share/spideroak/lib/SpiderOak "$@"' >> "${USRBINFILE}"
  45.   chmod +x "${USRBINFILE}"
  46.   DESKTOPFILE="${pkgdir}"/usr/share/applications/spideroak.desktop
  47.   echo "[Desktop Entry]" > "${DESKTOPFILE}"
  48.   echo "Name=SpiderOak" >> "${DESKTOPFILE}"
  49.   echo "Comment=SpiderOak Secure Backup and File Sharing Client" >> "${DESKTOPFILE}"
  50.   echo "Exec=SpiderOak" >> "${DESKTOPFILE}"
  51.   echo "Terminal=false" >> "${DESKTOPFILE}"
  52.   echo "Type=Application" >> "${DESKTOPFILE}"
  53.   echo "Icon=/usr/share/pixmaps/spideroak.png" >> "${DESKTOPFILE}"
  54.   echo "Categories=Network;" >> "${DESKTOPFILE}"
  55. }
  56.  
  57.  
  58.