# arch contributor: https://projects.archlinux.org/svntogit/packages.git/plain/trunk/PKGBUILD?h=packages/python-pyelftools pkgname=python3-pyelftools _pypiname=pyelftools pkgver=0.23 pkgrel=2 pkgdesc="Python library for analyzing ELF files and DWARF debugging information" arch=('any') url="https://github.com/eliben/pyelftools" license=('custom') depends=('python') source=("${_pypiname}-${pkgver}.zip::https://github.com/eliben/pyelftools/archive/v${pkgver}.zip") sha1sums=('553de375ae13e5cd96efd2d9fe439aacbfbe1806') build() { cd ${srcdir}/${_pypiname}-${pkgver} python3 setup.py build } check() { cd ${srcdir}/${_pypiname}-${pkgver} python3 test/run_all_unittests.py } package() { cd ${srcdir}/${_pypiname}-${pkgver} python3 setup.py install --root=${pkgdir} install -D -m 644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE }