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

spideroak-beta PKGBUILD

By: a guest on May 5th, 2012  |  syntax: Bash  |  size: 2.42 KB  |  views: 33  |  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: Alessio Sergi <asergi at archlinux dot us>
  2.  
  3. pkgname=spideroak-beta
  4. _pkgname=spideroak
  5. pkgver=4.3.9936
  6. pkgrel=1
  7. pkgdesc="Secure file backup, sync and sharing client (beta channel)"
  8. arch=('i686' 'x86_64')
  9. url="https://spideroak.com/"
  10. license=('custom')
  11. provides=($_pkgname)
  12. conflicts=($_pkgname)
  13. options=('!strip')
  14. install=$pkgname.install
  15.  
  16. [[ "$CARCH" = 'i686' ]] && _arch='i386' || _arch='x86_64'
  17. source=("${pkgname}_${pkgver}_${_arch}.deb"::"https://$_pkgname.com/directdownload?platform=ubuntulucid&arch=$_arch&revision=${pkgver##4.3.}&code="
  18.         "terms.txt")
  19. sha1sums=('6e99f717405d55bc1a5b13919d104355fe1eb721'
  20.           'f287fdbad966ac9ae4951a1932e9be7e82112728')
  21. [[ "$CARCH" = 'i686' ]] && sha1sums[0]='9a1e9b1067582078a837c491250f95b53caca6c9'
  22.  
  23. package() {
  24.   cd "$srcdir"
  25.  
  26.   # unpack bundled files
  27.   tar zxf data.tar.gz
  28.  
  29.   # install config files
  30.   install -d -m 755 "$pkgdir"/etc/{dbus-1/system.d,sysctl.d}
  31.   install -m 644 etc/dbus-1/system.d/"$_pkgname".dbus.conf \
  32.     "$pkgdir/etc/dbus-1/system.d/$_pkgname.dbus.conf"
  33.   install -m 644 etc/sysctl.d/30-"$_pkgname".conf \
  34.     "$pkgdir/etc/sysctl.d/30-$_pkgname.conf"
  35.  
  36.   # clean up a bit
  37.   rm -f usr/lib/SpiderOak/lib{gcc_s,stdc++,z}.so.*
  38.   rm -f usr/lib/SpiderOak/*/*/*.exe
  39.  
  40.   # install app in /opt
  41.   install -d -m 755 "$pkgdir"/opt/SpiderOak
  42.   cp -r usr/lib/SpiderOak/* "$pkgdir"/opt/SpiderOak/
  43.  
  44.   # change /usr to /opt in start script file
  45.   sed -i 's:/usr/lib:/opt:g' usr/bin/SpiderOak
  46.  
  47.   # install start script file
  48.   install -d -m 755 "$pkgdir"/usr/bin
  49.   install -m 755 usr/bin/SpiderOak "$pkgdir"/usr/bin/SpiderOak
  50.  
  51.   # fix desktop file
  52.   sed -i \
  53.     -e "/Encoding=UTF-8/d" \
  54.     -e "/^Name=/s:Backup:Beta:" \
  55.     -e "/^Comment=/s:SpiderOak ::" \
  56.     -e "/^Categories=/s:SpiderOak;::" \
  57.     -e "/^Icon=/s:=.*$:=$_pkgname:" \
  58.     -e "/^Exec=/s:=.*$:=SpiderOak:" \
  59.     usr/share/applications/"$_pkgname".desktop
  60.  
  61.   # install desktop and pixmap files
  62.   install -d -m 755 "$pkgdir"/usr/share/{applications,pixmaps}
  63.   install -m 644 usr/share/applications/"$_pkgname".desktop \
  64.     "$pkgdir/usr/share/applications/$_pkgname.desktop"
  65.   install -m 644 usr/share/pixmaps/"$_pkgname".png \
  66.     "$pkgdir/usr/share/pixmaps/$_pkgname.png"
  67.  
  68.   # install custom license file
  69.   install -d -m 755 "$pkgdir/usr/share/licenses/$pkgname"
  70.   install -m 644 terms.txt "$pkgdir/usr/share/licenses/$pkgname/terms.txt"
  71. }
  72.  
  73. # vim:set ts=2 sw=2 et:
clone this paste RAW Paste Data