summaryrefslogtreecommitdiff
path: root/libre/python-django-countries/PKGBUILD
blob: 8bf7cd5ed48f8de4d18396cc135f75a189b4866f (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=3.3
pkgdesc="Provides a country field for Django models"
url="https://github.com/SmileyChris/django-countries"
license=('custom:MIT')

conflicts=($_pkgname)

pkgrel=4
arch=(any)
makedepends=(python{,2}-{django,setuptools})
source=(https://files.pythonhosted.org/packages/a4/86/7948d078aa5220479c89480b83dfca449d627cdefcf1d70adcfbe9a21dc0/django-countries-3.3.tar.gz)
sha256sums=('11827070ebcf201d22ea531aa90e18146ca89580bd1897a132eb8afbc6b35b7d')

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
}