Advertisement
jamesan

Chrome Remote Desktop AUR PKGBUILD

Aug 16th, 2014
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.86 KB | None | 0 0
  1. # Maintainer: Mateus Rodrigues Costa <charles [dot] costar [at] gmail [dot] com>
  2. # Contributor: James An <james@jamesan.ca>
  3.  
  4. pkgname=chrome-remote-desktop
  5. pkgver=37.0.2062.28
  6. pkgrel=1
  7. pkgdesc="Allows you to securely access your computer over the Internet through Chrome."
  8. url="https://chrome.google.com/webstore/detail/gbchcmhmhahfdphkhkmpfmihenigjmpp"
  9. arch=('i686' 'x86_64')
  10. license=('BSD')
  11. install=$pkgname.install
  12. depends=('python2' 'python2-psutil' 'gconf' 'gtk2' 'nss'
  13.          'xorg-xdpyinfo' 'xorg-setxkbmap' 'xorg-server-xvfb' 'xorg-xauth')
  14. _arch=i386
  15. [ "$CARCH" == x86_64 ] && _arch=amd64
  16. source=("chrome-remote-desktop.service"
  17.         https://dl.google.com/linux/direct/${pkgname}_current_$_arch.deb)
  18. md5sums=('99293bd84b654b28309e7e4362d0bc3d'
  19.          'SKIP')
  20.  
  21. pkgver() {
  22.   bsdtar -xf control.tar.gz -O control | grep '^Version: ' | cut -f2 -d' '
  23. }
  24.  
  25. package() {
  26.   msg2 "Extracting data.tar.gz"
  27.   bsdtar -xf data.tar.gz -C "$pkgdir/"
  28.  
  29.   msg2 "Patching Python script"
  30.   sed -e '1 s/python/python2/' \
  31.       -e '/^.*sudo_command =/ s/"gksudo .*"/"pkexec"/' \
  32.       -e '/^.*command =/ s/s -- sh -c/s sh -c/' \
  33.       -i "$pkgdir"/opt/google/chrome-remote-desktop/chrome-remote-desktop
  34.  
  35.   msg2 "Removing things that won't work"
  36.   rm -R "$pkgdir"/etc/cron.daily/
  37.   rm -R "$pkgdir"/etc/init.d/
  38.   rm -R "$pkgdir"/etc/pam.d/
  39.  
  40.   msg2 "They forgot the LICENSE file, using the copyright file instead"
  41.   install -Dm644 "$pkgdir"/usr/share/doc/$pkgname/copyright "$pkgdir"/usr/share/licenses/$pkgname/copyright
  42.  
  43.   msg2 "Adding a systemd user service"
  44.   install -Dm644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/user/$pkgname.service
  45.  
  46.   msg2 "Creating symlinks for chromium compatibility"
  47.   mkdir -p "$pkgdir"/etc/chromium/native-messaging-hosts
  48.   ln -sr "$pkgdir"/etc/opt/chrome/native-messaging-hosts/* "$pkgdir"/etc/chromium/native-messaging-hosts
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement