# Maintainer: bill-auger <bill-auger@programmer.net>
# Maintainer (AUR): Simon Hanna <simon dot hanna AT serve-me DOT info>

pkgbase='django-gravatar'
pkgname=('python-django-gravatar' 'python2-django-gravatar')
pkgver=1.4.2
pkgrel=1
pkgdesc="Includes helper methods for interacting with gravatars outside of template code"
arch=(any)
url=https://github.com/twaddington/django-gravatar
license=('MIT')
options=(!emptydirs)

makedepends=('python-setuptools' 'python2-setuptools')

source=(https://github.com/twaddington/${pkgbase}/archive/${pkgver}.tar.gz)
sha256sums=('ee2a1e62ca894352a349c104997bc1d7452461ca4fc6d24e97cc5937315740e1')


package_python-django-gravatar()
{
  depends=('python-django')

  cd "${srcdir}/${pkgbase}-${pkgver}"

  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  python setup.py install --root="$pkgdir/" --optimize=1
}

package_python2-django-gravatar()
{
  depends=('python2-django')

  cd "${srcdir}/${pkgbase}-${pkgver}"

  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  python2 setup.py install --root="$pkgdir/" --optimize=1
}
