# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Christian Rebischke <chris.rebischke[at]archlinux[dot]org>
# Contributor: Sonic-Y3k <sonic.y3k@googlemail.com>

pkgname=python-pefile
pkgver=2023.2.7
pkgrel=2
pkgdesc='Python PE parsing module'
url='https://github.com/erocarrera/pefile'
arch=('any')
license=('MIT')
depends=('python')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
source=(https://github.com/erocarrera/pefile/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('829f5480a9a0d801d204a186556cf2941e303df6e7d5ea01522f5fe9a5075141431f549ebd18103818580922ff05b563c9f6e756eae683260fdd9d5af72c81e4')
b2sums=('c4fc4c18aa3517691dc09b91b7477d0a1b1ed0be2f72606697d2840b12d040aa010825ad992e032d258971398677899d44f845bf651c38b8f389cdd55a9aa786')

build() {
  cd pefile-${pkgver}
  python -m build --wheel --no-isolation
}

package_python-pefile() {
  cd pefile-${pkgver}
  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 README* -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
