diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2017-07-19 10:02:19 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2017-07-19 10:02:29 +0000 |
commit | 9cda554d6be57425280ce78b7c085fffb86e7706 (patch) | |
tree | e4ff0857e358aede12bcaae34f714a010d356d75 /testing/py-netmiko | |
parent | 0bdb67976ff9b2169218a5be5167d7e45f8731ef (diff) | |
download | aports-9cda554d6be57425280ce78b7c085fffb86e7706.tar.bz2 aports-9cda554d6be57425280ce78b7c085fffb86e7706.tar.xz |
testing/py-netmiko: new aport
Diffstat (limited to 'testing/py-netmiko')
-rw-r--r-- | testing/py-netmiko/APKBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/py-netmiko/APKBUILD b/testing/py-netmiko/APKBUILD new file mode 100644 index 0000000000..151f391f6c --- /dev/null +++ b/testing/py-netmiko/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py-netmiko +_pkgname=${pkgname/py-/} +pkgver=1.4.2 +pkgrel=0 +pkgdesc="Multi-vendor library to simplify Paramiko SSH connections to network devices" +url="https://github.com/ktbyers/netmiko" +arch="noarch" +license="MIT" +depends="openssh-client py-yaml py-paramiko" +makedepends="py-setuptools python2-dev python3-dev" +subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" +source="$pkgname-$pkgver.tar.gz::https://github.com/ktbyers/${pkgname/py-/}/archive/v$pkgver.tar.gz" +builddir="$srcdir"/$_pkgname-$pkgver + +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check +} + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +package() { + mkdir -p "$pkgdir" +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + depends="$depends $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="49e9c1e92018539bb37c98404df11993cb10f338feb6e09724bd0c2b342591c8c63331ed52c2e63b6acd70b7856f262b79310911cdbab3a06065c40e3297ea02 py-netmiko-1.4.2.tar.gz" |