1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
4 pkgname=python-pyelftools
8 pkgdesc='Python library for analyzing ELF files and DWARF debugging information'
9 url='https://github.com/eliben/pyelftools'
11 license=('custom:Public Domain')
12 makedepends=('python' 'python-setuptools')
15 source=(https://github.com/eliben/${_pkgname}/archive/v${pkgver}/${_pkgname}-${pkgver}.tar.gz)
16 sha512sums=('005163a53fe12baad0998d60d531e3ce4201236b7b042e3c28d7e68f9c40586f94a2576be6918be991a3bf464f2ca55700c0475a6e8c7b05b4342a6f5bbf3354')
17 b2sums=('87dad42d87b9d3de2382e21d6f7115fb24e420e262735d4bd73c4e3a325d10b69c6eab5d73ff999811633d6a024c22c15ad65be637339f0c609378d54926f747')
21 cd ${_pkgname}-${pkgver}
26 cd ${_pkgname}-${pkgver}
27 python test/run_all_unittests.py
28 python test/run_examples_test.py
29 if [ "${CARCH}" == "x86_64" ]; then
30 python test/run_readelf_tests.py
32 echo "Skipping readelf tests (require x86_64)"
37 cd ${_pkgname}-${pkgver}
38 python setup.py install -O1 --root="${pkgdir}" --skip-build
39 install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
40 install -Dm 644 README.rst CHANGES -t "${pkgdir}/usr/share/doc/${pkgname}"
41 cp -r examples "${pkgdir}/usr/share/doc/${pkgname}"