summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndrew Sun2019-06-16 21:40:02 -0400
committerAndrew Sun2019-06-16 21:40:02 -0400
commitde0a9ac948404caf192b76a661c9e60a19b9a924 (patch)
treeeb7a10caad0cc9dec8596f36ae92739106b2a23f /PKGBUILD
parent92dfcb12104ceff7199a347df74bd668aadef355 (diff)
downloadaur-snmpsim.tar.gz
snmpsim: update to 0.4.7
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 21 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c9691861f2a9..dd54ef6952f4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,40 @@
-# Maintainer: Cedric Girard <girard.cedric@gmail.com>
+# Maintainer: Andrew Sun <adsun701@gmail.com>
+# Contributor: Cedric Girard <girard.cedric@gmail.com>
+
pkgname=snmpsim
-pkgver=0.3.0
+pkgver=0.4.7
pkgrel=1
-pkgdesc="a software that would act like a multitude of real physical devices from SNMP Manager's point of view"
-arch=(any)
-url="http://snmpsim.sourceforge.net/"
+pkgdesc="A SNMP simulator"
+arch=('any')
+url="https://github.com/etingof/snmpsim"
license=('BSD')
-depends=('python' 'python-pysnmp' 'python-pyasn1')
-optdepends=('pycrypto: SNMPv3 support')
+depends=('python' 'python-pysnmp' 'python-pyasn1' 'python-pycryptodome')
+makedepends=('python-setuptools')
options=(!emptydirs)
-source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz)
-md5sums=('58d6aebf5785e2f18d7ade5294031248')
+source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/etingof/snmpsim/archive/v${pkgver}.tar.gz")
+sha256sums=('6a27013abcea789886b44f02d3bd963a62537f2f6cae4d8c6d7351cec86d0d47')
prepare() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "${srcdir}/${pkgname}-${pkgver}"
sed -i '1i #!/usr/bin/env python' scripts/*.py
}
+build(){
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ python setup.py build
+}
+
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "${srcdir}/${pkgname}-${pkgver}"
python setup.py install --root="$pkgdir/" --optimize=1
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- #some files are installed in /usr/snmpsim move them to python package dir
+ # Some files are installed in the directory "/usr/snmpsim".
+ # Move them to python package directory.
mv "${pkgdir}/usr/${pkgname}/data" "${pkgdir}"`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`/${pkgname}/
mv "${pkgdir}/usr/${pkgname}/variation" "${pkgdir}"`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`/${pkgname}/
- rmdir "${pkgdir}/usr/${pkgname}/"
-
+ rmdir "${pkgdir}/usr/${pkgname}"
}
# vim:set ts=2 sw=2 et: