# $Id: PKGBUILD 70943 2012-05-20 11:05:22Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinus.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Hugo Doria <hugo@archlinux.org>

pkgname=billreminder
pkgver=0.4.0
pkgrel=3
pkgdesc="Small and quick accounting application designed to allow for easy tracking of bills"
arch=('any')
url="http://billreminder.gnulinuxbrasil.org/"
license=('GPL3')
depends=('python-pysqlite' 'dbus-python' 'setuptools' 'desktop-file-utils' 'pygtk' 'pyxdg'
         'xdg-utils' 'python2-gconf' 'python2-sqlalchemy' 'hicolor-icon-theme')
makedepends=('intltool')
install=$pkgname.install
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2)
sha256sums=('6a89584a1c90f661a7954a0c5c8bd392b8e2712d6cfd759fb6e588548ac8ff4e')

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

  # python2 fix
  for file in billreminder.in billreminderd.in; do
    sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
  done

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --with-gconf-schema-file-dir=/usr/share/gconf/schemas

  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}

  make DESTDIR=${pkgdir} install
}
