summaryrefslogtreecommitdiff
path: root/libre/python-django-countries/PKGBUILD
blob: 93e7c8a311dc6e106c39b5c77056e95bbebe9368 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

_pkgname=django-countries
pkgname=(python-$_pkgname python2-$_pkgname)
pkgver=2.1.2
pkgdesc="Provides a country field for Django models"
url="http://bitbucket.org/smileychris/$_pkgname/"
license=('custom:MIT')

conflicts=($_pkgname)

pkgrel=3
arch=(any)
makedepends=(python{,2}-{django,setuptools})
source=(http://pypi.python.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz)
md5sums=('15e19fd70be1e8939f1bffcfe008e878')

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

  cd "$srcdir/$_pkgname-$pkgver"
  LC_ALL=en_US.UTF-8 python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

package_python2-django-countries() {
  depends=('python2-django')
  replaces=($_pkgname)

  cd "$srcdir/$_pkgname-$pkgver"
  python2 setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}