archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pysmi / trunk / PKGBUILD
blobf2cde670e281fc3fb1764c1feb7cca29f7392c4a
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Muflone http://www.muflone.com/contacts/english/
4 pkgname=python-pysmi
5 _pyname="${pkgname/*-/}"
6 pkgver=0.3.4
7 pkgrel=10
8 pkgdesc='SNMP/SMI MIB parsing and conversion library designed to turn ASN.1 MIBs into various formats'
9 url='http://snmplabs.com/pysmi/'
10 arch=('any')
11 license=('BSD')
12 depends=('python' 'python-ply')
13 makedepends=('python-sphinx')
14 checkdepends=('python-pytest' 'python-pysnmp')
15 source=(${_pyname}-${pkgver}.tar.gz::https://github.com/etingof/pysmi/archive/v${pkgver}.tar.gz)
16 sha512sums=('e6be1f0117f069cb9d67bb0dbc1cd8fa37b40865094ee33a60f794f6721cef14a72326fffd2fc43f22d6a959daf2d42147270421f86a57bde46081b5839880bf')
18 build() {
19   cd ${_pyname}-${pkgver}
20   python setup.py build
21   make -C docs text man
24 check() {
25   cd ${_pyname}-${pkgver}
26   py.test
29 package() {
30   cd ${_pyname}-${pkgver}
31   python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
33   install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
34   cp -r docs/build/text "${pkgdir}/usr/share/doc/${pkgname}"
35   cp -r examples -t "${pkgdir}/usr/share/doc/${pkgname}"
37   install -Dm 644 docs/build/man/${_pyname}.1 "${pkgdir}/usr/share/man/man1/${_pyname}.1"
38   install -Dm 644 docs/build/man/${_pyname}.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
39   install -Dm 644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}"
41   mv "${pkgdir}/usr/bin/mibdump"{.py,}
42   mv "${pkgdir}/usr/bin/mibcopy"{.py,}
45 # vim: ts=2 sw=2 et: