2012-05-02 13:59:57 +02:00
|
|
|
# Maintainer: Cedric Girard <girard.cedric@gmail.com>
|
|
|
|
pkgname=snmpsim
|
2014-06-20 14:43:47 +02:00
|
|
|
pkgver=0.2.4
|
2012-05-02 13:59:57 +02:00
|
|
|
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/"
|
|
|
|
license=('BSD')
|
|
|
|
depends=('python' 'python-pysnmp' 'python-pyasn1')
|
|
|
|
optdepends=('pycrypto: SNMPv3 support')
|
|
|
|
options=(!emptydirs)
|
|
|
|
source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz)
|
2014-06-20 14:43:47 +02:00
|
|
|
md5sums=('08981639fe50638197a77c156ff4e427')
|
2012-05-02 13:59:57 +02:00
|
|
|
|
2013-07-11 12:07:39 +02:00
|
|
|
prepare() {
|
2012-05-02 13:59:57 +02:00
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
2013-03-25 14:11:17 +01:00
|
|
|
sed -i '1i #!/usr/bin/env python' scripts/*.py
|
2013-07-11 12:07:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
|
2012-05-02 13:59:57 +02:00
|
|
|
python setup.py install --root="$pkgdir/" --optimize=1
|
|
|
|
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
2013-07-11 12:07:39 +02:00
|
|
|
|
|
|
|
#some files are installed in /usr/snmpsim move them to python package dir
|
|
|
|
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}/"
|
|
|
|
|
2012-05-02 13:59:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|