diff options
author | Ye Jingchen | 2019-06-20 17:28:02 +0800 |
---|---|---|
committer | Ye Jingchen | 2019-06-20 17:28:02 +0800 |
commit | e38d21da0abd84146fc9f6f6d1e971f10dc47359 (patch) | |
tree | fbae1b163323f8c1f7e330cc4888a6bdbd3f9630 /PKGBUILD | |
download | aur-python-pynat.tar.gz |
v0.6.1, initial submission
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8fc4fa916a53 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: caiye <ye dot jingchen at gmail dot com> +pkgbase=python-pynat +pkgname=(python-pynat python2-pynat) +_module='pynat' +pkgver=0.6.1 +pkgrel=1 +pkgdesc="Discover external IP addresses and NAT topologies using STUN." +url="https://github.com/arantonitis/pynat" +depends=() +makedepends=('python-setuptools' 'python2-setuptools') +license=('MIT') +arch=('any') +source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz") +sha256sums=('db107c85f7c8c5368e93dbf1dff21f88cabbd30f288a0c07c699bf3cb6319e67') + +prepare() { + cp -a "${srcdir}/${_module}-${pkgver}"{,-python2} +} + +build() { + cd "${srcdir}/${_module}-${pkgver}" + python setup.py build + + cd "${srcdir}/${_module}-${pkgver}-python2" + python2 setup.py build +} + +package_python-pynat() { + depends+=('python') + cd "${srcdir}/${_module}-${pkgver}" + python setup.py install --root="${pkgdir}" --optimize=1 --skip-build +} + +package_python2-pynat() { + depends+=('python2') + cd "${srcdir}/${_module}-${pkgver}-python2" + python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build +} |