upgpkg: ocaml-integers 0.5.0-1
[arch-packages.git] / python-pyelftools / repos / testing-any / PKGBUILD
blob6cb8f4bb4be316f113f0366bf999249ea8b6177c
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
4 pkgname=python-pyelftools
5 _pkgname=pyelftools
6 pkgver=0.27
7 pkgrel=3
8 pkgdesc='Python library for analyzing ELF files and DWARF debugging information'
9 url='https://github.com/eliben/pyelftools'
10 arch=('any')
11 license=('custom:Public Domain')
12 makedepends=('python' 'python-setuptools')
13 depends=('python')
14 options=('!strip')
15 source=(https://github.com/eliben/${_pkgname}/archive/v${pkgver}/${_pkgname}-${pkgver}.tar.gz)
16 sha512sums=('bb0a00e5500016e3d4f64be0a728e190f84b11a805f78d668b5a74716a30400e6794946f198ef4a3f3b8f64a63deb1b5a96180b09e56b7357b988b28e25fad0a')
17 b2sums=('74e6e17c68b197d0ecdddedba81a96601003c41a9c095bc72dff7630511705d36d1bc2732005a87ad1420c99497d729c5b771eca7bf5409c0da77d7b348d9c1b')
20 build() {
21   cd ${_pkgname}-${pkgver}
22   python setup.py build
25 check() {
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
31   else
32     echo "Skipping readelf tests (require x86_64)"
33   fi
36 package() {
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}"