updated on Thu Jan 26 12:02:26 UTC 2012
[aur-mirror.git] / google-chrome-dev / PKGBUILD
blob1edd98467542209c177bab8e5580e84415024671
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
6 pkgname=google-chrome-dev
7 pkgver=18.0.1017.2   # Check for new Linux releases in: http://googlechromereleases.blogspot.com/search/label/Dev%20updates
8 pkgrel=1
9 pkgdesc="An attempt at creating a safer, faster, and more stable browser (Dev 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' 'xdg-utils')
14 optdepends=('gecko-mediaplayer' 'kdebase-kdialog')
15 provides=("google-chrome=$pkgver")
16 conflicts=('google-chrome')
17 install=${pkgname}.install
18 _channel='unstable'
19 _verbld=18.0.1017.2-118867
21 if [ "$CARCH" = "i686" ]; then
22     _arch='i386'
23     md5sums=('f6c52b568a6facd8f5a4db292d750792')
24 elif [ "$CARCH" = "x86_64" ]; then
25     _arch='x86_64'
26     optdepends+=('flashplugin')
27     md5sums=('8ee075fcce164b21ed24d2315502058a')
31 source=("http://dl.google.com/linux/chrome/rpm/stable/${_arch}/google-chrome-${_channel}-${_verbld}.${_arch}.rpm")
34 package() {
35     msg "Preparing install"
36     install -d "$pkgdir"/{opt,usr/{bin,share/applications}}
37     mv -v opt/google "$pkgdir"/opt
38     msg2 "Done preparing!"
40     msg "Actual installation"
41     ln -sv /opt/google/chrome/google-chrome "$pkgdir/usr/bin/"
42     ln -sv /usr/lib/mozilla/plugins "$pkgdir/opt/google/chrome"
43     mv -v "$pkgdir/opt/google/chrome/google-chrome.desktop" "$pkgdir/usr/share/applications"
45     # Adding man page
46     if [ ! -e "$srcdir/usr/share/man/man1/google-chrome.1.gz" ]; then
47       gzip -9 "$srcdir/usr/share/man/man1/google-chrome.1"
48     fi
49     install -Dm644 "$srcdir/usr/share/man/man1/google-chrome.1.gz" "$pkgdir/usr/share/man/man1/google-chrome.1.gz"
51     mkdir "$pkgdir/opt/google/chrome/lib"
52     cd "$pkgdir/opt/google/chrome/lib"
53     ln -sv /usr/lib/libnspr4.so libnspr4.so.0d
54     ln -sv /usr/lib/libnss3.so libnss3.so.1d
55     ln -sv /usr/lib/libnssutil3.so libnssutil3.so.1d
56     ln -sv /usr/lib/libplc4.so libplc4.so.0d
57     ln -sv /usr/lib/libplds4.so libplds4.so.0d
58     ln -sv /usr/lib/libsmime3.so libsmime3.so.1d
59     ln -sv /usr/lib/libssl3.so libssl3.so.1d
61     # Symlinking icons to /usr/share/icons/hicolor/
62     for png in "$pkgdir/opt/google/chrome/product_logo_"*.png; do
63       pngsize="${png##*/product_logo_}"
64       mkdir -p "$pkgdir/usr/share/icons/hicolor/"${pngsize%.png}x${pngsize%.png}/apps
65       (cd "$pkgdir/usr/share/icons/hicolor/${pngsize%.png}x${pngsize%.png}/apps/"; ln -s ../../../../../../opt/google/chrome/product_logo_${pngsize} google-chrome.png)
66     done
68     # Fixing permissions of chrome-sandbox
69     chmod 4755 "$pkgdir/opt/google/chrome/chrome-sandbox"
71     msg2 "Installation finished!"