public
Created

Fix the libudev of google chrome for good

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
# Maintainer: t3ddy <t3ddy1988 "at" gmail {dot} com>
# Contributor: Lex Rivera aka x-demon <aur@x-demon.org>
# Contributor: Det <nimetonmaili at gmail a-dot com>
# Contributor: ruario
 
pkgname=google-chrome-dev
pkgver=27.0.1423.0 # Check for new Linux releases in: http://googlechromereleases.blogspot.com/search/label/Dev%20updates
pkgrel=1
pkgdesc="An attempt at creating a safer, faster, and more stable browser (Dev Channel)"
arch=('i686' 'x86_64')
url="http://www.google.com/chrome"
license=('custom:chrome')
depends=('alsa-lib' 'gconf' 'gtk2' 'hicolor-icon-theme' 'libpng' 'libxslt' 'libxss' 'nss' 'ttf-dejavu' 'xdg-utils')
optdepends=('kdebase-kdialog: needed for file dialogs in KDE')
provides=("google-chrome=$pkgver")
conflicts=('google-chrome')
options=(!strip)
install=${pkgname}.install
_channel='unstable'
_verbld=27.0.1423.0-184590
 
if [ "$CARCH" = "i686" ]; then
_arch='i386'
_garch='x86'
md5sums=('771ee9531807f8d25d0ce4239a1e033d' '387e0ea47614c89550c64763af1f7473')
elif [ "$CARCH" = "x86_64" ]; then
_arch='x86_64'
_garch='amd64'
md5sums=('3671e36726ea39243bc0b115db8f66eb' '1052cd68556c8badc026fc244544d6cb')
 
fi
 
 
source=("http://dl.google.com/linux/chrome/rpm/stable/${_arch}/google-chrome-${_channel}-${_verbld}.${_arch}.rpm"
"http://distfiles.gentoo.org/distfiles/google-chrome-libudev-0.13.1-${_garch}.tar.xz"
)
 
 
package() {
msg "Preparing install"
install -d "$pkgdir"/{opt,usr/{bin,share/applications}}
mv opt/google "$pkgdir"/opt
msg2 "Done preparing!"
 
msg "Actual installation"
ln -s /opt/google/chrome/google-chrome "$pkgdir/usr/bin/"
mv "$pkgdir/opt/google/chrome/google-chrome.desktop" "$pkgdir/usr/share/applications"
# Remove 64-bit executable from 32-bit installation
if [ "$CARCH" = "i686" ]; then
rm -f "$pkgdir/opt/google/chrome/nacl_irt_x86_64.nexe"
rm -f "$pkgdir/opt/google/chrome/nacl_irt_srpc_x86_64.nexe"
fi
# Udev workaround
mv "$src/opt/google/chrome/lib/libudev*" "$pkgdir/opt/google/chrome/"
 
# Adding man page
if [ ! -e "$srcdir/usr/share/man/man1/google-chrome.1.gz" ]; then
gzip -9 "$srcdir/usr/share/man/man1/google-chrome.1"
fi
install -Dm644 "$srcdir/usr/share/man/man1/google-chrome.1.gz" "$pkgdir/usr/share/man/man1/google-chrome.1.gz"
 
# Symlinking icons to /usr/share/icons/hicolor/
for i in 16x16 22x22 24x24 32x32 48x48 64x64 128x128 256x256; do
mkdir -p "$pkgdir/usr/share/icons/hicolor/$i/apps/"
ln -s /opt/google/chrome/product_logo_${i/x*}.png "$pkgdir/usr/share/icons/hicolor/$i/apps/google-chrome.png"
done
 
# Fixing permissions of chrome-sandbox
chmod 4755 "$pkgdir/opt/google/chrome/chrome-sandbox"
 
msg2 "Installation finished!"
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.