updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / gmail-notify / PKGBUILD
blob1480507cc13a2494e5ed822fe2f4112c5fbbb8f4
1 # Maintainer: Gadget3000 <gadget3000 at msn dot com>
2 # Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
4 pkgname=gmail-notify
5 pkgver=1.6.1.1
6 pkgrel=1
7 pkgdesc="A Linux alternative for the notifier program released by Google"
8 arch=('i686' 'x86_64')
9 url="http://gmail-notify.sourceforge.net"
10 license=('GPL')
11 depends=('python2' 'gtk2' 'pygtk' 'libpng12')
12 install=gmail-notify.install
13 source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz gmail-notify.patch
14         pytrayicon.so)
15 md5sums=('7d62330064b3cc70c674cb721f36975a'
16          '1d4d0c39af6f63febc16cac95f0f937e'
17          '003fd6111aa2c4924308f79c10ae0f09')
19 build() {
20   cd $srcdir/$pkgname
22   patch < ../gmail-notify.patch
24   mkdir -p $pkgdir/{etc,usr/{bin,share/gmail-notify}} 
25   cp -R *  $pkgdir/usr/share/gmail-notify/
27   mv $pkgdir/usr/share/gmail-notify/notifier.conf.sample \
28         $pkgdir/etc/
30   ln -s ../share/$pkgname/notifier.py $pkgdir/usr/bin/gmail-notify
32   for i in $(find $pkgdir | grep "\.py"); do
33                 sed "s/\#\!\/usr\/bin\/python/\#\!\/usr\/bin\/python2/" -i $i
34                 sed "s/\#\!\/usr\/bin\/env python/\#\!\/usr\/bin\/env python2/g" -i $i
35   done
37   if [ "$CARCH" = "x86_64" ]; then
38         cp -f $srcdir/pytrayicon.so $pkgdir/usr/share/gmail-notify/
39   fi
41   mv $pkgdir/etc/notifier.conf.sample $pkgdir/usr/share/gmail-notify/
42   rm -r $pkgdir/etc