[arch-commits] Commit in python-pysnmp/repos/community-any (PKGBUILD)

Levente Polyak anthraxx at archlinux.org
Thu Nov 22 23:57:40 UTC 2018


    Date: Thursday, November 22, 2018 @ 23:57:39
  Author: anthraxx
Revision: 409454

addpkg: python-pysnmp 4.4.6-2

Added:
  python-pysnmp/repos/community-any/PKGBUILD

----------+
 PKGBUILD |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

Added: PKGBUILD
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-11-22 23:57:39 UTC (rev 409454)
@@ -0,0 +1,62 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Karol Babioch <karol at babioch.de>
+
+pkgbase=('python-pysnmp')
+pkgname=('python-pysnmp' 'python2-pysnmp')
+_pyname=pysnmp
+pkgver=4.4.6
+pkgrel=2
+pkgdesc='Open source and free implementation of v1/v2c/v3 SNMP engine'
+url='https://github.com/etingof/pysnmp'
+arch=('any')
+license=('BSD')
+makedepends=('python' 'python-setuptools' 'python-sphinx' 'python-pysmi' 'python-pyasn1'
+             'python2' 'python2-setuptools' 'python2-sphinx' 'python2-pysmi' 'python2-pyasn1')
+options=('!makeflags')
+source=(${_pyname}-${pkgver}.tar.gz::https://github.com/etingof/pysnmp/archive/v${pkgver}.tar.gz)
+sha512sums=('de18de7500c0283885b01f280bcc3f20318b806fd28fd574351edfba3ddba4b95ddde0f59d55a743047cc4c16d2a0b60187339097c428ff21f3cc4f96c24a6b3')
+
+prepare() {
+  cp -a ${_pyname}-${pkgver}{,-py2}
+}
+
+build() {
+  export PYTHONPATH=.
+  (cd ${_pyname}-${pkgver}
+    python setup.py build
+    make -C docs text man
+  )
+  (cd ${_pyname}-${pkgver}-py2
+    python2 setup.py build
+    make -C docs text man
+  )
+}
+
+package_python-pysnmp() {
+  depends=('python' 'python-pysmi' 'python-pyasn1')
+  cd ${_pyname}-${pkgver}
+  python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
+
+  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  cp -r docs/build/text "${pkgdir}/usr/share/doc/${pkgname}"
+  cp -r examples -t "${pkgdir}/usr/share/doc/${pkgname}"
+
+  install -Dm 644 docs/build/man/${_pyname}.1 "${pkgdir}/usr/share/man/man1/${_pyname}.1"
+  install -Dm 644 docs/build/man/${_pyname}.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+  install -Dm 644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+package_python2-pysnmp() {
+  depends=('python2' 'python2-pysmi' 'python2-pyasn1')
+  cd ${_pyname}-${pkgver}
+  python2 setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
+
+  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  cp -r docs/build/text "${pkgdir}/usr/share/doc/${pkgname}"
+  cp -r examples -t "${pkgdir}/usr/share/doc/${pkgname}"
+
+  install -Dm 644 docs/build/man/${_pyname}.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+  install -Dm 644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list