# $Id: PKGBUILD 65598 2012-02-21 09:25:05Z spupykin $
# Contributor: Derek 'tetonedge' Tucker <derek at tetonedge.net>

pkgname=ibamtray
pkgver=0.02
pkgrel=5
pkgdesc="system tray ibam frontend based off vubat with libnotify support"
arch=('any')
url="http://www.tetonedge.net/?page_id=223"
license=('GPL3')
depends=('ibam' 'python2' 'pygtk' 'pygobject' 'python-notify' 'notification-daemon' 'librsvg')
source=(http://www.tetonedge.net/code/ibamtray/$pkgname-$pkgver.tar.gz)
md5sums=('7e9195b410eb5912f23bd0a96da84022')

build() {
  cd $srcdir/$pkgname-$pkgver

  # python2 fix
  for file in $(find . -name '*.py' -print); do
    sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done

  python2 setup.py build
  python2 setup.py install --prefix=$pkgdir/usr
}
