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

PKGBUILD

By: a guest on Aug 9th, 2012  |  syntax: Bash  |  size: 2.61 KB  |  views: 115  |  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: t3ddy  <t3ddy1988 "at" gmail {dot} com>
  2. # Contributor: Lex Rivera aka x-demon <aur@x-demon.org>
  3. # Contributor: Det <nimetonmaili at gmail a-dot com>
  4. # Contributor: ruario
  5. # Contributor: riccieri <renato "dot" riccieri "at" gmail "dot" com>
  6.  
  7. pkgname=google-chrome-dev
  8. pkgver=22.0.1229.2   # Check for new Linux releases in: http://googlechromereleases.blogspot.com/search/label/Dev%20updates
  9. pkgrel=1
  10. pkgdesc="An attempt at creating a safer, faster, and more stable browser (Dev Channel)"
  11. arch=('i686' 'x86_64')
  12. url="http://www.google.com/chrome"
  13. license=('custom:chrome')
  14. depends=('alsa-lib' 'gconf' 'gtk2' 'hicolor-icon-theme' 'libpng' 'libxslt' 'libxss' 'nss' 'ttf-dejavu' 'xdg-utils')
  15. optdepends=('kdebase-kdialog: needed for file dialogs in KDE' 'openssl098: needed for built-in flash-plugin to work')
  16. provides=("google-chrome=$pkgver")
  17. conflicts=('google-chrome')
  18. install=${pkgname}.install
  19. _channel='unstable'
  20. _verbld=22.0.1229.2-150678
  21.  
  22. if [ "$CARCH" = "i686" ]; then
  23.     _arch='i386'
  24.     md5sums=('0f41636988b0b88b29b31c99d84c4cc4')
  25. elif [ "$CARCH" = "x86_64" ]; then
  26.     _arch='x86_64'
  27.     md5sums=('0efbc80807e7e99f128cf871ec5b9ff1')
  28. fi
  29.  
  30.  
  31. source=("http://dl.google.com/linux/chrome/rpm/stable/${_arch}/google-chrome-${_channel}-${_verbld}.${_arch}.rpm")
  32.  
  33.  
  34. package() {
  35.     msg "Preparing install"
  36.     install -d "$pkgdir"/{opt,usr/{bin,share/applications}}
  37.     mv opt/google "$pkgdir"/opt
  38.     msg2 "Done preparing!"
  39.  
  40.     msg "Actual installation"
  41.     ln -s /opt/google/chrome/google-chrome "$pkgdir/usr/bin/"
  42.     mv "$pkgdir/opt/google/chrome/google-chrome.desktop" "$pkgdir/usr/share/applications"
  43.    
  44.     # Remove 64-bit executable from 32-bit installation
  45.     if [ "$CARCH" = "i686" ]; then
  46.         rm -f "$pkgdir/opt/google/chrome/nacl_irt_x86_64.nexe"
  47.     fi
  48.    
  49.     # Udev workaround
  50.     ln -s /usr/lib/libudev.so.1 "$pkgdir/opt/google/chrome/libudev.so.0"
  51.  
  52.     # Adding man page
  53.     if [ ! -e "$srcdir/usr/share/man/man1/google-chrome.1.gz" ]; then
  54.       gzip -9 "$srcdir/usr/share/man/man1/google-chrome.1"
  55.     fi
  56.     install -Dm644 "$srcdir/usr/share/man/man1/google-chrome.1.gz" "$pkgdir/usr/share/man/man1/google-chrome.1.gz"
  57.  
  58.     # Symlinking icons to /usr/share/icons/hicolor/
  59.     for i in 16x16 22x22 24x24 32x32 48x48 64x64 128x128 256x256; do
  60.       mkdir -p "$pkgdir/usr/share/icons/hicolor/$i/apps/"
  61.       ln -s /opt/google/chrome/product_logo_${i/x*}.png "$pkgdir/usr/share/icons/hicolor/$i/apps/google-chrome.png"
  62.     done
  63.  
  64.     # Fixing permissions of chrome-sandbox
  65.     chmod 4755 "$pkgdir/opt/google/chrome/chrome-sandbox"
  66.  
  67.     msg2 "Installation finished!"
  68. }
clone this paste RAW Paste Data