pkgname=namcap pkgver=3.5.2 pkgrel=1 pkgdesc="A Pacman package analyzer" arch=('x86_64') url="https://gitlab.archlinux.org/pacman/namcap" license=('GPL-2.0-or-later') depends=( 'binutils' 'elfutils' 'licenses' 'pkgconf' 'python-pyalpm' 'python' 'python-license-expression' 'python-pyelftools' ) makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools') source=(git+https://gitlab.archlinux.org/pacman/namcap.git#tag=${pkgver} flarebird-namcap.patch) sha256sums=(52c4fea20d24ca1999f07c928a75c85b7739bd3c6578e4939231f3ab294b996a 52dd02527ffec3fb9f49c5a039b8a6590309b4f46a5604ae8e804971eb87a104) prepare() { cd ${pkgname} git apply ${srcdir}/flarebird-namcap.patch } build() { cd ${pkgname} python3 -m build -wn } package() { cd ${pkgname} python3 -m installer -d ${pkgdir} dist/*.whl local site_packages="$(python3 -c "import site; print(site.getsitepackages()[0])")" mv ${pkgdir}/{${site_packages}/usr/share,usr} rmdir ${pkgdir}/${site_packages}/usr }