Guest User

archlinux-google-talk-pkgbuild

a guest
Sep 22nd, 2011
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.68 KB | None | 0 0
  1. # Maintainer: Dominik Mayer <dominik.mayer@gmail.com>
  2. # Contributer: Techlive Zheng <techlivezheng at gmail dot com>
  3.  
  4. pkgname=google-talkplugin
  5. pkgver=2.3.2.0
  6. pkgrel=1
  7. pkgdesc="Video chat browser plug-in for Google Talk"
  8. arch=('i686' 'x86_64')
  9. url="http://www.google.com/chat/video"
  10. license=('unknown')
  11.  
  12. if [ "${CARCH}" = 'x86_64' ]; then
  13.     ARCH='amd64'
  14.     depends=('alsa-utils' 'glibc>=2.4' 'fontconfig>=2.4.0' 'freetype2>=2.3.5' 'libgl' 'glew>=1.5.0' 'glib2>=2.12.0' 'gtk2>=2.12.0' 'libstdc++5' 'libpng12>=1.2.13' 'lib32-gcc-libs>=4.1.1' 'lib32-libx11' 'lib32-libxt' 'lib32-libxfixes' 'lib32-openssl' 'lib32-zlib' 'lib32-alsa-lib' 'lib32-libstdc++5' 'lib32-glibc>=2.3.4' 'lib32-gtk2' 'lib32-gdk-pixbuf2')
  15.     optdepends=('libnotify' 'pulseaudio' 'lib32-libpulse')
  16.     md5sums=('a84e7295e25b5344031747e2a6b38cd0')
  17. else
  18.     ARCH='i386'
  19.     depends=('alsa-utils' 'glibc>=2.4' 'fontconfig>=2.4.0' 'freetype2>=2.3.5' 'libgl' 'glew>=1.5.0' 'glib2>=2.12.0' 'gtk2>=2.12.0' 'libstdc++5' 'libpng12>=1.2.13' 'gcc-libs>=4.1.1' 'libx11' 'libxt' 'libxfixes' 'openssl-compatibility')
  20.     optdepends=('libnotify' 'pulseaudio')
  21.     md5sums=('c6d5d8f881960483f6cb9a84d955a8e9')
  22. fi
  23.  
  24. source=(http://dl.google.com/linux/direct/google-talkplugin_current_$ARCH.deb)
  25.  
  26. build() {
  27.     #Get binary sources.
  28.     ar -xv google-talkplugin_current_$ARCH.deb || return 1
  29.     tar -xvf data.tar.gz || return 1
  30.  
  31.     #This crontab script is for debian only,remove it.
  32.     rm -r $srcdir/etc
  33.     rm -r $srcdir/opt/google/talkplugin/cron
  34.  
  35.     #Change install path in all files.
  36.     cd $srcdir/opt/google/talkplugin
  37.     find . -type f | xargs sed -i 's:/google/talkplugin:/google-talkplugin:g' || return 1
  38.  
  39.     #Add changelog file.
  40.     cd $srcdir/usr/share/doc/google-talkplugin
  41.     gzip -dvf changelog.Debian.gz
  42.     mv changelog.Debian changelog
  43. }
  44. package() {
  45.     #Install files.
  46.     cd $srcdir/opt/google/talkplugin
  47.     find . -type d -exec install -d {,${pkgdir}/opt/google-talkplugin/}{} \; || return 1
  48.     find . -type f -exec install -D -m 644 {,${pkgdir}/opt/google-talkplugin/}{} \; || return 1
  49.  
  50.     #Make google-talkplugin executable.
  51.     chmod 755 ${pkgdir}/opt/google-talkplugin/GoogleTalkPlugin
  52.  
  53.     #Link all libraries into right location.
  54.     folders=`cd $srcdir;find usr/lib -type d -name plugins -print | sed 's:\./::'`
  55.     for folder in $folders; do
  56.         mkdir -p $pkgdir/$folder
  57.         ln -s /opt/google-talkplugin/libnpgoogletalk.so $pkgdir/$folder/libnpgoogletalk.so
  58.         ln -s /opt/google-talkplugin/libnpgtpo3dautoplugin.so $pkgdir/$folder/libnpgtpo3dautoplugin.so
  59.     done
  60.  
  61.     #Install changelog file.
  62.     install -D -m 644 {$srcdir,$pkgdir}/usr/share/doc/google-talkplugin/changelog
  63. }
Add Comment
Please, Sign In to add comment