summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Borders2019-11-26 14:31:48 -0500
committerMichael Borders2019-11-26 14:31:48 -0500
commitbddcad664430acf9c37772ee413ecf15a93e009f (patch)
tree90ab1446c4d436af1c45b67ea96997b277eca9f5
parentad7ecb5a8d3e9fc6bf044efa23cb3b37dab4689d (diff)
downloadaur-bddcad664430acf9c37772ee413ecf15a93e009f.tar.gz
Install license file & check package properly
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD16
2 files changed, 13 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8b770d86338f..8c3240afe2e6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
pkgbase = python-napalm
pkgdesc = Network Automation and Programmability Abstraction Layer with Multivendor support
pkgver = 2.5.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/napalm-automation/napalm
arch = any
license = Apache
+ checkdepends = python-tox
makedepends = python-setuptools
depends = python
depends = python-cffi
diff --git a/PKGBUILD b/PKGBUILD
index 0dbfb6cae9b6..9f527915e1ce 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,26 @@
# Maintainer: Michael Borders <michael.a.borders@gmail.com>
-pkgname=python-napalm
+pkgname=(python-napalm)
_pkgname=napalm
pkgver=2.5.0
-pkgrel=1
+pkgrel=2
pkgdesc="Network Automation and Programmability Abstraction Layer with Multivendor support"
arch=('any')
url="https://github.com/napalm-automation/napalm"
license=('Apache')
depends=('python' 'python-cffi' 'python-paramiko' 'python-future' 'python-textfsm' 'python-jinja' 'python-netaddr' 'python-pyaml' 'python-netmiko' 'python-junos-eznc' 'python-scp' 'python-lxml' 'python-ciscoconfparse')
-optdepends=()
makedepends=('python-setuptools')
+checkdepends=('python-tox')
source=("${url}/archive/${pkgver}.tar.gz")
sha256sums=('c30254303f0d908f64902d89ea73673a922d3a27f94c2af674264a1b5a230249')
-package(){
+check() {
cd "$srcdir/$_pkgname-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1
+ tox test -e py
}
+
+package() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ python setup.py install --root="$pkgdir/" --optimize=1
+ install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+} \ No newline at end of file