jobextra/namcap/PKGBUILD-arch
2024-01-15 01:39:53 +02:00

48 lines
1.3 KiB
Text

# Maintainer: Rémy Oudompheng <remy@archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Hugo Doria <hugo@archlinux.org>
pkgname=namcap
pkgver=3.5.2
pkgrel=1
pkgdesc='A Pacman package analyzer'
arch=(any)
url="https://gitlab.archlinux.org/pacman/$pkgname"
license=(GPL-2.0-or-later)
depends=(binutils
elfutils
licenses
pkgconf
pyalpm
python
python-license-expression
python-pyelftools)
checkdepends=(python-pytest
python-six
systemd)
makedepends=(python-{build,installer,wheel}
python-setuptools)
_archive="$pkgname-$pkgver"
source=("$url/-/releases/$pkgver/downloads/$_archive.tar.bz2"{,.asc})
sha256sums=('fbd3b1f0777fe457afd3dbb1f55de8adbaeb50257492626bcffd1a3eef67d618'
'SKIP')
validpgpkeys=(9F377DDB6D3153A48EB3EB1E63CC496475267693 # caleb@alerque.com
CCB34EBBB9541EF3F7B366C1D4A753468A5A5B67) # alerque@archlinux.org
build() {
cd "$_archive"
python -m build -wn
}
check() {
cd "$_archive"
env PARSE_PKGBUILD_PATH="$PWD" PATH="$PWD/scripts:$PATH" pytest
}
package() {
cd "$_archive"
python -m installer -d "$pkgdir" dist/*.whl
local site_packages="$(python -c "import site; print(site.getsitepackages()[0])")"
mv "$pkgdir/"{"$site_packages/usr/share",usr}
rmdir "$pkgdir/$site_packages/usr"
}