aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-snmp/APKBUILD
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-07 22:25:39 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-07 22:28:05 -0300
commit2fc3466e31d54b2f3ccf5a5afa392b05137a58e4 (patch)
tree4750210c9a75868d98479112c211d8ca1a633545 /community/py3-snmp/APKBUILD
parent05f37f5b110d7ba67051a0601a1891ad2b9765ac (diff)
downloadaports-2fc3466e31d54b2f3ccf5a5afa392b05137a58e4.tar.bz2
aports-2fc3466e31d54b2f3ccf5a5afa392b05137a58e4.tar.xz
community/py3-snmp: rename from py-snmp
Diffstat (limited to 'community/py3-snmp/APKBUILD')
-rw-r--r--community/py3-snmp/APKBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/community/py3-snmp/APKBUILD b/community/py3-snmp/APKBUILD
new file mode 100644
index 0000000000..be171e0740
--- /dev/null
+++ b/community/py3-snmp/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-snmp
+_pkgname=pysnmp
+pkgver=4.4.11
+pkgrel=0
+pkgdesc="A Python SNMP v1/v2c/v3 engine"
+url="http://snmplabs.com/pysnmp/index.html"
+arch="noarch"
+license="BSD-2-Clause"
+options="!check"
+depends="py-asn1 py-crypto"
+makedepends="py-setuptools py3-setuptools"
+subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
+ remove-bogus-check.patch
+ "
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ python2 setup.py build
+ python3 setup.py build
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+sha512sums="0f61ad0c095398b4b511c854ea7156aae78495f299457b14f4d3b50833670ec77c905e9cf4bdc30c21dd3c3e62d1c3473d7895f0352140af6345b18c1db3e7d8 pysnmp-4.4.11.tar.gz
+7976030882c78154a8db4250f1bcb634e74f7f7bd2ec5002dee89605b2cc1845fe92287ea22a2f0eb564fd8c2f3efdcac3370bafadb9eb54925646d6f57e677a remove-bogus-check.patch"