summaryrefslogtreecommitdiff
path: root/pcr/python-py3dns/PKGBUILD
blob: d2692d47d66bd1d6ec8a3ab3e8346e3f676fce19 (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
34
35
36
37
38
39
40
41
# Maintainer: Luke Shumaker <lukeshu@parabola.nu>
# Maintainer (AUR:python-pydns): Sebastien Leduc <sebastien@sleduc.fr>
# Contributor (AUR:python-pydns): Samed Beyribey <ras0ir AT eventualis DOT org>

pkgname=python-py3dns
_pkgname=py3dns
pkgver=3.2.1
pkgrel=1
pkgdesc="A module for looking up DNS entries in Python applications"
arch=('any')
url="https://launchpad.net/py3dns"
license=('custom:PSF')

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

source=("https://launchpad.net/${_pkgname}/trunk/${pkgver}/+download/${_pkgname}-${pkgver}.tar.gz"{,.asc})
md5sums=('35a441081a1acfa0cf78e7ccc2ff9449'
         'SKIP')
validpgpkeys=('E7729BFFBE85400FEEEE23B178D7DEFB9AD59AF1') # Donald Scott Kitterman


_version_constraint() # (dep_pkgname)
{
  local dep_pkgname=$1
  local version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1)
  version=${version%-*}
  local version_inc=${version%.*}.$(( ${version##*.} + 1 ))

  echo -n "${dep_pkgname}>=${version}" "${dep_pkgname}<${version_inc}"
}


package() {
  depends+=( $(_version_constraint 'python') )

  cd "$srcdir"/$_pkgname-$pkgver

  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}