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

Untitled

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