Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Mar 7th, 2012  |  syntax: None  |  size: 2.74 KB  |  hits: 45  |  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.  
  6. pkgname=google-chrome
  7. pkgver=current   # Check for new Linux releases in: http://googlechromereleases.blogspot.com/search/label/Stable%20updates
  8. pkgrel=1
  9. pkgdesc="An attempt at creating a safer, faster, and more stable browser (Stable Channel)"
  10. arch=('i686' 'x86_64')
  11. url="http://www.google.com/chrome"
  12. license=('custom:chrome')
  13. depends=('alsa-lib' 'gconf' 'gtk2' 'hicolor-icon-theme' 'libpng12' 'libxslt' 'libxss' 'nss' 'openssl-compatibility' 'xdg-utils')
  14. optdepends=('gecko-mediaplayer' 'kdebase-kdialog: needed for file dialogs in KDE')
  15. provides=("google-chrome=$pkgver")
  16. conflicts=('google-chrome')
  17. install=${pkgname}.install
  18. _channel='stable'
  19. _verbld=current
  20.  
  21. if [ "$CARCH" = "i686" ]; then
  22.     _arch='i386'
  23.     md5sums=('28d798109ad9d2e0b5eddedd17996132')
  24. elif [ "$CARCH" = "x86_64" ]; then
  25.     _arch='x86_64'
  26.     optdepends+=('flashplugin')
  27.     md5sums=('388db19d984d7cfabac98ec2364b6d42')
  28. fi
  29.  
  30.  
  31. source=("https://dl.google.com/linux/direct/google-chrome-${_channel}_current_${_arch}.rpm")
  32.  
  33. package() {
  34.     msg "Preparing install"
  35.     install -d "$pkgdir"/{opt,usr/{bin,share/applications}}
  36.     mv -v opt/google "$pkgdir"/opt
  37.     msg2 "Done preparing!"
  38.  
  39.     msg "Actual installation"
  40.     ln -sv /opt/google/chrome/google-chrome "$pkgdir/usr/bin/"
  41.     ln -sv /usr/lib/mozilla/plugins "$pkgdir/opt/google/chrome"
  42.     mv -v "$pkgdir/opt/google/chrome/google-chrome.desktop" "$pkgdir/usr/share/applications"
  43.  
  44.     # Adding man page
  45.     if [ ! -e "$srcdir/usr/share/man/man1/google-chrome.1.gz" ]; then
  46.       gzip -9 "$srcdir/usr/share/man/man1/google-chrome.1"
  47.     fi
  48.     install -Dm644 "$srcdir/usr/share/man/man1/google-chrome.1.gz" "$pkgdir/usr/share/man/man1/google-chrome.1.gz"
  49.  
  50.     mkdir "$pkgdir/opt/google/chrome/lib"
  51.     cd "$pkgdir/opt/google/chrome/lib"
  52.     ln -svf /usr/lib/libnspr4.so libnspr4.so.0d
  53.     ln -svf /usr/lib/libnss3.so libnss3.so.1d
  54.     ln -svf /usr/lib/libnssutil3.so libnssutil3.so.1d
  55.     ln -svf /usr/lib/libplc4.so libplc4.so.0d
  56.     ln -svf /usr/lib/libplds4.so libplds4.so.0d
  57.     ln -svf /usr/lib/libsmime3.so libsmime3.so.1d
  58.     ln -svf /usr/lib/libssl3.so libssl3.so.1d
  59.  
  60.     # Symlinking icons to /usr/share/icons/hicolor/
  61.     for i in 16x16 22x22 24x24 32x32 48x48 64x64 128x128 256x256; do
  62.       mkdir -p "$pkgdir/usr/share/icons/hicolor/$i/apps/"
  63.       ln -s /opt/google/chrome/product_logo_${i/x*}.png "$pkgdir/usr/share/icons/hicolor/$i/apps/google-chrome.png"
  64.     done
  65.  
  66.     # Fixing permissions of chrome-sandbox
  67.     chmod 4755 "$pkgdir/opt/google/chrome/chrome-sandbox"
  68.  
  69.     msg2 "Installation finished!"
  70. }